[Skiboot] [PATCH 06/10] capi: Add CAPI microcode read to load_resource()
Michael Neuling
mikey at neuling.org
Thu Feb 12 12:57:55 AEDT 2015
Add ability to read CAPI microcode to load_resource() implementations. We use
the cfam chipid as the subid.
FSP load_resource() contains a map of cfam chipid to lid numbers.
PNOR load_resource() doesn't change, but requires a properly formatted
partition with EC values in the TOC matching the appropriate cfam chipid.
Signed-off-by: Michael Neuling <mikey at neuling.org>
---
hw/fsp/fsp.c | 9 +++++++++
include/platform.h | 1 +
platforms/astbmc/pnor.c | 1 +
3 files changed, 11 insertions(+)
diff --git a/hw/fsp/fsp.c b/hw/fsp/fsp.c
index da68eef..b0e6454 100644
--- a/hw/fsp/fsp.c
+++ b/hw/fsp/fsp.c
@@ -2245,6 +2245,11 @@ int fsp_fetch_data_queue(uint8_t flags, uint16_t id, uint32_t sub_id,
return OPAL_SUCCESS;
}
+#define CAPP_IDX_VENICE_DD10 0x100ea
+#define CAPP_IDX_VENICE_DD20 0x200ea
+#define CAPP_IDX_MURANO_DD20 0x200ef
+#define CAPP_IDX_MURANO_DD21 0x201ef
+
static struct {
enum resource_id id;
uint32_t idx;
@@ -2252,6 +2257,10 @@ static struct {
} fsp_lid_map[] = {
{ RESOURCE_ID_KERNEL, RESOURCE_SUBID_NONE, KERNEL_LID_OPAL },
{ RESOURCE_ID_INITRAMFS,RESOURCE_SUBID_NONE, INITRAMFS_LID_OPAL },
+ { RESOURCE_ID_CAPP, CAPP_IDX_MURANO_DD20, 0x80a02002 },
+ { RESOURCE_ID_CAPP, CAPP_IDX_MURANO_DD21, 0x80a02001 },
+ { RESOURCE_ID_CAPP, CAPP_IDX_VENICE_DD10, 0x80a02003 },
+ { RESOURCE_ID_CAPP, CAPP_IDX_VENICE_DD20, 0x80a02004 },
};
bool fsp_load_resource(enum resource_id id, uint32_t idx,
diff --git a/include/platform.h b/include/platform.h
index 690772e..9c40251 100644
--- a/include/platform.h
+++ b/include/platform.h
@@ -25,6 +25,7 @@ struct errorlog;
enum resource_id {
RESOURCE_ID_KERNEL,
RESOURCE_ID_INITRAMFS,
+ RESOURCE_ID_CAPP,
};
#define RESOURCE_SUBID_NONE 0
#define RESOURCE_SUBID_SUPPORTED 1
diff --git a/platforms/astbmc/pnor.c b/platforms/astbmc/pnor.c
index c566877..ebe4350 100644
--- a/platforms/astbmc/pnor.c
+++ b/platforms/astbmc/pnor.c
@@ -91,6 +91,7 @@ static struct {
} part_name_map[] = {
{ RESOURCE_ID_KERNEL, RESOURCE_SUBID_NONE, "KERNEL" },
{ RESOURCE_ID_INITRAMFS,RESOURCE_SUBID_NONE, "ROOTFS" },
+ { RESOURCE_ID_CAPP, RESOURCE_SUBID_SUPPORTED, "CAPP" },
};
/* This mimics the hostboot SBE format */
--
2.1.0
More information about the Skiboot
mailing list