aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--hdata/spira.c4
-rw-r--r--hw/fsp/fsp-mdst-table.c22
-rw-r--r--include/fsp-mdst-table.h6
3 files changed, 16 insertions, 16 deletions
diff --git a/hdata/spira.c b/hdata/spira.c
index 39a78e8..45c282c 100644
--- a/hdata/spira.c
+++ b/hdata/spira.c
@@ -61,12 +61,12 @@ __section(".procin.data") struct proc_init_data proc_init_data = {
__section(".mdst.data") struct dump_mdst_table init_mdst_table[2] = {
{
.addr = CPU_TO_BE64(INMEM_CON_START | ADDR_TOP_BIT),
- .type = CPU_TO_BE32(DUMP_SECTION_CONSOLE),
+ .type = CPU_TO_BE32(DUMP_REGION_CONSOLE),
.size = CPU_TO_BE32(INMEM_CON_LEN),
},
{
.addr = CPU_TO_BE64(HBRT_CON_START | ADDR_TOP_BIT),
- .type = CPU_TO_BE32(DUMP_SECTION_HBRT_LOG),
+ .type = CPU_TO_BE32(DUMP_REGION_HBRT_LOG),
.size = CPU_TO_BE32(HBRT_CON_LEN),
},
};
diff --git a/hw/fsp/fsp-mdst-table.c b/hw/fsp/fsp-mdst-table.c
index 5b29948..5dbe531 100644
--- a/hw/fsp/fsp-mdst-table.c
+++ b/hw/fsp/fsp-mdst-table.c
@@ -122,7 +122,7 @@ static int64_t fsp_update_mdst_table(void)
}
/* Add entry to MDST table */
-static int __mdst_table_add_entry(void *addr, uint32_t type, uint32_t size)
+static int __dump_region_add_entry(uint32_t id, void *addr, uint32_t size)
{
int rc = OPAL_INTERNAL_ERROR;
@@ -147,8 +147,8 @@ static int __mdst_table_add_entry(void *addr, uint32_t type, uint32_t size)
fsp_tce_map(PSI_DMA_HYP_DUMP + cur_dump_size, addr, ALIGN_UP(size, TCE_PSIZE));
/* Add entry to MDST table */
+ mdst_table[cur_mdst_entry].type = id;
mdst_table[cur_mdst_entry].addr = PSI_DMA_HYP_DUMP + cur_dump_size;
- mdst_table[cur_mdst_entry].type = type;
mdst_table[cur_mdst_entry].size = size;
/* Update MDST count and dump size */
@@ -165,19 +165,19 @@ out:
return rc;
}
-static int mdst_table_add_entries(void)
+static int dump_region_add_entries(void)
{
int rc;
/* Add console buffer */
- rc = __mdst_table_add_entry((void *)INMEM_CON_START,
- DUMP_SECTION_CONSOLE, INMEM_CON_LEN);
+ rc = __dump_region_add_entry(DUMP_REGION_CONSOLE,
+ (void *)INMEM_CON_START, INMEM_CON_LEN);
if (rc)
return rc;
/* Add HBRT buffer */
- rc = __mdst_table_add_entry((void *)HBRT_CON_START,
- DUMP_SECTION_HBRT_LOG, HBRT_CON_LEN);
+ rc = __dump_region_add_entry(DUMP_REGION_HBRT_LOG,
+ (void *)HBRT_CON_START, HBRT_CON_LEN);
return rc;
}
@@ -191,9 +191,6 @@ static inline void mdst_table_tce_map(void)
/* Initialize MDST table */
static int mdst_table_init(void)
{
- max_mdst_entry = PSI_DMA_MDST_TABLE_SIZE / sizeof(*mdst_table);
- printf("MDST: Max entries in MDST table : %d\n", max_mdst_entry);
-
mdst_table = memalign(TCE_PSIZE, PSI_DMA_MDST_TABLE_SIZE);
if (!mdst_table) {
log_simple_error(&e_info(OPAL_RC_DUMP_MDST_INIT),
@@ -204,6 +201,9 @@ static int mdst_table_init(void)
memset(mdst_table, 0, PSI_DMA_MDST_TABLE_SIZE);
mdst_table_tce_map();
+ max_mdst_entry = PSI_DMA_MDST_TABLE_SIZE / sizeof(*mdst_table);
+ printf("MDST: Max entries in MDST table : %d\n", max_mdst_entry);
+
return OPAL_SUCCESS;
}
@@ -244,7 +244,7 @@ void fsp_mdst_table_init(void)
* Ignore return code from mdst_table_add_entries so that
* we can atleast capture partial dump.
*/
- mdst_table_add_entries();
+ dump_region_add_entries();
fsp_update_mdst_table();
/* Register for Class AA (FSP R/R) */
diff --git a/include/fsp-mdst-table.h b/include/fsp-mdst-table.h
index ae2ef12..78ab276 100644
--- a/include/fsp-mdst-table.h
+++ b/include/fsp-mdst-table.h
@@ -18,9 +18,9 @@
#ifndef __FSPMDST_H
#define __FSPMDST_H
-/* Dump section type */
-#define DUMP_SECTION_CONSOLE 0x01
-#define DUMP_SECTION_HBRT_LOG 0x02
+/* Dump region ids */
+#define DUMP_REGION_CONSOLE 0x01
+#define DUMP_REGION_HBRT_LOG 0x02
/*
* Sapphire Memory Dump Source Table