From 24f3312ea1d3d45feca870c7c919bcbd69ef0ff4 Mon Sep 17 00:00:00 2001 From: Jaymes Wilks Date: Fri, 8 Jun 2018 09:00:12 -0500 Subject: HRMOR relative addressing for PHyp SP ATTN area dump This change adds absolute addresses to HDAT for the SP ATTN area that the PHyp team can now use for predictably locating PHyp debug information. In addition, Hostboot now populates attributes with its intended PHyp ATTN area start addresses for FSP to read. Change-Id: I21fbdf672c37462c87705236973b22f9d1d4eba4 CMVC-Prereq: 1059060 CMVC-Prereq: 1058912 CMVC-Prereq: 1059317 RTC:186439 Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/59269 Reviewed-by: Nicholas E. Bofferding Tested-by: Jenkins Server Tested-by: Jenkins OP Build CI Reviewed-by: Michael Baiocchi Tested-by: Jenkins OP HW Tested-by: FSP CI Jenkins Reviewed-by: William G. Hoffa --- src/include/usr/secureboot/service.H | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) (limited to 'src/include/usr/secureboot') diff --git a/src/include/usr/secureboot/service.H b/src/include/usr/secureboot/service.H index cb2829147..3060e9225 100644 --- a/src/include/usr/secureboot/service.H +++ b/src/include/usr/secureboot/service.H @@ -32,6 +32,9 @@ #include #include #include +#include +#include +#include /* * @brief Used to capture the first 4 bytes of the hash for tracing purposes @@ -363,6 +366,20 @@ namespace SECUREBOOT */ errlHndl_t setSbeSecurityMode(uint8_t i_sbeSecurityMode); + /* + * @brief Calculates the node's proposed start address for the system's + * SP ATTN areas, which becomes the effective configuration if it's + * elected as the master. + * + * @return uint64_t Absolute start address for the intended SP ATTN areas + */ + inline uint64_t calcSpAttnAreaStart() + { + auto hrmorVal = cpu_spr_value(CPU_SPR_HRMOR); + return (hrmorVal - VMM_HRMOR_OFFSET + PHYP_ATTN_AREA_OFFSET) + | VmmManager::FORCE_PHYS_ADDR; + } + } #endif -- cgit v1.2.3