-
Notifications
You must be signed in to change notification settings - Fork 732
[lib][uefi] implement UEFI HII Database Protocol #478
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
338b7e5 to
da0571b
Compare
da0571b to
276fa18
Compare
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>
276fa18 to
b33f350
Compare
|
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; |
There was a problem hiding this comment.
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; |
There was a problem hiding this comment.
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; |
There was a problem hiding this comment.
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; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just return true here?
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.