aboutsummaryrefslogtreecommitdiff
path: root/lib/efi_loader/efi_hii.c
AgeCommit message (Collapse)Author
2023-01-13efi_loader: refine set_keyboard_layout() statusVincent Stehlé
As per the EFI specification, the HII database protocol function set_keyboard_layout() must return EFI_INVALID_PARAMETER when it is called with a NULL key_guid argument. Modify the function accordingly to improve conformance. Signed-off-by: Vincent Stehlé <vincent.stehle@arm.com> Cc: Heinrich Schuchardt <xypron.glpk@gmx.de> Cc: Ilias Apalodimas <ilias.apalodimas@linaro.org> Reviewed-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
2022-12-29efi_loader: fix get_package_list_handle() statusVincent Stehlé
When the HII protocol function get_package_list_handle() is called with an invalid package list handle, it returns EFI_NOT_FOUND but this is not in its list of possible status codes as per the EFI specification. Return EFI_INVALID_PARAMETER instead to fix conformance. Signed-off-by: Vincent Stehlé <vincent.stehle@arm.com> Cc: Heinrich Schuchardt <xypron.glpk@gmx.de> Cc: Ilias Apalodimas <ilias.apalodimas@linaro.org> Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
2022-04-15efi_loader: EFI_HII_STRING_PROTOCOL.GetString()Heinrich Schuchardt
Use u16_strsize(). Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
2022-01-19efi_loader: use %pUs for printing GUIDsHeinrich Schuchardt
For printing GUIDs with macro EFI_ENTRY use %pUs instead of %pUl to provide readable debug output. Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
2019-06-20efi_loader: ListPackageLists() return EFI_NOT_FOUNDHeinrich Schuchardt
If no matching package list is found in ListPackageLists(), return EFI_NOT_FOUND. If we do not support a package type, we will not find a matching package list. Remove the unreachable EFI_PRINTF() statements. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
2019-03-20efi_loader: endless loop in add_strings_package()Heinrich Schuchardt
Avoid an endless loop in add_strings_package(). Suggested-by: Takahiro Akashi <takahiro.akashi@linaro.org> Reported-by: Coverity (CID 185833) Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
2019-03-02efi_loader: HII protocols: debug messagesHeinrich Schuchardt
When package types are not supported by our implementation of the HII database protocol supported error messages are displayed. Essentially the output is only needed for debugging. By using EFI_PRINT() the messages are only written for in debug mode and with correct indentation. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
2019-03-02efi_loader: HII protocols: fix new_package_list()Heinrich Schuchardt
In new_package_list() we call new_packagelist() to create a new package list. Next we try to add the packages which fails for form packages. Due to this error we call free_packagelist(). Now in free_packagelist() list_del() is called for an uninitialized field hii->link. This leads to changing random memory addresses. To solve the problem move the initialization of hii->link to new_packagelist(). Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de> Reviewed-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
2019-02-13efi_loader: debug output for HII protocolsHeinrich Schuchardt
For correct indention use EFI_PRINT() instead of debug(). For printing efi_uintn_t or size_t use the %zu or %zx format code. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de> Signed-off-by: Alexander Graf <agraf@suse.de>
2019-02-13efi: hii: add keyboard layout package supportAKASHI Takahiro
Allow for handling keyboard layout package in HII database protocol. A package can be added or deleted in HII database protocol, but we don't set 'current' keyboard layout as there is no driver that requests a keyboard layout. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Signed-off-by: Alexander Graf <agraf@suse.de>
2019-02-13efi: hii: add guid package supportAKASHI Takahiro
Allow for handling GUID package in HII database protocol. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Signed-off-by: Alexander Graf <agraf@suse.de>
2019-02-13efi_loader: Initial HII database protocolsLeif Lindholm
This patch provides enough implementation of the following protocols to run EDKII's Shell.efi and UEFI SCT: * EfiHiiDatabaseProtocol * EfiHiiStringProtocol Not implemented are: * ExportPackageLists() * RegisterPackageNotify()/UnregisterPackageNotify() * SetKeyboardLayout() (i.e. *current* keyboard layout) HII database protocol in this patch series can handle only: * GUID package * string package * keyboard layout package (The other packages, except Device path package, will be necessary for interactive and graphical UI.) Signed-off-by: Leif Lindholm <leif.lindholm@linaro.org> Signed-off-by: Rob Clark <robdclark@gmail.com> Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Signed-off-by: Alexander Graf <agraf@suse.de>