[Skiboot] [RFC PATCH V2 4/4] hdata: Add additional SP information
Ananth N Mavinakayanahalli
ananth at linux.vnet.ibm.com
Tue Feb 28 20:03:58 AEDT 2017
... obtained from HDAT.
Signed-off-by: Ananth N Mavinakayanahalli <ananth at linux.vnet.ibm.com>
---
hdata/fsp.c | 8 ++++++--
hdata/spira.h | 1 +
2 files changed, 7 insertions(+), 2 deletions(-)
diff --git a/hdata/fsp.c b/hdata/fsp.c
index 998724b..4823aff 100644
--- a/hdata/fsp.c
+++ b/hdata/fsp.c
@@ -39,12 +39,12 @@ static enum sp_type find_service_proc_type(const struct HDIF_common_hdr *spss,
int index)
{
const struct spss_sp_impl *sp_impl;
- int hw_ver, sw_ver, flags;
+ unsigned int hw_ver, sw_ver, flags, size;
enum sp_type sp_type;
bool functional, installed;
/* Find an check the SP Implementation structure */
- sp_impl = HDIF_get_idata(spss, SPSS_IDATA_SP_IMPL, NULL);
+ sp_impl = HDIF_get_idata(spss, SPSS_IDATA_SP_IMPL, &size);
if (!CHECK_SPPTR(sp_impl)) {
prerror("SP #%d: SPSS/SP_Implementation not found !\n", index);
return SP_BAD;
@@ -85,6 +85,10 @@ static enum sp_type find_service_proc_type(const struct HDIF_common_hdr *spss,
sp_impl->chip_version >> 4,
sp_impl->chip_version & 0xf);
+ /* Check if SPINFO has additional SP information and print */
+ if (size > 8)
+ prlog(PR_INFO, "SP Family is %s\n", sp_impl->sp_family);
+
return sp_type;
}
diff --git a/hdata/spira.h b/hdata/spira.h
index 01ce4cb..a9338ee 100644
--- a/hdata/spira.h
+++ b/hdata/spira.h
@@ -262,6 +262,7 @@ struct spss_sp_impl {
#define SPSS_SP_IMPL_FLAGS_PRIMARY 0x2000
u8 chip_version;
u8 reserved;
+ u8 sp_family[64];
};
/* Idata index 3 is deprecated */
More information about the Skiboot
mailing list