diff options
author | nwhitehorn <nwhitehorn@FreeBSD.org> | 2011-11-09 13:48:23 +0000 |
---|---|---|
committer | nwhitehorn <nwhitehorn@FreeBSD.org> | 2011-11-09 13:48:23 +0000 |
commit | 59f1d882c5380b639e729d8682bd4af24e6a7c72 (patch) | |
tree | 4cf3b46a5cfd0b9ddc332f6c3e731b46e7cd3ee9 /sys/powerpc/aim | |
parent | 4b5517fbe0fc5250d7fd17e32c8a1192f830043e (diff) | |
download | FreeBSD-src-59f1d882c5380b639e729d8682bd4af24e6a7c72.zip FreeBSD-src-59f1d882c5380b639e729d8682bd4af24e6a7c72.tar.gz |
Fix a bug where the pmap_cpu_bootstrap() ap argument could be clobbered.
Luckily, it mostly wasn't important, so this didn't cause major problems.
Also improve register reuse when setting up trap frames very slightly.
Submitted by: Justin Hibbits <chmeeedalf at gmail dot com>
MFC after: 5 days
Diffstat (limited to 'sys/powerpc/aim')
-rw-r--r-- | sys/powerpc/aim/trap_subr32.S | 5 | ||||
-rw-r--r-- | sys/powerpc/aim/trap_subr64.S | 1 |
2 files changed, 4 insertions, 2 deletions
diff --git a/sys/powerpc/aim/trap_subr32.S b/sys/powerpc/aim/trap_subr32.S index 172150e..cf8d03a 100644 --- a/sys/powerpc/aim/trap_subr32.S +++ b/sys/powerpc/aim/trap_subr32.S @@ -303,6 +303,7 @@ cpu_reset: lis %r3,1@l bla CNAME(cpudep_ap_early_bootstrap) + lis %r3,1@l bla CNAME(pmap_cpu_bootstrap) bla CNAME(cpudep_ap_bootstrap) mr %r1,%r3 @@ -665,8 +666,8 @@ disitrap: GET_CPUINFO(%r1) lwz %r30,(PC_TEMPSAVE+CPUSAVE_AIM_DAR)(%r1) /* get DAR */ stw %r30,(PC_DBSAVE +CPUSAVE_AIM_DAR)(%r1) /* save DAR */ - lwz %r30,(PC_TEMPSAVE+CPUSAVE_AIM_DSISR)(%r1) /* get DSISR */ - stw %r30,(PC_DBSAVE +CPUSAVE_AIM_DSISR)(%r1) /* save DSISR */ + lwz %r31,(PC_TEMPSAVE+CPUSAVE_AIM_DSISR)(%r1) /* get DSISR */ + stw %r31,(PC_DBSAVE +CPUSAVE_AIM_DSISR)(%r1) /* save DSISR */ lwz %r30,(PC_DISISAVE+CPUSAVE_R28)(%r1) /* get r28 */ stw %r30,(PC_DBSAVE +CPUSAVE_R28)(%r1) /* save r28 */ lwz %r31,(PC_DISISAVE+CPUSAVE_R29)(%r1) /* get r29 */ diff --git a/sys/powerpc/aim/trap_subr64.S b/sys/powerpc/aim/trap_subr64.S index 111d516..6f3a2de 100644 --- a/sys/powerpc/aim/trap_subr64.S +++ b/sys/powerpc/aim/trap_subr64.S @@ -301,6 +301,7 @@ cpu_reset: lis %r3,1@l bl CNAME(cpudep_ap_early_bootstrap) /* Set PCPU */ nop + lis %r3,1@l bl CNAME(pmap_cpu_bootstrap) /* Turn on virtual memory */ nop bl CNAME(cpudep_ap_bootstrap) /* Set up PCPU and stack */ |