From abbc3b0294e1fa09fe125f179d320c9da6d37cce Mon Sep 17 00:00:00 2001 From: afaerber Date: Sun, 13 Feb 2011 20:54:47 +0000 Subject: [PATCH] ppc64: Re-enable SF bit after returning from ELF binary MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit When returning from the binary, enable Sixty-Four Bit Mode. Leave it disabled on entry, as enabling it breaks multiple guests. Signed-off-by: Andreas Färber git-svn-id: svn://openbios.org/openbios/trunk/openbios-devel@1029 f158a5a8-5612-0410-a976-696ce0be7e32 --- arch/ppc/qemu/start.S | 5 +++++ include/arch/ppc/processor.h | 2 ++ 2 files changed, 7 insertions(+) diff --git a/arch/ppc/qemu/start.S b/arch/ppc/qemu/start.S index 29cfc14..0d64568 100644 --- a/arch/ppc/qemu/start.S +++ b/arch/ppc/qemu/start.S @@ -494,6 +494,11 @@ _GLOBAL(call_elf): MTMSRD(r0) blrl +#ifdef CONFIG_PPC64 + /* Restore SF bit */ + LOAD_REG_IMMEDIATE(r0, MSR_SF | MSR_FP | MSR_ME | MSR_DR | MSR_IR) + MTMSRD(r0) +#endif LOAD_REG_IMMEDIATE(r8, saved_stack) // restore stack pointer mr r1,r8 PPC_LL r0, (STACKFRAME_MINSIZE + PPC_LR_STKOFF)(r1) diff --git a/include/arch/ppc/processor.h b/include/arch/ppc/processor.h index 21e4fab..bb03bb1 100644 --- a/include/arch/ppc/processor.h +++ b/include/arch/ppc/processor.h @@ -40,6 +40,8 @@ #ifndef MSR_VEC +#define MSR_SF (1 << 63) /* Sixty-Four Bit Mode */ + #define MSR_VEC (1<<25) /* 6: Enable AltiVec */ #define MSR_POW (1<<18) /* 13: Enable Power Management */ #define MSR_TGPR (1<<17) /* 14: TLB Update registers in use */ -- 2.11.4.GIT