summaryrefslogtreecommitdiffstats
path: root/src/kernel/misc.C
diff options
context:
space:
mode:
authorDean Sanner <dsanner@us.ibm.com>2017-12-05 15:10:45 -0600
committerDaniel M. Crowell <dcrowell@us.ibm.com>2018-09-24 12:17:16 -0500
commitfcfd722a6abb01f780c10de0f5d801a9c4210ebd (patch)
tree49cfafdc273b1aa7989d851d7c17fbb74dd54b0b /src/kernel/misc.C
parent69cc45d8f059a113f6bad12e1fdd82123497893a (diff)
downloadtalos-hostboot-fcfd722a6abb01f780c10de0f5d801a9c4210ebd.tar.gz
talos-hostboot-fcfd722a6abb01f780c10de0f5d801a9c4210ebd.zip
Support HB running in SMF
Support SMF for P9N/P9C. Lots of minor tweaks to make this work, but the biggest is to run userspace in problem state This is needed because for SMF Hostboot will need to run in S=1, HV=0,PR=1 (and kernel in S=1, HV=1, PR=0) This commit makes P9 HB userpsace run in HV=0 PR=1 and kernel in HV=1, PR=0. Change-Id: Ia4771df5e8858c6b7ae54b0746e62b283afb4bc4 RTC: 197243 Reviewed-on: http://rchgit01.rchland.ibm.com/gerrit1/50530 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: Dean Sanner <dsanner@us.ibm.com> Reviewed-by: Nicholas E. Bofferding <bofferdn@us.ibm.com> Reviewed-by: Christian R. Geddes <crgeddes@us.ibm.com> Reviewed-by: Daniel M. Crowell <dcrowell@us.ibm.com>
Diffstat (limited to 'src/kernel/misc.C')
-rw-r--r--src/kernel/misc.C18
1 files changed, 14 insertions, 4 deletions
diff --git a/src/kernel/misc.C b/src/kernel/misc.C
index ed964da79..b91aeb79f 100644
--- a/src/kernel/misc.C
+++ b/src/kernel/misc.C
@@ -42,10 +42,11 @@
#include <kernel/timemgr.H>
#include <util/singleton.H>
#include <kernel/doorbell.H>
+#include <arch/pvrformat.H>
extern "C"
void kernel_shutdown(size_t, uint64_t, uint64_t, uint64_t,
- uint64_t, uint64_t) NO_RETURN;
+ uint64_t, uint64_t, uint64_t) NO_RETURN;
extern HB_Descriptor kernel_hbDescriptor;
@@ -118,6 +119,14 @@ namespace KernelMisc
}
else
{
+ //Determine if P9N/P9C and apply URMOR hack
+ uint64_t l_urmor_hack = 0x0;
+ PVR_t l_pvr(getPVR());
+ if((l_pvr.chipFamily == PVR_t::P9_ALL))
+ {
+ l_urmor_hack = 1;
+ }
+
static Barrier* l_barrier = new Barrier(CpuManager::getCpuCount());
static uint64_t l_lowestPIR = 0xfffffffffffffffful;
@@ -216,7 +225,8 @@ namespace KernelMisc
g_payload_entry,
g_payload_data,
local_master_pir, //master PIR if local master
- start_payload_data_area_address);
+ start_payload_data_area_address,
+ l_urmor_hack);
}
}
else
@@ -319,7 +329,7 @@ namespace KernelMisc
// Create kernel save area and store ptr in bottom of kernel stack.
task_t* saveArea = new task_t();
- saveArea->context.msr_mask = 0xD030; // EE, ME, PR, IR, DR.
+ saveArea->context.msr_mask = 0x100000000000D030; //HV,EE,ME,PR,IR,DR.
*(reinterpret_cast<task_t**>(cpu->kernel_stack_bottom)) = saveArea;
// Set register to indicate we want a 'stop 15' to occur (state loss)
@@ -420,7 +430,7 @@ namespace KernelMisc
// Create kernel save area and store ptr in bottom of kernel stack.
task_t* saveArea = new task_t();
- saveArea->context.msr_mask = 0xD030; // EE, ME, PR, IR, DR.
+ saveArea->context.msr_mask = 0x100000000000D030; //HV,EE,ME,PR,IR,DR.
*(reinterpret_cast<task_t**>(cpu->kernel_stack_bottom)) = saveArea;
// Set register to indicate we want a 'stop 15' to ocur (state loss)
OpenPOWER on IntegriCloud