aboutsummaryrefslogtreecommitdiff
path: root/lib/efi_selftest/efi_selftest_fdt.c
AgeCommit message (Collapse)AuthorFilesLines
2022-09-09efi_selftest: export efi_st_get_config_table()Heinrich Schuchardt1-17/+0
We can use efi_st_get_config_table() in multiple unit tests. Export the function. Export system-table and boot-services. Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
2022-02-05efi_selftest: merge FDT and RISC-V testsHeinrich Schuchardt1-15/+57
The test for the RISCV_EFI_BOOT_PROTOCOL retrieves the boot hart id via the protocol and compares it to the value of the boot hart id in the device tree. The boot hart id is already retrieved from the device tree in the FDT test. Merge the two tests to avoid code duplication. Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
2022-02-03efi: Use 16-bit unicode stringsSimon Glass1-3/+3
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>
2022-01-29efi_loader: correct function comment styleHeinrich Schuchardt1-2/+2
Replace @return and @param. Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
2022-01-19doc: replace @return by Return:Heinrich Schuchardt1-1/+1
Sphinx expects Return: and not @return to indicate a return value. find . -name '*.c' -exec \ sed -i 's/^\(\s\)\*\(\s*\)@return\(\s\)/\1*\2Return:\3/' {} \; find . -name '*.h' -exec \ sed -i 's/^\(\s\)\*\(\s*\)@return\(\s\)/\1*\2Return:\3/' {} \; Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
2021-11-26efi_selftest: simplify endian conversion for FDT testHeinrich Schuchardt1-7/+8
UEFI code is always little-endian. Remove a superfluous test. Remove a superfluous type conversion. Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
2020-09-18efi_selftest: check for RISC-V boot-hartid in FDTHeinrich Schuchardt1-0/+15
On RISC-V check that the /chosen node has a boot-hartid property. To run the test configure with CONFIG_CMD_BOOTEFI_SELFTEST=y and issue setenv efi_selftest device tree setenv serial# myserial bootefi selftest If the test succeeds, it reports the boot-hartid, e.g. boot-hartid: 1 Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
2020-09-18efi_selftest: rework device tree testHeinrich Schuchardt1-14/+39
Allow specifying the node on which a property is searched. Test the device tree consistency more rigorously. Some efi_st_printf() calls have been converted to efi_st_error(). Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
2019-04-23efi_selftest: do not run FDT test with ACPI table.Heinrich Schuchardt1-11/+30
The EBBR specification prescribes that we should have either an ACPI table or a device tree but not both. So do not run the device tree unit test on boards with an ACPI table. Hence there is no need any longer to make it 'on request' only. Do not pass $fdtcontroladdr to `bootefi selftest`. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
2018-12-02efi_selftest: fix typosHeinrich Schuchardt1-1/+1
fix typos correct the header comment of efi_selftest_variables.c Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de> Signed-off-by: Alexander Graf <agraf@suse.de>
2018-05-07SPDX: Convert all of our single license tags to Linux Kernel styleTom Rini1-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>
2018-04-04efi_selftest: fix device tree unit testHeinrich Schuchardt1-1/+1
Include libfdt.h was moved by commit b08c8c487083 ("libfdt: move headers to <linux/libfdt.h> and <linux/libfdt_env.h>") Fixes: e236200c7fa6 ("efi_selftest: check installation of the device tree") Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de> Signed-off-by: Alexander Graf <agraf@suse.de>
2018-04-04efi_selftest: check installation of the device treeHeinrich Schuchardt1-0/+188
The unit test checks if a device tree is installed. It requires that the 'compatible' property of the root node exists. If available it prints the 'serial-number' property. The serial-number property is derived from the environment variable 'serial#'. This can be used to check if the image_setup_libfdt() function is executed. A Python test is supplied. It sets a value for serial# and checks that the selftest shows this as serial-number. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de> Signed-off-by: Alexander Graf <agraf@suse.de>