diff options
author | Samuel Mendoza-Jonas <sam.mj@au1.ibm.com> | 2015-12-09 10:32:41 +1100 |
---|---|---|
committer | Sam Mendoza-Jonas <sam@mendozajonas.com> | 2016-02-09 13:40:15 +1100 |
commit | d974c3c39237c8e94bb3a51d3511d18dea01043e (patch) | |
tree | b20a31ea0911c0d6cd1c6340620ecdf78ab9c0e6 /discover/platform-powerpc.c | |
parent | aaeba8e515e6b3416718b7feac985f01fb948b8f (diff) | |
download | petitboot-d974c3c39237c8e94bb3a51d3511d18dea01043e.zip petitboot-d974c3c39237c8e94bb3a51d3511d18dea01043e.tar.gz |
Display VERSION partition info on BMC machines
On supported platforms read the VERSION partition on startup and display
the available versions strings in the System Information screen.
This adds a skeleton hostboot.c to support possible additional BMC
platform support.
Signed-off-by: Sam Mendoza-Jonas <sam@mendozajonas.com>
Diffstat (limited to 'discover/platform-powerpc.c')
-rw-r--r-- | discover/platform-powerpc.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/discover/platform-powerpc.c b/discover/platform-powerpc.c index 992123e..46f81d2 100644 --- a/discover/platform-powerpc.c +++ b/discover/platform-powerpc.c @@ -14,7 +14,9 @@ #include <list/list.h> #include <log/log.h> #include <process/process.h> +#include <types/types.h> +#include "hostboot.h" #include "platform.h" #include "ipmi.h" #include "dt.h" @@ -43,6 +45,7 @@ struct platform_powerpc { bool persistent); int (*set_os_boot_sensor)( struct platform_powerpc *platform); + void (*get_platform_versions)(struct system_info *info); }; static const char *known_params[] = { @@ -1094,6 +1097,9 @@ static int get_sysinfo(struct platform *p, struct system_info *sysinfo) if (platform->ipmi) get_ipmi_bmc_mac(p, sysinfo->bmc_mac); + if (platform->get_platform_versions) + platform->get_platform_versions(sysinfo); + return 0; } @@ -1131,6 +1137,10 @@ static bool probe(struct platform *p, void *ctx) pb_log("platform: no IPMI parameter support\n"); } + rc = stat("/proc/device-tree/bmc", &statbuf); + if (!rc) + platform->get_platform_versions = hostboot_load_versions; + return true; } |