summaryrefslogtreecommitdiffstats
path: root/lib/efi_selftest/efi_selftest_console.c
Commit message (Collapse)AuthorAgeFilesLines
* efi_selftest: provide initrddump test toolHeinrich Schuchardt2021-01-201-2/+1
| | | | | | | | Provide an UEFI application to save the initial RAM disk provided by U-Boot via the Load File2 protocol. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de> Acked-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
* efi_selftest: enable printing hexadecimal numbersHeinrich Schuchardt2020-10-061-13/+22
| | | | | | Add code to use %x in efi_st_print(). Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
* common: Drop net.h from common headerSimon Glass2020-05-181-0/+1
| | | | | | | | | | | Move this header out of the common header. Network support is used in quite a few places but it still does not warrant blanket inclusion. Note that this net.h header itself has quite a lot in it. It could be split into the driver-mode support, functions, structures, checksumming, etc. Signed-off-by: Simon Glass <sjg@chromium.org>
* efi_loader: struct efi_simple_text_input_protocolHeinrich Schuchardt2018-09-231-1/+1
| | | | | | | | | | | | | | %s/efi_simple_input_interface/efi_simple_text_input_protocol/ We should be consistent in the naming of the EFI protocol interface structures. The protocol is called EFI_SIMPLE_TEXT_INPUT_PROTOCOL. %s/ExtendedVerification/extended_verification/ Use consistent naming of function parameters. Do not use CamelCase. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de> Signed-off-by: Alexander Graf <agraf@suse.de>
* efi_selftest: support printing leading zeroesHeinrich Schuchardt2018-07-251-11/+22
| | | | | | | | | Allow specifying the precision when printing integers, e.g. efi_st_printf("%.4u-%.2u-%.2u\n", year, month, day); Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de> Signed-off-by: Alexander Graf <agraf@suse.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_selftest: colored test outputHeinrich Schuchardt2018-01-221-4/+9
| | | | | | | | | | | | | | | Add color coding to output: test section blue success green errors red todo yellow summary white others light gray Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de> Reviewed-by: Simon Glass <sjg@chromium.org> [agraf: Fold in move of set_attribute before the print] Signed-off-by: Alexander Graf <agraf@suse.de>
* efi_selftest: do not cut off u16 strings when printingHeinrich Schuchardt2018-01-221-4/+8
| | | | | | | | | | | Device paths can be very long. Due to a limited output buffer the output for device paths is cut off. We can avoid this by directly calling the boottime service with the the device path string. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de> [agraf: Remove coloring code change] Signed-off-by: Alexander Graf <agraf@suse.de>
* efi_selftest: allow to select a single test for executionHeinrich Schuchardt2017-12-011-0/+10
| | | | | | | | | | | | | | | | | | | | | | Environment variable efi_selftest is passed as load options to the selftest application. It is used to select a single test to be executed. The load options are an UTF8 string. Yet I decided to keep the name propertiy of the tests as char[] to reduce code size. Special value 'list' displays a list of all available tests. Tests get an on_request property. If this property is set the tests are only executed if explicitly requested. The invocation of efi_selftest is changed to reflect that bootefi selftest with efi_selftest = 'list' will call the Exit bootservice. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de> Signed-off-by: Alexander Graf <agraf@suse.de>
* efi_selftest: allow printing MAC addressesHeinrich Schuchardt2017-10-091-1/+40
| | | | | | | | | Add %pm as format string to print a MAC address. This is helpful when analyzing network problems. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de> Reviewed-by: Simon Glass <sjg@chromium.org> Signed-off-by: Alexander Graf <agraf@suse.de>
* efi_selftest: provide an EFI selftest applicationHeinrich Schuchardt2017-09-181-0/+187
A testing framework for the EFI API is provided. It can be executed with the 'bootefi selftest' command. It is coded in a way that at a later stage we may turn it into a standalone EFI application. The current build system does not allow this yet. All tests use a driver model and are run in three phases: setup, execute, teardown. A test may be setup and executed at boottime, it may be setup at boottime and executed at runtime, or it may be setup and executed at runtime. After executing all tests the system is reset. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de> Signed-off-by: Alexander Graf <agraf@suse.de>