diff options
author | Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com> | 2017-02-20 04:10:49 +0100 |
---|---|---|
committer | Sascha Hauer <s.hauer@pengutronix.de> | 2017-03-09 07:36:14 +0100 |
commit | 563b43d11febf94979c1f8948a8010962f9ecf43 (patch) | |
tree | 165f157255684df18fd5025ad154e9124e008ab6 /drivers/efi | |
parent | 83c9ce1dbc41f9e1d609a3047c9a035168cdf22f (diff) | |
download | barebox-563b43d11febf94979c1f8948a8010962f9ecf43.tar.gz barebox-563b43d11febf94979c1f8948a8010962f9ecf43.tar.xz |
efi: add minor and major to the bus and display it at boot
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'drivers/efi')
-rw-r--r-- | drivers/efi/efi-device.c | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/drivers/efi/efi-device.c b/drivers/efi/efi-device.c index 7eb94de455..1877794c6c 100644 --- a/drivers/efi/efi-device.c +++ b/drivers/efi/efi-device.c @@ -357,13 +357,22 @@ static void efi_businfo(struct device_d *dev) static int efi_init_devices(void) { char *fw_vendor = NULL; + u16 sys_major = efi_sys_table->hdr.revision >> 16; + u16 sys_minor = efi_sys_table->hdr.revision & 0xffff; + + fw_vendor = strdup_wchar_to_char((const wchar_t *)efi_sys_table->fw_vendor); + + pr_info("EFI v%u.%.02u by %s v%u\n", + sys_major, sys_minor, + fw_vendor, efi_sys_table->fw_revision); bus_register(&efi_bus); - fw_vendor = strdup_wchar_to_char((const wchar_t *)efi_sys_table->fw_vendor); dev_add_param_fixed(efi_bus.dev, "fw_vendor", fw_vendor); free(fw_vendor); + dev_add_param_int_ro(efi_bus.dev, "major", sys_major, "%u"); + dev_add_param_int_ro(efi_bus.dev, "minor", sys_minor, "%u"); dev_add_param_int_ro(efi_bus.dev, "fw_revision", efi_sys_table->fw_revision, "%u"); efi_bus.dev->info = efi_businfo; |