summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSamuel Mendoza-Jonas <sam@mendozajonas.com>2017-04-27 16:33:32 +1000
committerSamuel Mendoza-Jonas <sam@mendozajonas.com>2017-06-20 15:34:42 +1000
commit722e64564e436a0491563c9f57a49dfee5c50dd9 (patch)
treef8ed81235300c0ab9f72a920e096abca8ee88926
parent18158dcd2e9e78ecf77374153801e01b0187e6ed (diff)
downloadpetitboot-722e64564e436a0491563c9f57a49dfee5c50dd9.zip
petitboot-722e64564e436a0491563c9f57a49dfee5c50dd9.tar.gz
discover/platform-powerpc: Correct aux revision format
The Auxiliary Firmware Revision Information should be displayed as four hexadecimal bytes if a manufacturer-specific format is not known. Update the "Firmware version" format to reflect this. Signed-off-by: Samuel Mendoza-Jonas <sam@mendozajonas.com>
-rw-r--r--discover/platform-powerpc.c15
1 files changed, 8 insertions, 7 deletions
diff --git a/discover/platform-powerpc.c b/discover/platform-powerpc.c
index a0ddd1e..3723ebf 100644
--- a/discover/platform-powerpc.c
+++ b/discover/platform-powerpc.c
@@ -1033,7 +1033,6 @@ static void get_ipmi_bmc_versions(struct platform *p, struct system_info *info)
struct platform_powerpc *platform = p->platform_data;
uint16_t resp_len = 16;
uint8_t resp[16], bcd;
- uint32_t aux_version;
int i, rc;
/* Retrieve info from current side */
@@ -1061,10 +1060,11 @@ static void get_ipmi_bmc_versions(struct platform *p, struct system_info *info)
resp[2]);
bcd = resp[4] & 0x0f;
bcd += 10 * (resp[4] >> 4);
- memcpy(&aux_version, &resp[12], sizeof(aux_version));
+ /* rev1.rev2.aux_revision */
info->bmc_current[2] = talloc_asprintf(info,
- "Firmware version: %u.%02u.%05u",
- resp[3], bcd, aux_version);
+ "Firmware version: %u.%02u.%02x%02x%02x%02x",
+ resp[3], bcd, resp[12],
+ resp[13], resp[14], resp[15]);
bcd = resp[5] & 0x0f;
bcd += 10 * (resp[5] >> 4);
info->bmc_current[3] = talloc_asprintf(info, "IPMI version: %u",
@@ -1099,10 +1099,11 @@ static void get_ipmi_bmc_versions(struct platform *p, struct system_info *info)
resp[2]);
bcd = resp[4] & 0x0f;
bcd += 10 * (resp[4] >> 4);
- memcpy(&aux_version, &resp[12], sizeof(aux_version));
+ /* rev1.rev2.aux_revision */
info->bmc_golden[2] = talloc_asprintf(info,
- "Firmware version: %u.%02u.%u",
- resp[3], bcd, aux_version);
+ "Firmware version: %u.%02u.%02x%02x%02x%02x",
+ resp[3], bcd, resp[12],
+ resp[13], resp[14], resp[15]);
bcd = resp[5] & 0x0f;
bcd += 10 * (resp[5] >> 4);
info->bmc_golden[3] = talloc_asprintf(info, "IPMI version: %u",
OpenPOWER on IntegriCloud