aboutsummaryrefslogtreecommitdiff
path: root/hdata/spira.h
diff options
context:
space:
mode:
authorNicholas Piggin <npiggin@gmail.com>2023-09-06 20:10:15 +1000
committerReza Arbab <arbab@linux.ibm.com>2023-10-11 15:07:23 -0500
commit306bfe3f7585422f54e8d216866e1a00d290248a (patch)
tree48398c8dcef994c849341ceac1080f274004c6ee /hdata/spira.h
parent15cc5cb569e9afd8633582b0d7ad38ecadc6cea6 (diff)
downloadskiboot-306bfe3f7585422f54e8d216866e1a00d290248a.zip
skiboot-306bfe3f7585422f54e8d216866e1a00d290248a.tar.gz
skiboot-306bfe3f7585422f54e8d216866e1a00d290248a.tar.bz2
hdata: Remove legacy SPIRA structure
skiboot only supports POWER8 > DD1 now, all supported platforms should use the new SPIRA-S/H structure. Signed-off-by: Nicholas Piggin <npiggin@gmail.com> Signed-off-by: Reza Arbab <arbab@linux.ibm.com>
Diffstat (limited to 'hdata/spira.h')
-rw-r--r--hdata/spira.h69
1 files changed, 7 insertions, 62 deletions
diff --git a/hdata/spira.h b/hdata/spira.h
index c0eb2a0..1789de1 100644
--- a/hdata/spira.h
+++ b/hdata/spira.h
@@ -7,16 +7,15 @@
#include "hdif.h"
/*
- * The SPIRA structure
+ * The SPIRA-H and SPIRA-S structures
*
- * NOTE: This is one of the only HDIF structure that we layout entirely
- * as a C struct because it's provided by us to the FSP. Almost everything
- * else is generated by the FSP, and thus must be "parsed" since the various
- * offsets and alignments might change.
+ * SPIRA-H is built in the primary hypervisor (skiboot) lid, pointed to by
+ * the NACA and provides details to the boot firmware.
+ *
+ * SPIRA-S is built at IPL time by the boot firmware at the host data area
+ * location specified in SPIRA-H, and thus must be parsed.
*/
-#define SPIRA_VERSION 0x20 /* Like 730 ? */
-
struct spira_ntuple {
__be64 addr;
__be16 alloc_cnt;
@@ -27,59 +26,6 @@ struct spira_ntuple {
__be64 padding;
} __packed;
-#define SPIRA_NTUPLES_COUNT 0x19
-
-struct spira_ntuples {
- struct HDIF_array_hdr array_hdr;
- struct spira_ntuple sp_subsys; /* 0x040 */
- struct spira_ntuple ipl_parms; /* 0x060 */
- struct spira_ntuple nt_enclosure_vpd; /* 0x080 */
- struct spira_ntuple slca; /* 0x0a0 */
- struct spira_ntuple backplane_vpd; /* 0x0c0 */
- struct spira_ntuple system_vpd; /* 0x0e0 */
- struct spira_ntuple chip_tod; /* 0x100 */
- struct spira_ntuple proc_init; /* 0x120 */
- struct spira_ntuple clock_vpd; /* 0x140 */
- struct spira_ntuple anchor_vpd; /* 0x160 */
- struct spira_ntuple op_panel_vpd; /* 0x180 */
- struct spira_ntuple ext_cache_fru_vpd; /* 0x1a0 */
- struct spira_ntuple misc_cec_fru_vpd; /* 0x1c0 */
- struct spira_ntuple paca; /* 0x1e0 */
- struct spira_ntuple ms_vpd; /* 0x200 */
- struct spira_ntuple cec_iohub_fru; /* 0x220 */
- struct spira_ntuple cpu_ctrl; /* 0x240 */
- struct spira_ntuple mdump_src; /* 0x260 */
- struct spira_ntuple mdump_dst; /* 0x280 */
- struct spira_ntuple mdump_res; /* 0x2a0 */
- struct spira_ntuple heap; /* 0x2c0 */
- struct spira_ntuple pcia; /* 0x2e0 */
- struct spira_ntuple proc_chip; /* 0x300 */
- struct spira_ntuple hs_data; /* 0x320 */
- struct spira_ntuple ipmi_sensor; /* 0x360 */
- struct spira_ntuple node_stb_data; /* 0x380 */
- struct spira_ntuple proc_dump_area; /* 0x400 */
-};
-
-#define SPIRA_RESERVED_BYTES 0x60
-
-struct spira {
- struct HDIF_common_hdr hdr;
- struct HDIF_idata_ptr ntuples_ptr;
- __be64 pad;
- struct spira_ntuples ntuples;
- /*
- * We reserve 0xc0 rather than 0x4c0 so we fit SPIRAH/SPIRAS here
- * while preserving compatibility with existing P8 systems.
- *
- * According to FSP engineers, this is an okay thing to do.
- */
- u8 reserved[SPIRA_RESERVED_BYTES];
-} __packed __align(0x100);
-
-#define SPIRA_ACTUAL_SIZE (sizeof(struct spira) - SPIRA_RESERVED_BYTES)
-
-extern struct spira spira;
-
/* SPIRA-H signature */
#define SPIRAH_HDIF_SIG "SPIRAH"
@@ -152,7 +98,6 @@ struct spiras {
extern struct spiras *skiboot_constant_addr spiras;
-
/* This macro can be used to check the validity of a pointer returned
* by one of the HDIF API functions. It returns true if the pointer
* appears valid. If it's not valid and not NULL, it will print some
@@ -178,7 +123,7 @@ extern struct HDIF_common_hdr *__get_hdif(struct spira_ntuple *n,
be32_to_cpu((_ntuples)->alloc_len)); \
_p = (void *)_p + be32_to_cpu((_ntuples)->alloc_len))
-#define for_each_pcia(p) for_each_ntuple(&spira.ntuples.pcia, p, SPPCIA_HDIF_SIG)
+#define for_each_pcia(p) for_each_ntuple(&spiras->ntuples.pcia, p, SPPCIA_HDIF_SIG)
/* We override these for testing. */
#ifndef ntuple_addr