[Skiboot] [PATCH v2 2/4] hdata: Define SPIRA-H and SPIRA-S structure

Vasant Hegde hegdevasant at linux.vnet.ibm.com
Fri Feb 26 02:32:24 AEDT 2016


In latest firwmare the SPIRA is split into two portions, a hypervisor
initialized and managed portion and a service processor (FSP) built portion,
to accommodate secure boot. The hypervisor portion will be referred to as
the SPIRA-H and the FSP portion referred to as the SPIRA-S.

The legacy N-tuples that are no longer being used have been removed. N-tuples
that are initialized by the hypervisor at compile/build time but not modified
by the FSP reside in the SPIRA-H. All other N-tuples reside in the SPIRA-S that
is built dynamically by the FSP at the beginning of that HDAT memory pointed to
by the “Host Data Area” N-tuple in SPIRA-H.

This patch defines new SPIRA-H and SPIRA-S structures.

No functionality change.

Signed-off-by: Vasant Hegde <hegdevasant at linux.vnet.ibm.com>
---
 hdata/spira.h | 65 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 65 insertions(+)

diff --git a/hdata/spira.h b/hdata/spira.h
index a65f579..a38dc19 100644
--- a/hdata/spira.h
+++ b/hdata/spira.h
@@ -80,6 +80,71 @@ struct spira {
 
 extern struct spira spira;
 
+/* SPIRA-H signature */
+#define SPIRAH_HDIF_SIG		"SPIRAH"
+
+/* First version of the secure boot compliant design. */
+#define SPIRAH_VERSION		0x50
+
+/* N-tuples in SPIRAH */
+#define SPIRAH_NTUPLES_COUNT	0x6
+
+struct spirah_ntuples {
+	struct HDIF_array_hdr	array_hdr;	/* 0x030 */
+	struct spira_ntuple	hs_data_area;	/* 0x040 */
+	struct spira_ntuple	proc_init;	/* 0x060 */
+	struct spira_ntuple	cpu_ctrl;	/* 0x080 */
+	struct spira_ntuple	mdump_src;	/* 0x0a0 */
+	struct spira_ntuple	mdump_dst;	/* 0x0c0 */
+	struct spira_ntuple	mdump_res;	/* 0x0e0 */
+};
+
+struct spirah {
+	struct HDIF_common_hdr	hdr;
+	struct HDIF_idata_ptr	ntuples_ptr;
+	__be64			pad;
+	struct spirah_ntuples	ntuples;
+	u8			reserved[0x100];
+} __packed __align(0x100);
+
+/* SPIRA-S signature */
+#define SPIRAS_HDIF_SIG		"SPIRAS"
+
+/* First version on 810 release */
+#define SPIRAS_VERSION		0x40
+
+/* N-tuples in SPIRAS */
+#define SPIRAS_NTUPLES_COUNT	0x10
+
+struct spiras_ntuples {
+	struct HDIF_array_hdr	array_hdr;		/* 0x030 */
+	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	clock_vpd;		/* 0x100 */
+	struct spira_ntuple	anchor_vpd;		/* 0x120 */
+	struct spira_ntuple	op_panel_vpd;		/* 0x140 */
+	struct spira_ntuple	misc_cec_fru_vpd;	/* 0x160 */
+	struct spira_ntuple	ms_vpd;			/* 0x180 */
+	struct spira_ntuple	cec_iohub_fru;		/* 0x1a0 */
+	struct spira_ntuple	pcia;			/* 0x1c0 */
+	struct spira_ntuple	proc_chip;		/* 0x1e0 */
+	struct spira_ntuple	hs_data;		/* 0x200 */
+	struct spira_ntuple	ipmi_sensor;		/* 0x220 */
+} __packed __align(0x100);
+
+struct spiras {
+	struct HDIF_common_hdr	hdr;
+	struct HDIF_idata_ptr	ntuples_ptr;
+	__be64			pad;
+	struct spiras_ntuples	ntuples;
+	u8			reserved[0x1c0];
+} __packed __align(0x100);
+
+
 /* 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
-- 
2.5.0



More information about the Skiboot mailing list