diff options
Diffstat (limited to 'src/kernel')
-rw-r--r-- | src/kernel/heapmgr.C | 3 | ||||
-rw-r--r-- | src/kernel/machchk.C | 11 | ||||
-rw-r--r-- | src/kernel/makefile | 5 | ||||
-rw-r--r-- | src/kernel/misc.C | 22 | ||||
-rw-r--r-- | src/kernel/terminate.C | 15 | ||||
-rw-r--r-- | src/kernel/vmmmgr.C | 3 |
6 files changed, 47 insertions, 12 deletions
diff --git a/src/kernel/heapmgr.C b/src/kernel/heapmgr.C index e28da77b1..d905aff88 100644 --- a/src/kernel/heapmgr.C +++ b/src/kernel/heapmgr.C @@ -5,7 +5,7 @@ /* */ /* OpenPOWER HostBoot Project */ /* */ -/* Contributors Listed Below - COPYRIGHT 2010,2018 */ +/* Contributors Listed Below - COPYRIGHT 2010,2019 */ /* [+] International Business Machines Corp. */ /* */ /* */ @@ -31,7 +31,6 @@ #include <util/align.H> #include <arch/ppc.H> #include <usr/debugpointers.H> -#include <config.h> #ifdef HOSTBOOT_DEBUG #define SMALL_HEAP_PAGES_TRACKED 64 diff --git a/src/kernel/machchk.C b/src/kernel/machchk.C index d17c1ff90..73f5831b6 100644 --- a/src/kernel/machchk.C +++ b/src/kernel/machchk.C @@ -5,7 +5,7 @@ /* */ /* OpenPOWER HostBoot Project */ /* */ -/* Contributors Listed Below - COPYRIGHT 2013,2018 */ +/* Contributors Listed Below - COPYRIGHT 2013,2019 */ /* [+] International Business Machines Corp. */ /* */ /* */ @@ -180,7 +180,14 @@ void forceCheckstop() { printk( "Forcing a xstop with %p = %.16lX\n", g_xstopRegPtr, g_xstopRegValue ); - *g_xstopRegPtr = g_xstopRegValue; + + // Per PowerPC ISA : + // Store Doubleword Caching Inhibited Indexed + // stdcix RS,RA,RB + // let the effective address (EA) be the sum(RA|0)+ (RB). + // (RS) is stored into the doubleword in storage addressed by EA + asm volatile("stdcix %0,0,%1" + :: "r" (g_xstopRegValue) , "r" (reinterpret_cast <uint64_t>(g_xstopRegPtr))); } else { diff --git a/src/kernel/makefile b/src/kernel/makefile index 211a8b10e..c2f2e0451 100644 --- a/src/kernel/makefile +++ b/src/kernel/makefile @@ -5,7 +5,7 @@ # # OpenPOWER HostBoot Project # -# Contributors Listed Below - COPYRIGHT 2010,2018 +# Contributors Listed Below - COPYRIGHT 2010,2019 # [+] International Business Machines Corp. # # @@ -24,6 +24,9 @@ # IBM_PROLOG_END_TAG ROOTPATH = ../.. +# we need HBB to be small +HOSTBOOT_PROFILE_NO_INSTRUMENT=1 + OBJS += start.o OBJS += kernel.o OBJS += console.o diff --git a/src/kernel/misc.C b/src/kernel/misc.C index 7d19131ef..157d9ba22 100644 --- a/src/kernel/misc.C +++ b/src/kernel/misc.C @@ -121,10 +121,11 @@ namespace KernelMisc } else { - //Determine if P9N/P9C and apply URMOR hack + //All variants of P9 need to apply URMOR hack uint64_t l_urmor_hack = 0x0; PVR_t l_pvr(getPVR()); - if((l_pvr.chipFamily == PVR_t::P9_ALL)) + if((l_pvr.chipFamily == PVR_t::P9_ALL) + ||((l_pvr.chipFamily == PVR_t::P9_AXONE))) { l_urmor_hack = 1; } @@ -642,10 +643,23 @@ namespace KernelMisc l_frame = reinterpret_cast<uint64_t*>(*l_frame); } - printk("\n"); - } + if (i_task) + { + printk("\n GPRs for %d:\n", l_tid); + for (int i = 0; i < 16; ++i) + { + printk(" r%-2d = 0x%016lx r%-2d = 0x%016lx\n", + i, + i_task->context.gprs[i], + i + 16, + i_task->context.gprs[i + 16]); + } + } + + printk("\n"); + } }; namespace KernelMemState diff --git a/src/kernel/terminate.C b/src/kernel/terminate.C index cb70e9be6..308e52b2e 100644 --- a/src/kernel/terminate.C +++ b/src/kernel/terminate.C @@ -5,7 +5,7 @@ /* */ /* OpenPOWER HostBoot Project */ /* */ -/* Contributors Listed Below - COPYRIGHT 2012,2018 */ +/* Contributors Listed Below - COPYRIGHT 2012,2019 */ /* [+] International Business Machines Corp. */ /* */ /* */ @@ -27,6 +27,7 @@ #include <kernel/hbterminatetypes.H> #include <kernel/terminate.H> #include <sys/sync.h> +#include <arch/ppc.H> #ifndef BOOTLOADER #include <stdint.h> #include <kernel/console.H> @@ -56,6 +57,9 @@ HB_Descriptor kernel_hbDescriptor = void terminateExecuteTI() { + // Trigger a hostboot dump in Simics + MAGIC_INSTRUCTION(MAGIC_HB_DUMP); + // Call the function that actually executes the TI code. p9_force_attn(); } @@ -128,4 +132,13 @@ void termSetHbDump(void) return; } + +void termSetIstep(uint32_t i_istep) +{ + // Set istep into progress code word of the SRC + kernel_TIDataArea.src.SRCword4 = i_istep; + return; +} + + #endif // BOOTLOADER diff --git a/src/kernel/vmmmgr.C b/src/kernel/vmmmgr.C index 553fa3d34..e9e6112e8 100644 --- a/src/kernel/vmmmgr.C +++ b/src/kernel/vmmmgr.C @@ -5,7 +5,7 @@ /* */ /* OpenPOWER HostBoot Project */ /* */ -/* Contributors Listed Below - COPYRIGHT 2010,2017 */ +/* Contributors Listed Below - COPYRIGHT 2010,2019 */ /* [+] International Business Machines Corp. */ /* */ /* */ @@ -32,7 +32,6 @@ #include <kernel/basesegment.H> #include <kernel/stacksegment.H> #include <kernel/devicesegment.H> -#include <config.h> #include <kernel/bltohbdatamgr.H> #include <util/align.H> |