diff options
author | Tom Rini <trini@konsulko.com> | 2021-11-26 17:10:53 -0500 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2021-11-26 17:10:53 -0500 |
commit | 693650b15d04cd5a5861bd3136c9ed9e23f95c41 (patch) | |
tree | b4a3b3ca5d9b6b6f10e3d6880f1caa17219776c2 /lib/efi_selftest/efi_selftest_fdt.c | |
parent | 2ad8d0cb950da2233a2ec030533f4e54c6d04126 (diff) | |
parent | 2b5e7108594d4e100c88f44353d1fed6456d6471 (diff) |
Merge tag 'efi-2022-01-rc3-2' of https://source.denx.de/u-boot/custodians/u-boot-efi
Pull request for efi-2022-01-rc3-2
Test:
* fix pylint warnings
UEFI:
* disable interrupts before removing devices in ExitBootServices()
* implement poweroff in efi_system_reset() on sandbox
* allow booting via EFI even if some block device fails
Diffstat (limited to 'lib/efi_selftest/efi_selftest_fdt.c')
-rw-r--r-- | lib/efi_selftest/efi_selftest_fdt.c | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/lib/efi_selftest/efi_selftest_fdt.c b/lib/efi_selftest/efi_selftest_fdt.c index eae98208f6..412ba286ea 100644 --- a/lib/efi_selftest/efi_selftest_fdt.c +++ b/lib/efi_selftest/efi_selftest_fdt.c @@ -23,23 +23,24 @@ static const char *fdt; static const efi_guid_t fdt_guid = EFI_FDT_GUID; static const efi_guid_t acpi_guid = EFI_ACPI_TABLE_GUID; -/* - * Convert FDT value to host endianness. +/** + * f2h() - convert FDT value to host endianness. * - * @val FDT value - * @return converted value + * UEFI code is always low endian. The FDT is big endian. + * + * @val: FDT value + * Return: converted value */ static uint32_t f2h(fdt32_t val) { char *buf = (char *)&val; char i; -#if __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__ /* Swap the bytes */ i = buf[0]; buf[0] = buf[3]; buf[3] = i; i = buf[1]; buf[1] = buf[2]; buf[2] = i; -#endif - return *(uint32_t *)buf; + + return val; } /** |