summaryrefslogtreecommitdiffstats
path: root/src/usr/xscom
diff options
context:
space:
mode:
authorDan Crowell <dcrowell@us.ibm.com>2017-10-01 16:09:56 -0500
committerDaniel M. Crowell <dcrowell@us.ibm.com>2018-03-29 12:03:50 -0400
commit90eaed6f430c88eb0127ce47671bd80b21f35433 (patch)
tree9bc4aaa5cfb416f0da69386fb595e92513e0d1b7 /src/usr/xscom
parent284cebd97cf08d42ba2f4caa8779bf47494fcc20 (diff)
downloadtalos-hostboot-90eaed6f430c88eb0127ce47671bd80b21f35433.tar.gz
talos-hostboot-90eaed6f430c88eb0127ce47671bd80b21f35433.zip
Force checkstops for unhandled machine checks
Default MSR[ME]=0 during initial boot for bootloader and hostboot kernel Once the xscom address range has been mapped in, enable the machine check handler to force a checkstop and set MSR[ME]=1 to allow regular machine check handling CQ: SW401402 Change-Id: I104e39465e61b3b19d5c073e71271102711ae54f Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/47179 Reviewed-by: Christian R. Geddes <crgeddes@us.ibm.com> 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: William G. Hoffa <wghoffa@us.ibm.com> Reviewed-by: Daniel M. Crowell <dcrowell@us.ibm.com>
Diffstat (limited to 'src/usr/xscom')
-rw-r--r--src/usr/xscom/xscom.C26
1 files changed, 25 insertions, 1 deletions
diff --git a/src/usr/xscom/xscom.C b/src/usr/xscom/xscom.C
index c9afe0273..a28897f8b 100644
--- a/src/usr/xscom/xscom.C
+++ b/src/usr/xscom/xscom.C
@@ -5,7 +5,7 @@
/* */
/* OpenPOWER HostBoot Project */
/* */
-/* Contributors Listed Below - COPYRIGHT 2011,2017 */
+/* Contributors Listed Below - COPYRIGHT 2011,2018 */
/* [+] International Business Machines Corp. */
/* */
/* */
@@ -866,5 +866,29 @@ uint64_t get_master_bar( void )
return mm_virt_to_phys(g_masterProcVirtAddr);
}
+/**
+ * @brief Generate a fully-qualified MMIO address for a physical scom
+ * address, relative to the given processor target
+ */
+uint64_t generate_mmio_addr( TARGETING::Target* i_proc,
+ uint64_t i_scomAddr )
+{
+ uint64_t l_returnAddr = 0;
+
+ // Get the target chip's physical mmio address
+ uint64_t l_XSComBaseAddr =
+ i_proc->getAttr<TARGETING::ATTR_XSCOM_BASE_ADDRESS>();
+
+ // Build the XSCom address (relative to group 0, chip 0)
+ XSComP9Address l_mmioAddr(i_scomAddr);
+
+ // Get the offset
+ uint64_t l_offset = l_mmioAddr.offset();
+
+ // Compute value relative to target chip
+ l_returnAddr = l_XSComBaseAddr + l_offset;
+
+ return l_returnAddr;
+}
} // end namespace
OpenPOWER on IntegriCloud