diff options
author | Nick Bofferding <bofferdn@us.ibm.com> | 2018-06-26 01:49:20 -0500 |
---|---|---|
committer | Daniel M. Crowell <dcrowell@us.ibm.com> | 2018-06-27 16:32:10 -0400 |
commit | fd642c6bf549be5dc8c8e4877ab64a920ba54be9 (patch) | |
tree | fd86a308e6aff9dc5d1242637ffb05550250f487 | |
parent | a729adbb19660b65ce613392d25309c3b2eb840f (diff) | |
download | talos-hostboot-fd642c6bf549be5dc8c8e4877ab64a920ba54be9.tar.gz talos-hostboot-fd642c6bf549be5dc8c8e4877ab64a920ba54be9.zip |
Invoke P9 TIs correctly
Prior to this change, the assembly code to invoke p9 attentions did not
flush the instruction cache, which led to the alternative behavior of the
attn instruction, namely invoking the hypervisor emulation assistance
interrupt / illegal instruction handler. This caused chaos in the shutdown
path, especially after the CPUs come online in istep 16.
Change-Id: I7c5bf4342a41136e82326da285eed059d4fb17a3
CQ: SW419736
Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/61351
Tested-by: Jenkins Server <pfd-jenkins+hostboot@us.ibm.com>
Tested-by: Jenkins OP Build CI <op-jenkins+hostboot@us.ibm.com>
Tested-by: Jenkins OP HW <op-hw-jenkins+hostboot@us.ibm.com>
Tested-by: FSP CI Jenkins <fsp-CI-jenkins+hostboot@us.ibm.com>
Reviewed-by: Daniel M. Crowell <dcrowell@us.ibm.com>
-rw-r--r-- | src/kernel/forceattn_p9.S (renamed from src/kernel/forceattn_p8.S) | 16 | ||||
-rw-r--r-- | src/kernel/makefile | 4 | ||||
-rw-r--r-- | src/kernel/terminate.C | 4 | ||||
-rw-r--r-- | src/makefile | 4 |
4 files changed, 16 insertions, 12 deletions
diff --git a/src/kernel/forceattn_p8.S b/src/kernel/forceattn_p9.S index c1a31e045..093908ed8 100644 --- a/src/kernel/forceattn_p8.S +++ b/src/kernel/forceattn_p9.S @@ -1,7 +1,7 @@ # IBM_PROLOG_BEGIN_TAG # This is an automatically generated prolog. # -# $Source: src/kernel/forceattn_p8.S $ +# $Source: src/kernel/forceattn_p9.S $ # # OpenPOWER HostBoot Project # @@ -25,13 +25,14 @@ .include "kernel/ppcconsts.S" -.global p8_force_attn -p8_force_attn: - li r0, 1 +.global p9_force_attn +p9_force_attn: +# Update HID0 to enable attentions + li r0, 3 mfspr r9, HID0 - insrdi r9,r0,1,3 /* Turn on bit 3 */ + rldimi r9,r0,60,2 /* Turn on bits 2 (flush icache) + 3 (enable attn) */ sync - mtspr HID0,r9 /* Enable attentions */ + mtspr HID0,r9 /* Enable attentions */ mfspr r9, HID0 mfspr r9, HID0 mfspr r9, HID0 @@ -39,6 +40,9 @@ p8_force_attn: mfspr r9, HID0 mfspr r9, HID0 isync +# Invoke attention instruction + sync + isync rlwimi 31,31,0,4,22 /* MAGIC_SIMICS_SHUTDOWN */ attn b 0 diff --git a/src/kernel/makefile b/src/kernel/makefile index ddf3909ab..004dfbe74 100644 --- a/src/kernel/makefile +++ b/src/kernel/makefile @@ -5,7 +5,7 @@ # # OpenPOWER HostBoot Project # -# Contributors Listed Below - COPYRIGHT 2010,2017 +# Contributors Listed Below - COPYRIGHT 2010,2018 # [+] International Business Machines Corp. # # @@ -59,7 +59,7 @@ OBJS += intmsghandler.o OBJS += deferred.o OBJS += shutdown.o -OBJS += forceattn_p8.o +OBJS += forceattn_p9.o OBJS += terminate.o OBJS += ipc.o OBJS += machchk.o diff --git a/src/kernel/terminate.C b/src/kernel/terminate.C index 499fd96b9..6158b3c49 100644 --- a/src/kernel/terminate.C +++ b/src/kernel/terminate.C @@ -35,7 +35,7 @@ #include <kernel/kernel_reasoncodes.H> #endif // BOOTLOADER -extern "C" void p8_force_attn() NO_RETURN; +extern "C" void p9_force_attn() NO_RETURN; #ifndef BOOTLOADER @@ -55,7 +55,7 @@ HB_Descriptor kernel_hbDescriptor = void terminateExecuteTI() { // Call the function that actually executes the TI code. - p8_force_attn(); + p9_force_attn(); } #ifndef BOOTLOADER diff --git a/src/makefile b/src/makefile index d6a4cf944..571916960 100644 --- a/src/makefile +++ b/src/makefile @@ -72,7 +72,7 @@ BOOTLDR_OBJECTS += bl_pnorAccess.o BOOTLDR_OBJECTS += bl_pnor_utils.o BOOTLDR_OBJECTS += bl_pnor_ecc.o BOOTLDR_OBJECTS += bl_terminate.o -BOOTLDR_OBJECTS += forceattn_p8.o +BOOTLDR_OBJECTS += forceattn_p9.o BOOTLDR_OBJECTS += bl_string_utils.o BOOTLDR_OBJECTS += rom_entry.o @@ -116,7 +116,7 @@ DIRECT_BOOT_OBJECTS += blockmsghdlr.o DIRECT_BOOT_OBJECTS += stacksegment.o DIRECT_BOOT_OBJECTS += softpatch_p8.o DIRECT_BOOT_OBJECTS += shutdown.o -DIRECT_BOOT_OBJECTS += forceattn_p8.o +DIRECT_BOOT_OBJECTS += forceattn_p9.o DIRECT_BOOT_OBJECTS += terminate.o DIRECT_BOOT_OBJECTS += ipc.o DIRECT_BOOT_OBJECTS += machchk.o |