diff options
author | nwhitehorn <nwhitehorn@FreeBSD.org> | 2016-01-02 18:10:53 +0000 |
---|---|---|
committer | nwhitehorn <nwhitehorn@FreeBSD.org> | 2016-01-02 18:10:53 +0000 |
commit | 3766fc66d62e448e1e6e459cf0e03f69882321af (patch) | |
tree | 2bd5cb0ddc1cfbca0c36427966d74bba87d1239c /sys/powerpc | |
parent | cd342db2ce70f8b5d7631a02a190030195bfc83b (diff) | |
download | FreeBSD-src-3766fc66d62e448e1e6e459cf0e03f69882321af.zip FreeBSD-src-3766fc66d62e448e1e6e459cf0e03f69882321af.tar.gz |
Switch setting MSR[SF] to C code. This removes any CPU-specific code
(MSF[SF] is a Book 3-S thing) in the 64-bit locore64.S.
Diffstat (limited to 'sys/powerpc')
-rw-r--r-- | sys/powerpc/aim/aim_machdep.c | 11 | ||||
-rw-r--r-- | sys/powerpc/aim/locore64.S | 7 |
2 files changed, 11 insertions, 7 deletions
diff --git a/sys/powerpc/aim/aim_machdep.c b/sys/powerpc/aim/aim_machdep.c index ab09ab6..835783f 100644 --- a/sys/powerpc/aim/aim_machdep.c +++ b/sys/powerpc/aim/aim_machdep.c @@ -179,6 +179,17 @@ aim_cpu_init(vm_offset_t toc) trap_offset = 0; cacheline_warn = 0; + #ifdef __powerpc64__ + /* + * Switch to 64-bit mode, if the bootloader didn't, before we start + * using memory beyond what the bootloader might have set up. + * Guaranteed not to cause an implicit branch since we either (a) + * started with a 32-bit bootloader below 4 GB or (b) were already in + * 64-bit mode, making this a no-op. + */ + mtmsrd(mfmsr() | PSL_SF); + #endif + /* Various very early CPU fix ups */ switch (mfpvr() >> 16) { /* diff --git a/sys/powerpc/aim/locore64.S b/sys/powerpc/aim/locore64.S index fc2fa8d..7f93793 100644 --- a/sys/powerpc/aim/locore64.S +++ b/sys/powerpc/aim/locore64.S @@ -157,13 +157,6 @@ ASENTRY_NOPROF(__start) ld %r5,64(%r1) ld %r6,72(%r1) - /* Switch to 64-bit mode */ - mfmsr %r9 - li %r8,1 - insrdi %r9,%r8,1,0 - mtmsrd %r9 - isync - /* Begin CPU init */ mr %r4,%r2 /* Replace ignored r4 with tocbase for trap handlers */ bl powerpc_init |