diff options
| author | Jaymes Wilks <mjwilks@us.ibm.com> | 2018-06-08 09:00:12 -0500 |
|---|---|---|
| committer | William G. Hoffa <wghoffa@us.ibm.com> | 2018-06-21 15:52:02 -0400 |
| commit | 24f3312ea1d3d45feca870c7c919bcbd69ef0ff4 (patch) | |
| tree | 120b1a9a38c0002f33de17d070cce41070c6c2f0 /src/include/usr | |
| parent | ccf2f3445e15a93f06528c5f077c34e5abce548b (diff) | |
| download | blackbird-hostboot-24f3312ea1d3d45feca870c7c919bcbd69ef0ff4.tar.gz blackbird-hostboot-24f3312ea1d3d45feca870c7c919bcbd69ef0ff4.zip | |
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 <bofferdn@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>
Reviewed-by: Michael Baiocchi <mbaiocch@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>
Diffstat (limited to 'src/include/usr')
| -rw-r--r-- | src/include/usr/runtime/runtime.H | 4 | ||||
| -rw-r--r-- | src/include/usr/runtime/runtime_reasoncodes.H | 3 | ||||
| -rw-r--r-- | src/include/usr/secureboot/service.H | 17 | ||||
| -rw-r--r-- | src/include/usr/vmmconst.h | 5 |
4 files changed, 29 insertions, 0 deletions
diff --git a/src/include/usr/runtime/runtime.H b/src/include/usr/runtime/runtime.H index 5ae784b74..3ac97e81a 100644 --- a/src/include/usr/runtime/runtime.H +++ b/src/include/usr/runtime/runtime.H @@ -31,6 +31,7 @@ #include <errl/errlentry.H> #include <hdat/hdat.H> #include "../../../src/usr/runtime/hdatstructs.H" +#include <vmmconst.h> namespace RUNTIME { @@ -237,6 +238,9 @@ enum SbeUnsecureMemoryRegions SP_HOST_UNTRUSTED_COMM_AREA_SIZE = 64*MEGABYTE, SP_HOST_UNTRUSTED_OPAL_TRACE_ADDR = 0x31000000, SP_HOST_UNTRUSTED_OPAL_TRACE_SIZE = 1*MEGABYTE, + + SP_HOST_ATTN_SIZE_LIMIT = (SP_HOST_UNTRUSTED_COMM_AREA_SIZE + - PHYP_ATTN_AREA_OFFSET), }; /** diff --git a/src/include/usr/runtime/runtime_reasoncodes.H b/src/include/usr/runtime/runtime_reasoncodes.H index 3dd2fc01e..79ebe37a8 100644 --- a/src/include/usr/runtime/runtime_reasoncodes.H +++ b/src/include/usr/runtime/runtime_reasoncodes.H @@ -65,6 +65,7 @@ namespace RUNTIME MOD_RT_ATTR_SYNC_REQUEST = 0x25, /**< rt_fwnotify.C */ MOD_CHECK_HB_RES_MEM_LIMIT = 0x26, /**< populate_hbruntime.C */ MOD_INIT_RT_RES_MEM_TRACE_BUF = 0x27, /**< rt_rsvdtracebuffer.C */ + MOD_OPEN_UNTRUSTED_SP_AREAS = 0x28, /**< populate_hbruntime.C */ }; enum RuntimeReasonCode @@ -135,6 +136,8 @@ namespace RUNTIME RC_HOST_TIMER_THREAD_FAIL = RUNTIME_COMP_ID | 0x3F, RC_RT_RES_TRACE_BUF_DUMPED = RUNTIME_COMP_ID | 0x40, RC_RT_RES_TRACE_BUF_INVALID = RUNTIME_COMP_ID | 0x41, + RC_SP_ATTN_AREA_OVERFLOW = RUNTIME_COMP_ID | 0x42, + RC_SP_ATTN_AREA1_SIZE_OVERFLOW = RUNTIME_COMP_ID | 0x43, }; enum UserDetailsTypes 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 <cstdint> #include <securerom/sha512.H> #include <securerom/ROM.H> +#include <vmmconst.h> +#include <sys/misc.h> +#include <kernel/vmmmgr.H> /* * @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 diff --git a/src/include/usr/vmmconst.h b/src/include/usr/vmmconst.h index 5da954974..177802bab 100644 --- a/src/include/usr/vmmconst.h +++ b/src/include/usr/vmmconst.h @@ -144,6 +144,11 @@ enum BlockPriority #define VMM_HRMOR_OFFSET (128*MEGABYTE) #define VMM_HB_RSV_MEM_SIZE (256*MEGABYTE) +/** PHYP ATTN AREA OFFSET */ +/** This offset is relative to the lowest address in a given node */ +#define PHYP_ATTN_AREA_OFFSET (59*MEGABYTE) +#define PHYP_ATTN_AREA_1_SIZE (1*KILOBYTE) + /** Hardwired offsets from HRMOR to HOMER images in real mem */ /** HOMER starts immediately after our HB memory */ /** <n0p0 HRMOR = 128MB> + <memory size = 64MB> = 192 MB */ |

