diff options
author | Tom Rini <trini@konsulko.com> | 2024-10-09 16:58:42 -0600 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2024-10-09 22:04:56 -0600 |
commit | 1ff60b1f0a0973b5acda21232262f6745491e5af (patch) | |
tree | 84e785eb54ca23b131931569558e6ad7d42c5a20 /lib/efi_loader/helloworld.c | |
parent | 93b9cd792089e536f2bfa85d9903fd4798209f76 (diff) | |
parent | 5ba825194aa0e04fbd07da6f618c37d9934f4f2d (diff) |
Merge tag 'efi-2025-01-rc1' of https://source.denx.de/u-boot/custodians/u-boot-efi
Pull request efi-2025-01-rc1
Documentation:
* Move the generic memory-documentation to doc/
* Fix typo boormethod
UEFI:
* Delete rng-seed if having EFI RNG protocol
* Don't call restart_uboot in EFI watchdog test
* Simplify building EFI binaries in Makefile
* Show FirmwareVendor and FirmwareRevision in helloworld
* Add debug output for efi bootmeth
Other:
* CONFIG_CMD_CLK should depend on CONFIG_CLK
* simplify clk command
* enable clk command on the sandbox
Diffstat (limited to 'lib/efi_loader/helloworld.c')
-rw-r--r-- | lib/efi_loader/helloworld.c | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/lib/efi_loader/helloworld.c b/lib/efi_loader/helloworld.c index 586177de0c8..d10a5229f74 100644 --- a/lib/efi_loader/helloworld.c +++ b/lib/efi_loader/helloworld.c @@ -72,6 +72,33 @@ static void uint2dec(u32 value, u16 **buf) } /** + * Print an unsigned 32bit value as hexadecimal number to an u16 string + * + * @value: value to be printed + * @buf: pointer to buffer address + * on return position of terminating zero word + */ +static void uint2hex(u32 value, u16 **buf) +{ + u16 *pos = *buf; + int i; + u16 c; + + for (i = 0; i < 8; ++i) { + /* Write current digit */ + c = value >> 28; + value <<= 4; + if (c < 10) + c += '0'; + else + c += 'a' - 10; + *pos++ = c; + } + *pos = 0; + *buf = pos; +} + +/** * print_uefi_revision() - print UEFI revision number */ static void print_uefi_revision(void) @@ -96,6 +123,16 @@ static void print_uefi_revision(void) con_out->output_string(con_out, u"Running on UEFI "); con_out->output_string(con_out, rev); con_out->output_string(con_out, u"\r\n"); + + con_out->output_string(con_out, u"Firmware vendor: "); + con_out->output_string(con_out, systable->fw_vendor); + con_out->output_string(con_out, u"\r\n"); + + buf = rev; + uint2hex(systable->fw_revision, &buf); + con_out->output_string(con_out, u"Firmware revision: "); + con_out->output_string(con_out, rev); + con_out->output_string(con_out, u"\r\n"); } /** |