[Skiboot] [RFC PATCH V2 1/4] hdata/vpd: Reorganize VPD code

Ananth N Mavinakayanahalli ananth at linux.vnet.ibm.com
Tue Feb 28 20:02:47 AEDT 2017


To make it convenient to add OpenPOWER platform support. No change in
functionality.

This series is just a preliminary RFC -- untested on real hardware. Some
of the OP HDAT/VPD updates aren't part of the firmware yet, based on the
latest HDAT blob from a Witherspoon.

Signed-off-by: Ananth N Mavinakayanahalli <ananth at linux.vnet.ibm.com>
---
 hdata/vpd.c |   13 ++++++++-----
 1 file changed, 8 insertions(+), 5 deletions(-)

diff --git a/hdata/vpd.c b/hdata/vpd.c
index c61621d..4c787c6 100644
--- a/hdata/vpd.c
+++ b/hdata/vpd.c
@@ -23,6 +23,8 @@
 #include "hdata.h"
 #include <inttypes.h>
 
+static bool op_platform;
+
 struct card_info {
 	const char *ccin; 	/* Customer card identification number */
 	const char *description;
@@ -571,9 +573,10 @@ static void sysvpd_parse(void)
 	}
 
 	/* Look for the new OpenPower "OSYS" first */
-	if (vpd_find_record(sysvpd, sysvpd_sz, "OSYS", NULL))
+	if (vpd_find_record(sysvpd, sysvpd_sz, "OSYS", NULL)) {
+		op_platform = true;
 		sysvpd_parse_opp(sysvpd, sysvpd_sz);
-	else
+	} else
 		sysvpd_parse_legacy(sysvpd, sysvpd_sz);
 }
 
@@ -651,15 +654,15 @@ void vpd_parse(void)
 {
 	const struct HDIF_common_hdr *fruvpd_hdr;
 
+	/* System VPD uses the VSYS record, so its special */
+	sysvpd_parse();
+
 	/* Enclosure */
 	_vpd_parse(spira.ntuples.nt_enclosure_vpd);
 
 	/* Backplane */
 	_vpd_parse(spira.ntuples.backplane_vpd);
 
-	/* System VPD uses the VSYS record, so its special */
-	sysvpd_parse();
-
 	/* clock card -- does this use the FRUVPD sig? */
 	_vpd_parse(spira.ntuples.clock_vpd);
 



More information about the Skiboot mailing list