From f2dd13f86d803e241b835c5ca2a2a14d583ba01e Mon Sep 17 00:00:00 2001 From: Patrick Williams Date: Wed, 18 Apr 2012 16:18:22 -0500 Subject: Allow kernel to shutdown-to-payload. This code is currently unused, due to InitService not having the payload address and the start_host_os IPL step being unimplemented. For testing purposes the 'shutdown' call in initservice.C can be changed to pass a non-zero base address (such as 256MB). RTC: 40871 Change-Id: I0f4b6bae62ede1853aabbcb28082300005e31897 Reviewed-on: http://gfw160.austin.ibm.com:8080/gerrit/926 Reviewed-by: A. Patrick Williams III Tested-by: Jenkins Server Reviewed-by: Douglas R. Gilbert --- src/include/kernel/cpumgr.H | 5 +++++ src/include/kernel/misc.H | 5 +++++ src/include/kernel/ppcconsts.S | 1 + 3 files changed, 11 insertions(+) (limited to 'src/include/kernel') diff --git a/src/include/kernel/cpumgr.H b/src/include/kernel/cpumgr.H index 3be17192c..4374d50a0 100644 --- a/src/include/kernel/cpumgr.H +++ b/src/include/kernel/cpumgr.H @@ -81,6 +81,11 @@ class CpuManager */ static void activateCPU(cpu_t * i_cpu); + /** @fn getCpuCount + * Return the number of active CPUs. + */ + static size_t getCpuCount() { return cv_cpuCount; } + protected: CpuManager(); diff --git a/src/include/kernel/misc.H b/src/include/kernel/misc.H index 4be79d641..f04439748 100644 --- a/src/include/kernel/misc.H +++ b/src/include/kernel/misc.H @@ -35,5 +35,10 @@ namespace KernelMisc * @brief Sequence kernel to shutdown and switch to payload. */ void shutdown(); + + /** @brief Base address (target HRMOR) of the payload. */ + extern uint64_t g_payload_base; + /** @brief Address from base of payload entry-point. */ + extern uint64_t g_payload_entry; }; #endif diff --git a/src/include/kernel/ppcconsts.S b/src/include/kernel/ppcconsts.S index 6aa53a6cd..89a52a008 100644 --- a/src/include/kernel/ppcconsts.S +++ b/src/include/kernel/ppcconsts.S @@ -156,6 +156,7 @@ .set HSPRG1,305 .set HDSISR,306 .set HDEC,310 + .set HRMOR,313 .set HSRR0,314 .set HSRR1,315 .set HMER,336 -- cgit v1.2.3