diff options
author | Tom Rini <trini@konsulko.com> | 2022-05-04 12:08:40 -0400 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2022-05-04 12:08:40 -0400 |
commit | 1739a6db5403d187902dcebca548de0644c8078f (patch) | |
tree | 62e9a921915bbd79cec42f528b6c454e8488f862 /lib/efi_selftest/efi_selftest_unaligned.c | |
parent | c3d451d5e6b7c2ea6d83397d5b6c986ff6ab4ee3 (diff) | |
parent | 2158b0da220ccbe969bc18668263141d9a89f13e (diff) |
Merge tag 'efi-2022-07-rc2-2' of https://source.denx.de/u-boot/custodians/u-boot-efi
Pull request for efi-2022-07-rc2-2
* Test
Unit test for 'bootmenu' command
* UEFI
Preparatory patches for implementing a UEFI boot options based menu
Diffstat (limited to 'lib/efi_selftest/efi_selftest_unaligned.c')
-rw-r--r-- | lib/efi_selftest/efi_selftest_unaligned.c | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/lib/efi_selftest/efi_selftest_unaligned.c b/lib/efi_selftest/efi_selftest_unaligned.c index 6fce110b76f..7c6bf2d6e8d 100644 --- a/lib/efi_selftest/efi_selftest_unaligned.c +++ b/lib/efi_selftest/efi_selftest_unaligned.c @@ -14,14 +14,14 @@ struct aligned_buffer { }; /* - * Return an u32 at a give address. + * Return an u32 at a given address. * If the address is not four byte aligned, an unaligned memory access * occurs. * * @addr: address to read * Return: value at the address */ -static inline u32 deref(u32 *addr) +static inline u32 deref(void *addr) { int ret; @@ -43,12 +43,11 @@ static int execute(void) { struct aligned_buffer buf = { {0, 1, 2, 3, 4, 5, 6, 7}, - }; - void *v = &buf; + }; u32 r = 0; /* Read an unaligned address */ - r = deref(v + 1); + r = deref(&buf.a[1]); /* UEFI only supports low endian systems */ if (r != 0x04030201) { |