Skip to content

Conversation

@grandpaul
Copy link
Contributor

Shell.efi from EDK2 requires this protocol to be existed. Otherwise it crashes. So we implemented a minimum set of UEFI HII Database Protocol to let the Shell.efi to run.

@grandpaul grandpaul changed the title implement UEFI HII Database Protocol [lib][uefi] implement UEFI HII Database Protocol Oct 15, 2025
Shell.efi from EDK2 requires this protocol to be existed. Otherwise it
crashes. So we implemented a minimum set of UEFI HII Database Protocol to
let the Shell.efi to run.

Signed-off-by: Ying-Chun Liu (PaulLiu) <paul.liu@linaro.org>
@travisg
Copy link
Member

travisg commented Jan 20, 2026

I'm okay with this but @zhangxp1998 has generally been the maintainer of the UEFI stuff. What do you think Kelvin?


stbl = reinterpret_cast<struct efi_string_table *>(list_remove_head(&(hii->string_tables)));
if (!stbl) {
break;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does this break cause a memory leak? Is it OK that we don't free stbl ?


static void remove_strings_package(struct efi_hii_packagelist *hii) {
while (true) {
struct efi_string_table *stbl;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Define and initialize in 1 step.

while ((void *)package < end) {
switch (efi_hii_package_type(package)) {
case EFI_HII_PACKAGE_END:
goto out;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

NO goto statement in C++

bool found = false;
list_for_every_entry(&efi_package_lists, hii, struct efi_hii_packagelist, node) {
if (hii == package_list) {
found = true;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just return true here?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants