From: "Vincent Stehlé" <vincent.stehle@arm.com>
To: u-boot@lists.denx.de
Cc: "Heinrich Schuchardt" <xypron.glpk@gmx.de>,
"Ilias Apalodimas" <ilias.apalodimas@linaro.org>,
"Tom Rini" <trini@konsulko.com>,
"AKASHI Takahiro" <akashi.tkhro@gmail.com>,
"Vincent Stehlé" <vincent.stehle@arm.com>
Subject: [PATCH 1/2] efi_loader: fix hii keyboard layout pointer computation
Date: Tue, 12 May 2026 19:40:33 +0200 [thread overview]
Message-ID: <20260512-layout-pointer-v1-1-c0981e907274@arm.com> (raw)
In-Reply-To: <20260512-layout-pointer-v1-0-c0981e907274@arm.com>
The EFI_HII_KEYBOARD_LAYOUT field `layout_length' is expressed in bytes,
but we add it to the `layout' pointer with (scaled) pointer arithmetic.
When adding an HII keyboard package with multiple keyboard layouts, this
results in only the first layout being added correctly; fix it.
Fixes: 8d3b77e36e10 ("efi: hii: add keyboard layout package support")
Signed-off-by: Vincent Stehlé <vincent.stehle@arm.com>
Cc: Heinrich Schuchardt <xypron.glpk@gmx.de>
Cc: Ilias Apalodimas <ilias.apalodimas@linaro.org>
Cc: Tom Rini <trini@konsulko.com>
Cc: AKASHI Takahiro <akashi.tkhro@gmail.com>
---
lib/efi_loader/efi_hii.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/lib/efi_loader/efi_hii.c b/lib/efi_loader/efi_hii.c
index 330d7c5830b..7bf51ad43d1 100644
--- a/lib/efi_loader/efi_hii.c
+++ b/lib/efi_loader/efi_hii.c
@@ -324,7 +324,8 @@ add_keyboard_package(struct efi_hii_packagelist *hii,
list_add_tail(&layout_data->link_sys,
&efi_keyboard_layout_list);
- layout += layout_length;
+ layout = (struct efi_hii_keyboard_layout *)
+ ((uintptr_t)layout + layout_length);
}
list_add_tail(&package_data->link, &hii->keyboard_packages);
--
2.53.0
next prev parent reply other threads:[~2026-05-12 17:41 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-05-12 17:40 [PATCH 0/2] efi: fix and test hii keyboard layout pointer computation Vincent Stehlé
2026-05-12 17:40 ` Vincent Stehlé [this message]
2026-05-12 17:40 ` [PATCH 2/2] efi_selftest: test hii keyboard layouts more Vincent Stehlé
2026-05-12 19:05 ` [PATCH 0/2] efi: fix and test hii keyboard layout pointer computation Heinrich Schuchardt
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20260512-layout-pointer-v1-1-c0981e907274@arm.com \
--to=vincent.stehle@arm.com \
--cc=akashi.tkhro@gmail.com \
--cc=ilias.apalodimas@linaro.org \
--cc=trini@konsulko.com \
--cc=u-boot@lists.denx.de \
--cc=xypron.glpk@gmx.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.