Skip to content

Commit 306bfe3

Browse files
npigginrarbab
authored andcommitted
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 <[email protected]> Signed-off-by: Reza Arbab <[email protected]>
1 parent 15cc5cb commit 306bfe3

15 files changed

+101
-284
lines changed

hdata/fsp.c

+6-6
Original file line numberDiff line numberDiff line change
@@ -282,7 +282,7 @@ static void add_chip_id_to_sensors(struct dt_node *sensor_node, uint32_t slca_in
282282
return;
283283
}
284284

285-
for_each_ntuple_idx(&spira.ntuples.proc_chip, hdif, i, SPPCRD_HDIF_SIG) {
285+
for_each_ntuple_idx(&spiras->ntuples.proc_chip, hdif, i, SPPCRD_HDIF_SIG) {
286286
fru_id = HDIF_get_idata(hdif, SPPCRD_IDATA_FRU_ID, NULL);
287287
if (!fru_id)
288288
return;
@@ -309,7 +309,7 @@ static void add_ipmi_sensors(struct dt_node *bmc_node)
309309
const struct ipmi_sensors *ipmi_sensors;
310310
struct dt_node *sensors_node, *sensor_node;
311311

312-
hdif_sensor = get_hdif(&spira.ntuples.ipmi_sensor, IPMI_SENSORS_HDIF_SIG);
312+
hdif_sensor = get_hdif(&spiras->ntuples.ipmi_sensor, IPMI_SENSORS_HDIF_SIG);
313313
if (!hdif_sensor) {
314314
prlog(PR_DEBUG, "SENSORS: Missing IPMI sensors mappings tuple\n");
315315
return;
@@ -498,11 +498,11 @@ void bmc_parse(void)
498498
const void *sp;
499499
int i;
500500

501-
sp = get_hdif(&spira.ntuples.sp_subsys, SPSS_HDIF_SIG);
501+
sp = get_hdif(&spiras->ntuples.sp_subsys, SPSS_HDIF_SIG);
502502
if (!sp)
503503
return;
504504

505-
for_each_ntuple_idx(&spira.ntuples.sp_subsys, sp, i, SPSS_HDIF_SIG) {
505+
for_each_ntuple_idx(&spiras->ntuples.sp_subsys, sp, i, SPSS_HDIF_SIG) {
506506
if (find_service_proc_type(sp, i) == SP_BMC) {
507507
bmc_create_node(sp);
508508
found = true;
@@ -520,13 +520,13 @@ void fsp_parse(void)
520520
int index;
521521

522522
/* Find SPSS tuple in SPIRA */
523-
sp = get_hdif(&spira.ntuples.sp_subsys, SPSS_HDIF_SIG);
523+
sp = get_hdif(&spiras->ntuples.sp_subsys, SPSS_HDIF_SIG);
524524
if (!sp) {
525525
prlog(PR_WARNING, "HDAT: No FSP/BMC found!\n");
526526
return;
527527
}
528528

529-
for_each_ntuple_idx(&spira.ntuples.sp_subsys, sp, index, SPSS_HDIF_SIG) {
529+
for_each_ntuple_idx(&spiras->ntuples.sp_subsys, sp, index, SPSS_HDIF_SIG) {
530530
switch (find_service_proc_type(sp, index)) {
531531
case SP_FSP:
532532
if (!fsp_root) {

hdata/iohub.c

+2-2
Original file line numberDiff line numberDiff line change
@@ -868,7 +868,7 @@ void io_parse(void)
868868
unsigned int i, size;
869869

870870
/* Look for IO Hubs */
871-
if (!get_hdif(&spira.ntuples.cec_iohub_fru, "IO HUB")) {
871+
if (!get_hdif(&spiras->ntuples.cec_iohub_fru, "IO HUB")) {
872872
prerror("CEC: Cannot locate IO Hub FRU data !\n");
873873
return;
874874
}
@@ -881,7 +881,7 @@ void io_parse(void)
881881
* increment it for each chip. Works for the machines I have here
882882
*/
883883

884-
for_each_ntuple_idx(&spira.ntuples.cec_iohub_fru, sp_iohubs, i,
884+
for_each_ntuple_idx(&spiras->ntuples.cec_iohub_fru, sp_iohubs, i,
885885
CECHUB_FRU_HDIF_SIG) {
886886
const struct cechub_hub_fru_id *fru_id_data;
887887
unsigned int type;

hdata/memory.c

+4-4
Original file line numberDiff line numberDiff line change
@@ -236,7 +236,7 @@ static void add_bus_freq_to_ram_area(struct dt_node *ram_node, u32 chip_id)
236236
u64 freq;
237237
u32 size;
238238

239-
pcia = get_hdif(&spira.ntuples.pcia, SPPCIA_HDIF_SIG);
239+
pcia = get_hdif(&spiras->ntuples.pcia, SPPCIA_HDIF_SIG);
240240
if (!pcia) {
241241
prlog(PR_WARNING, "HDAT: Failed to add memory bus frequency "
242242
"as PCIA does not exist\n");
@@ -897,15 +897,15 @@ static bool __memory_parse(struct dt_node *root)
897897
const struct msvpd_total_config_ms *tcms;
898898
unsigned int size;
899899

900-
ms_vpd = get_hdif(&spira.ntuples.ms_vpd, MSVPD_HDIF_SIG);
900+
ms_vpd = get_hdif(&spiras->ntuples.ms_vpd, MSVPD_HDIF_SIG);
901901
if (!ms_vpd) {
902902
prerror("MS VPD: invalid\n");
903903
op_display(OP_FATAL, OP_MOD_MEM, 0x0000);
904904
return false;
905905
}
906-
if (be32_to_cpu(spira.ntuples.ms_vpd.act_len) < sizeof(*ms_vpd)) {
906+
if (be32_to_cpu(spiras->ntuples.ms_vpd.act_len) < sizeof(*ms_vpd)) {
907907
prerror("MS VPD: invalid size %u\n",
908-
be32_to_cpu(spira.ntuples.ms_vpd.act_len));
908+
be32_to_cpu(spiras->ntuples.ms_vpd.act_len));
909909
op_display(OP_FATAL, OP_MOD_MEM, 0x0001);
910910
return false;
911911
}

hdata/naca.c

+2-2
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,9 @@
99
__section(".naca.data") struct naca naca = {
1010
.spirah_addr = CPU_TO_BE64(SPIRAH_OFF),
1111
.hv_release_data_addr = CPU_TO_BE64(NACA_OFF + offsetof(struct naca, hv_release_data)),
12-
.spira_addr = CPU_TO_BE64(SPIRA_OFF),
12+
.spira_addr = 0,
1313
.lid_table_addr = CPU_TO_BE64(NACA_OFF + offsetof(struct naca, hv_lid_load_table)),
14-
.spira_size = CPU_TO_BE32(SPIRA_ACTUAL_SIZE),
14+
.spira_size = 0,
1515
.hv_load_map_addr = 0,
1616
.attn_enabled = 0,
1717
.pcia_supported = 1,

hdata/pcia.c

+3-3
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,8 @@
1515

1616
static unsigned int pcia_index(const void *pcia)
1717
{
18-
return (pcia - (void *)get_hdif(&spira.ntuples.pcia, "SPPCIA"))
19-
/ be32_to_cpu(spira.ntuples.pcia.alloc_len);
18+
return (pcia - (void *)get_hdif(&spiras->ntuples.pcia, "SPPCIA"))
19+
/ be32_to_cpu(spiras->ntuples.pcia.alloc_len);
2020
}
2121

2222
static const struct sppcia_cpu_thread *find_tada(const void *pcia,
@@ -180,7 +180,7 @@ bool pcia_parse(void)
180180
const void *pcia;
181181
struct dt_node *cpus;
182182

183-
pcia = get_hdif(&spira.ntuples.pcia, "SPPCIA");
183+
pcia = get_hdif(&spiras->ntuples.pcia, "SPPCIA");
184184
if (!pcia)
185185
return false;
186186

hdata/slca.c

+2-2
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ const struct slca_entry *slca_get_entry(uint16_t slca_index)
1313
struct HDIF_common_hdr *slca_hdr;
1414
int count;
1515

16-
slca_hdr = get_hdif(&spira.ntuples.slca, SLCA_HDIF_SIG);
16+
slca_hdr = get_hdif(&spiras->ntuples.slca, SLCA_HDIF_SIG);
1717
if (!slca_hdr) {
1818
prerror("SLCA Invalid\n");
1919
return NULL;
@@ -89,7 +89,7 @@ static const struct slca_entry *slca_get_sai_entry(void)
8989
struct HDIF_common_hdr *slca_hdr;
9090
uint16_t sai_fru_id = SLCA_SAI_INDICATOR_ID;
9191

92-
slca_hdr = get_hdif(&spira.ntuples.slca, SLCA_HDIF_SIG);
92+
slca_hdr = get_hdif(&spiras->ntuples.slca, SLCA_HDIF_SIG);
9393
if (!slca_hdr) {
9494
prerror("SLCA Invalid\n");
9595
return NULL;

0 commit comments

Comments
 (0)