[PATCH 10/12] efi: add minor and major to the bus and display it at boot

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@xxxxxxxxxxxx>
---
 drivers/efi/efi-device.c | 11 ++++++++++-
 1 file changed, 10 insertions(+), 1 deletion(-)

diff --git a/drivers/efi/efi-device.c b/drivers/efi/efi-device.c
index 7eb94de45..1877794c6 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;
-- 
2.11.0


_______________________________________________
barebox mailing list
barebox@xxxxxxxxxxxxxxxxxxx
http://lists.infradead.org/mailman/listinfo/barebox



[Index of Archives]     [Linux Embedded]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux