aboutsummaryrefslogtreecommitdiff
path: root/hdata
diff options
context:
space:
mode:
authorOliver O'Halloran <oohall@gmail.com>2017-04-20 11:41:10 +1000
committerStewart Smith <stewart@linux.vnet.ibm.com>2017-05-03 16:47:31 +1000
commit44790c6f751935682e739b243cd9e36c0dcbf144 (patch)
treee4c15157c73b080ab21f574cea62b4e1e063d5bb /hdata
parent78d47ae53ba7be3a7747b1321329a17ebe3a24a2 (diff)
downloadskiboot-44790c6f751935682e739b243cd9e36c0dcbf144.zip
skiboot-44790c6f751935682e739b243cd9e36c0dcbf144.tar.gz
skiboot-44790c6f751935682e739b243cd9e36c0dcbf144.tar.bz2
hdata: indicate when booted with elevated risk level
When the system is IPLed with an elevated risk level Hostboot will set a flag in the IPL parameters structure. Parse and export this in the device tree at: /ipl-params/sys-params/elevated-risk-level Cc: Adrian Barrera <abarrera@us.ibm.com> Signed-off-by: Oliver O'Halloran <oohall@gmail.com> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
Diffstat (limited to 'hdata')
-rw-r--r--hdata/spira.c5
-rw-r--r--hdata/spira.h1
2 files changed, 6 insertions, 0 deletions
diff --git a/hdata/spira.c b/hdata/spira.c
index 46dd1ab..fd7f351 100644
--- a/hdata/spira.c
+++ b/hdata/spira.c
@@ -812,6 +812,7 @@ static void add_iplparams_sys_params(const void *iplp, struct dt_node *node)
const struct HDIF_common_hdr *hdif = iplp;
u16 version = be16_to_cpu(hdif->version);
const char *vendor = NULL;
+ u32 sys_attributes;
p = HDIF_get_idata(iplp, IPLPARAMS_SYSPARAMS, NULL);
if (!CHECK_SPPTR(p)) {
@@ -887,6 +888,10 @@ static void add_iplparams_sys_params(const void *iplp, struct dt_node *node)
vendor = "IBM";
dt_add_property_string(dt_root, "vendor", vendor);
+
+ sys_attributes = be32_to_cpu(p->sys_attributes);
+ if (sys_attributes & SYS_ATTR_RISK_LEVEL)
+ dt_add_property(node, "elevated-risk-level", NULL, 0);
}
static void add_iplparams_ipl_params(const void *iplp, struct dt_node *node)
diff --git a/hdata/spira.h b/hdata/spira.h
index 01adf8a..abf5da8 100644
--- a/hdata/spira.h
+++ b/hdata/spira.h
@@ -353,6 +353,7 @@ struct iplparams_sysparams {
__be32 abc_bus_speed;
__be32 wxyz_bus_speed;
__be32 sys_eco_mode;
+#define SYS_ATTR_RISK_LEVEL PPC_BIT32(3)
__be32 sys_attributes;
__be32 mem_scrubbing;
__be16 cur_spl_value;