summaryrefslogtreecommitdiffstats
path: root/src/kernel/misc.C
diff options
context:
space:
mode:
authorAndrew Geissler <andrewg@us.ibm.com>2014-02-12 17:57:55 -0600
committerA. Patrick Williams III <iawillia@us.ibm.com>2014-02-19 10:20:39 -0600
commite096ddaa443eb9e8e89fb3d940280a1d12ffe36d (patch)
tree56582df9e063176f0fa414f5af478532000321f7 /src/kernel/misc.C
parent0e27069ced54cd211ccb84240d224aa70e036097 (diff)
downloadblackbird-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/kernel/misc.C')
-rw-r--r--src/kernel/misc.C14
1 files changed, 12 insertions, 2 deletions
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);
OpenPOWER on IntegriCloud