diff options
author | Andrew Geissler <andrewg@us.ibm.com> | 2014-02-12 17:57:55 -0600 |
---|---|---|
committer | A. Patrick Williams III <iawillia@us.ibm.com> | 2014-02-19 10:20:39 -0600 |
commit | e096ddaa443eb9e8e89fb3d940280a1d12ffe36d (patch) | |
tree | 56582df9e063176f0fa414f5af478532000321f7 /src | |
parent | 0e27069ced54cd211ccb84240d224aa70e036097 (diff) | |
download | blackbird-hostboot-e096ddaa443eb9e8e89fb3d940280a1d12ffe36d.tar.gz blackbird-hostboot-e096ddaa443eb9e8e89fb3d940280a1d12ffe36d.zip |
Set hostboot_done scratch reg after all winkles and controlled shutdown
Change-Id: Ie2887464cc57fe9d5974de5e8031d82f5c42fb06
CQ: SW246446
Reviewed-on: http://gfw160.aus.stglabs.ibm.com:8080/gerrit/8808
Tested-by: Jenkins Server
Reviewed-by: A. Patrick Williams III <iawillia@us.ibm.com>
Diffstat (limited to 'src')
-rw-r--r-- | src/kernel/kernel.C | 6 | ||||
-rw-r--r-- | src/kernel/misc.C | 14 |
2 files changed, 15 insertions, 5 deletions
diff --git a/src/kernel/kernel.C b/src/kernel/kernel.C index 1ba209613..1f5770280 100644 --- a/src/kernel/kernel.C +++ b/src/kernel/kernel.C @@ -5,7 +5,7 @@ /* */ /* IBM CONFIDENTIAL */ /* */ -/* COPYRIGHT International Business Machines Corp. 2010,2012 */ +/* COPYRIGHT International Business Machines Corp. 2010,2014 */ /* */ /* p1 */ /* */ @@ -99,8 +99,8 @@ void Kernel::cppBootstrap() void(**ctors)() = &ctor_start_address; while(ctors != &ctor_end_address) { - (*ctors)(); - ctors++; + (*ctors)(); + ctors++; } } diff --git a/src/kernel/misc.C b/src/kernel/misc.C index d109b31fc..48c1240de 100644 --- a/src/kernel/misc.C +++ b/src/kernel/misc.C @@ -39,6 +39,7 @@ #include <kernel/ipc.H> #include <kernel/timemgr.H> + extern "C" void kernel_shutdown(size_t, uint64_t, uint64_t, uint64_t, uint64_t, uint64_t) NO_RETURN; @@ -215,6 +216,12 @@ namespace KernelMisc // Got a nonzero status value indicating we had a shutdown request // with a PLID and there force need to do TI. The plid info was // written to the data area earlier in CpuManager::requestShutdown + + // First indicate to the FSP that we're done by clearing out the + // "hostboot_done" register. We need to do this since this is the + // power off path. + updateScratchReg(MMIO_SCRATCH_HOSTBOOT_ACTIVE,0); + terminateExecuteTI(); } } @@ -282,12 +289,10 @@ namespace KernelMisc updateScratchReg(MMIO_SCRATCH_MEMORY_STATE, kernel_hbDescriptor.kernelMemoryState); - // @TODO: Remove this workaround with RTC 84029. // Set scratch register to indicate Hostboot is [still] active. const char * hostboot_string = "hostboot"; updateScratchReg(MMIO_SCRATCH_HOSTBOOT_ACTIVE, *reinterpret_cast<const uint64_t*>(hostboot_string)); - // -- end workaround. // Restore caller of cpu_master_winkle(). iv_caller->state = TASK_STATE_RUNNING; @@ -385,6 +390,11 @@ namespace KernelMisc updateScratchReg(MMIO_SCRATCH_MEMORY_STATE, kernel_hbDescriptor.kernelMemoryState); + // Set scratch register to indicate Hostboot is [still] active. + const char * hostboot_string = "hostboot"; + updateScratchReg(MMIO_SCRATCH_HOSTBOOT_ACTIVE, + *reinterpret_cast<const uint64_t*>(hostboot_string)); + // Restore caller of cpu_all_winkle(). iv_caller->state = TASK_STATE_RUNNING; TaskManager::setCurrentTask(iv_caller); |