aboutsummaryrefslogtreecommitdiff
path: root/lib/efi_loader/helloworld.c
Commit message (Collapse)AuthorAgeFilesLines
* efi_loader: print file path w/o boot deviceHeinrich Schuchardt2023-05-131-4/+4
| | | | | | | Helloworld.efi should print the file path even if the boot device is not set. Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
* efi_loader: avoid using HandleProtocol in helloworld.efiHeinrich Schuchardt2023-04-081-5/+8
| | | | | | | | HandleProtocol() is deprecated and leaves an OpenedProtocolInformation behind. Use OpenProtocol(GET_PROTOCOL) instead. Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com> Reviewed-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
* efi_loader: static functions in helloworld.cHeinrich Schuchardt2023-02-101-1/+2
| | | | | | Make functions that are not used externally static. Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
* efi_loader: printing UEFI revision in helloworld.efiHeinrich Schuchardt2022-09-031-12/+54
| | | | | | | | | | | | | | We need to support multiple digits in the parts of the UEFI verision number. E.g. EFI_SPECIFICATION_VERSION = (123 << 16) | 456 must be printed as 123.45.6 Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com> Reviewed-by: Simon Glass <sjg@chromium.org>
* efi: Use 16-bit unicode stringsSimon Glass2022-02-031-20/+20
| | | | | | | | | | At present we use wide characters for unicode but this is not necessary. Change the code to use the 'u' literal instead. This helps to fix build warnings for sandbox on rpi. Signed-off-by: Simon Glass <sjg@chromium.org> Suggested-by: Heinrich Schuchardt <xypron.glpk@gmx.de> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
* efi_loader: correct function comment styleHeinrich Schuchardt2022-01-291-1/+1
| | | | | | Replace @return and @param. Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
* efi_loader: typo 'devide path'Heinrich Schuchardt2021-03-311-1/+1
| | | | | | Fix a typo in helloworld.efi. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
* efi_loader: print boot device and file path in helloworldHeinrich Schuchardt2021-01-131-30/+137
| | | | | | | Let helloworld.efi print the device path of the boot device and the file path as provided by the loaded image protocol. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
* efi_loader: consistent naming of protocol GUIDsHeinrich Schuchardt2019-04-231-1/+1
| | | | | | | | | | | | | We should consistently use the same name for protocol GUIDs as defined in the UEFI specification. Not adhering to this rule has led to duplicate definitions for the EFI_LOADED_IMAGE_PROTOCOL_GUID. Adjust misnamed protocol GUIDs. Adjust the text for the graphics output protocol in the output of the `efidebug dh` command. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
* efi_loader: use library memcpy() in helloworld.efiHeinrich Schuchardt2019-02-131-30/+6
| | | | | | | | Helloworld does not need its own memcpy() implementation anymore. Use the one provided in efi_freestanding.c. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de> Signed-off-by: Alexander Graf <agraf@suse.de>
* efi_selftest: use CR LF in helloworldHeinrich Schuchardt2018-12-021-13/+27
| | | | | | | | | | | | The UEFI spec defines that a line feed moves the cursor to the next line and (only) a carriage return moves the cursor to the beginning of the line. So we should issue CR LF when we want to get to the start of the next line. Add some comments. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de> Signed-off-by: Alexander Graf <agraf@suse.de>
* efi_loader: helloworld: Output ACPI configuration tableBin Meng2018-07-021-0/+4
| | | | | | | Output ACPI configuration table if it exists. Signed-off-by: Bin Meng <bmeng.cn@gmail.com> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
* SPDX: Convert all of our single license tags to Linux Kernel styleTom Rini2018-05-071-2/+1
| | | | | | | | | | | | | | | | | | | | When U-Boot started using SPDX tags we were among the early adopters and there weren't a lot of other examples to borrow from. So we picked the area of the file that usually had a full license text and replaced it with an appropriate SPDX-License-Identifier: entry. Since then, the Linux Kernel has adopted SPDX tags and they place it as the very first line in a file (except where shebangs are used, then it's second line) and with slightly different comment styles than us. In part due to community overlap, in part due to better tag visibility and in part for other minor reasons, switch over to that style. This commit changes all instances where we have a single declared license in the tag as both the before and after are identical in tag contents. There's also a few places where I found we did not have a tag and have introduced one. Signed-off-by: Tom Rini <trini@konsulko.com>
* efi_loader: show UEFI revision in helloworldHeinrich Schuchardt2018-04-041-0/+18
| | | | | | | Output the UEFI revision number in helloworld. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de> Signed-off-by: Alexander Graf <agraf@suse.de>
* efi_loader: check tables in helloworld.efiHeinrich Schuchardt2018-01-221-0/+26
| | | | | | | Check if the device tree and the SMBIOS table are available. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de> Signed-off-by: Alexander Graf <agraf@suse.de>
* efi_loader: helloworld.c: Explicitly use .rodata for loaded_image_guidAlexander Graf2017-12-161-1/+2
| | | | | | | | | | | | | | | | | | | | | Commit bbf75dd9345d0b ("efi_loader: output load options in helloworld") introduced a const variable in efi_main() called loaded_image_guid which got populated from a constant struct. While you would usually expect a compiler to realize that this variable should really just be a global pointer to .rodata, gcc disagrees and instead puts it on the stack. Unfortunately in some implementations of gcc it does so my calling memcpy() which we do not implement in our hello world environment. So let's explicitly move it to a global variable which in turn puts it in .rodata reliably and gets rid of the memcpy(). Fixes: bbf75dd9345d0b ("efi_loader: output load options in helloworld") Reported-by: Florian Fainelli <f.fainelli@gmail.com> Signed-off-by: Alexander Graf <agraf@suse.de> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de> Tested-by: Florian Fainelli <f.fainelli@gmail.com>
* efi_loader: output load options in helloworldHeinrich Schuchardt2017-12-011-2/+35
| | | | | | | | | | | | We need to test if we pass a valid image handle when loading and EFI application. This cannot be done in efi_selftest as it is not loaded as an image. So let's enhance helloworld a bit. Reviewed-by: Simon Glass <sjg@chromium.org> Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de> Signed-off-by: Alexander Graf <agraf@suse.de>
* efi_loader: helloworld.c: remove superfluous includeHeinrich Schuchardt2017-12-011-1/+0
| | | | | | | Remove a superfluous include from helloworld.c Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de> Signed-off-by: Alexander Graf <agraf@suse.de>
* efi: Add support for a hello world test programSimon Glass2016-11-141-0/+24
It is useful to have a basic sanity check for EFI loader support. Add a 'bootefi hello' command which loads HelloWord.efi and runs it under U-Boot. Signed-off-by: Simon Glass <sjg@chromium.org> [agraf: Fix documentation, add unfulfilled kconfig dep] Signed-off-by: Alexander Graf <agraf@suse.de>