- Feb 05, 2022
-
-
Heinrich Schuchardt authored
Check that snprintf() returns the correct required buffer length and prints the correct string for UTF-16 strings. Signed-off-by:
Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
-
- Feb 03, 2022
-
-
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 the Raspberry Pi. Signed-off-by:
Simon Glass <sjg@chromium.org> Reviewed-by:
Heinrich Schuchardt <xypron.glpk@gmx.de>
-
- Jan 28, 2022
-
-
Add to support rsa 3072 bits algorithm in tools for image sign at host side and adds rsa 3072 bits verification in the image binary. Add test case in vboot for sha384 with rsa3072 algorithm testing. Signed-off-by:
Jamin Lin <jamin_lin@aspeedtech.com> Reviewed-by:
Simon Glass <sjg@chromium.org>
-
- Jan 25, 2022
-
-
When OF_LIVE flag is enabled on a 64 bits platform, there is an issue when dev_read_addr() is called and need to perform an address translation using __of_translate_address(). In case of error, __of_translate_address() return's value is OF_BAD_ADDR (wich is defined in include/dm/of.h to ((u64)-1) = 0xffffffffffffffff). The return value of dev_read_addr() is often compared to FDT_ADDR_T_NONE which is defined as (-1U) = 0xffffffff. In this case the comparison is always false. To fix this issue, define FDT_ADDR_T_NONE to (ulong)(-1) in case of AARCH64. Update accordingly related tests. Signed-off-by:
Patrice Chotard <patrice.chotard@foss.st.com> Reviewed-by:
Simon Glass <sjg@chromium.org>
-
Simon Glass authored
At present this is really just a debugging aid, but it is a bit untidy. Add proper columns so it is easier to read. Sample output for coral: => acpi list Name Base Size Detail ---- -------- ----- ------ RSDP 79925000 24 v02 U-BOOT RSDT 79925030 48 v01 U-BOOT U-BOOTBL 20220101 INTL 0 XSDT 799250e0 6c v01 U-BOOT U-BOOTBL 20220101 INTL 0 FACP 79929570 f4 v04 U-BOOT U-BOOTBL 20220101 INTL 1 DSDT 79925280 32ea v02 U-BOOT U-BOOTBL 20110725 INTL 20180105 FACS 79925240 40 MCFG 79929670 2c v01 U-BOOT U-BOOTBL 20220101 INTL 0 SPCR 799296a0 50 v02 U-BOOT U-BOOTBL 20220101 INTL 0 TPM2 799296f0 4c v04 U-BOOT U-BOOTBL 20220101 INTL 0 APIC 79929740 6c v02 U-BOOT U-BOOTBL 20220101 INTL 0 SSDT 799297b0 1523 v02 U-BOOT U-BOOTBL 20220101 INTL 1 NHLT 7992ace0 e60 v05 coral coral 3 INTL 0 DBG2 7992db40 61 v00 U-BOOT U-BOOTBL 20220101 INTL 0 HPET 7992dbb0 38 v01 U-BOOT U-BOOTBL 20220101 INTL 0 Signed-off-by:
Simon Glass <sjg@chromium.org>
-
Simon Glass authored
At present this is really just a debugging aid, but it is a bit untidy. Add proper columns and display the type name instead of a number. Sample output for coral: => acpi items Seq Type Addr Size Device/Writer --- ----- -------- ---- ------------- 0 other 79925000 240 0base 1 other 79925240 40 1facs 2 dsdt 799252a4 58 board 3 dsdt 799252fc 10 lpc 4 other 79925280 32f0 3dsdt 5 other 79928570 1000 4gnvs 6 other 79929570 100 5fact 7 other 79929670 30 5mcfg 8 other 799296a0 50 5spcr 9 other 799296f0 50 5tpm2 a other 79929740 70 5x86 b ssdt 799297d4 fe maxim-codec c ssdt 799298d2 28 i2c2@16,0 d ssdt 799298fa 270 da-codec e ssdt 79929b6a 28 i2c2@16,1 f ssdt 79929b92 28 i2c2@16,2 10 ssdt 79929bba 83 tpm@50 11 ssdt 79929c3d 28 i2c2@16,3 12 ssdt 79929c65 282 elan-touchscreen@10 13 ssdt 79929ee7 285 raydium-touchscreen@39 14 ssdt 7992a16c 28 i2c2@17,0 15 ssdt 7992a194 d8 elan-touchpad@15 16 ssdt 7992a26c 163 synaptics-touchpad@2c 17 ssdt 7992a3cf 28 i2c2@17,1 18 ssdt 7992a3f7 111 wacom-digitizer@9 19 ssdt 7992a508 8f sdmmc@1b,0 1a ssdt 7992a597 4b wifi 1b ssdt 7992a5e2 1a0 cpu@0 1c ssdt 7992a782 1a0 cpu@1 1d ssdt 7992a922 1a0 cpu@2 1e ssdt 7992aac2 211 cpu@3 1f other 799297b0 1530 6ssdt 20 other 7992ace0 2f10 8dev Signed-off-by:
Simon Glass <sjg@chromium.org>
-
Simon Glass authored
Use the new ACPI writer to write the base tables at the start of the area, moving this code from the x86 implementation. Signed-off-by:
Simon Glass <sjg@chromium.org>
-
Simon Glass authored
Use the new ACPI writer to write the ACPI tables. At present this is all done in one monolithic function. Future work will split this out. Unfortunately the QFW write_acpi_tables() function conflicts with the 'writer' version, so disable that for sandbox. Signed-off-by:
Simon Glass <sjg@chromium.org>
-
Simon Glass authored
At present acpi_setup_base_tables() both sets up the ACPI context and writes out the base tables. We want to use an ACPI writer to write the base tables, so split this function into two, with acpi_setup_ctx() doing the context set, and acpi_setup_base_tables() just doing the base tables. Disable the writer's write_acpi_tables() function for now, to avoid build errors. It is enabled in a following patch. Signed-off-by:
Simon Glass <sjg@chromium.org>
-
Simon Glass authored
Allow this to be used on any arch. Also convert to using macros so that we can check the CONFIG option in C code. Signed-off-by:
Simon Glass <sjg@chromium.org>
-
- Jan 24, 2022
-
-
* assert does not need parentheses * add module docstring * fix misspelled constant True * limit lines to 100 characters Signed-off-by:
Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
-
- Jan 19, 2022
-
-
Heinrich Schuchardt authored
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>
-
Heinrich Schuchardt authored
Add a unit test for the %pUs printf code. Use ut_asserteq_str() for checking string results. Signed-off-by:
Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
-
- Jan 14, 2022
-
-
On boards using the RK3399 SoC, the USB OHCI and EHCI controllers share the same PHY device instance. While these controllers are being stopped they both attempt to power-off and deinitialize it, but trying to power-off the deinitialized PHY device results in a hang. This usually happens just before booting an OS, and can be explicitly triggered by running "usb start; usb stop" in the U-Boot shell. Implement a uclass-wide counting mechanism for PHY initialization and power state change requests, so that we don't power-off/deinitialize a PHY instance until all of its users want it done. The Allwinner A10 USB PHY driver does this counting in-driver, remove those parts in favour of this in-uclass implementation. The sandbox PHY operations test needs some changes since the uclass will no longer call into the drivers for actions matching its tracked state (e.g. powering-off a powered-off PHY). Update that test, and add a new one which simulates multiple users of a single PHY. The major complication here is that PHY handles aren't deduplicated per instance, so the obvious idea of putting the counts in the PHY handles don't immediately work. It seems possible to bind a child udevice per PHY instance to the PHY provider and deduplicate the handles in each child's uclass-private areas, like in the CLK framework. An alternative approach could be to use those bound child udevices themselves as the PHY handles. Instead, to avoid the architectural changes those would require, this patch solves things by dynamically allocating a list of structs (one per instance) in the provider's uclass-private area. Signed-off-by:
Alper Nebi Yasak <alpernebiyasak@gmail.com> Reviewed-by:
Simon Glass <sjg@chromium.org> Tested-by: Peter Robinson <pbrobinson@gmail.com> - Rock960
-
This test checks for output specific to the sandbox blk device "sandbox_host_blk", mark it as sandbox specific. Signed-off-by:
Patrick Delaunay <patrick.delaunay@foss.st.com>
-
- Jan 13, 2022
-
-
Simon Glass authored
Add a few convenience functions to obtain useful information about the bloblist. Signed-off-by:
Simon Glass <sjg@chromium.org>
-
Simon Glass authored
At present if someone adds a tag in the middle of the list it works well enough within a U-Boot build. But if these tags are used in another project, or with an older version of SPL, the numbers make become inconsistent. Use explicit tag numbers that never change, to resolve this problem. Allocate areas for existing U-Boot tags and set up an area for use by projects and vendors, as well as for private use. Keep tags above 0x10000 unallocated for now. Update bloblist_tag_name() and the tests to work with this new setup. Signed-off-by:
Simon Glass <sjg@chromium.org>
-
Simon Glass authored
The EC event log tag is no-longer used. The vboot handoff is now handled by the vboot context instead. Drop these unused tags. Signed-off-by:
Simon Glass <sjg@chromium.org>
-
Simon Glass authored
It seems best to put the magic number right at the start of the bloblist header, so it is easier to check. This is how devicetree works. Make this change now, before other projects make use of bloblist. Other changes may be needed / discussed, but that is TBD. Add a checker function as well. Signed-off-by:
Simon Glass <sjg@chromium.org>
-
- Dec 26, 2021
-
-
Show the U-Boot logo by default. This is only 7KB in size so seems like a useful default for boards that enable a display. If SPLASH_SCREEN is enabled, it is not enabled by default, so as not to conflict with that feature. Also disable it for tests, since we don't want to complicate the output. Signed-off-by:
Simon Glass <sjg@chromium.org>
-
At present this uses RGB555 format for blitting to a display. Sandbox uses 565 and that seems to be more normal for BMP as well. Update the code accordingly and add a test. Note that this likely breaks the theadorable board so we may need to discuss supporting both formats. Signed-off-by:
Simon Glass <sjg@chromium.org>
-
Add a compressed 16bpp BMP file and a test to cover this. Signed-off-by:
Simon Glass <sjg@chromium.org>
-
Update this code to use write_pix8() rather than writing the pixels only for a single supported display depth. This allows us to support any depth. Add some more tests too. Signed-off-by:
Simon Glass <sjg@chromium.org>
-
Add a few more tests for BMP rendering. Use a back door into the sandbox SDL driver to adjust the resolution at runtime. The truetype code does not support 8bpp. Add this so that the display is not blank when running in this mode. Signed-off-by:
Simon Glass <sjg@chromium.org>
-
- Dec 23, 2021
-
-
Add a function that returns some basic stats about driver model. For now we only have two. Signed-off-by:
Simon Glass <sjg@chromium.org>
-
- Dec 09, 2021
-
-
UCLASS_EFI_LOADER is used for devices created by applications and drivers loaded by U-Boots UEFI implementation. This patch provides a new uclass (UCLASS_EFI_MEDIA) to be used for devices that provided by a UEFI firmware calling U-Boot as an EFI application. If the two uclasses can be unified, is left to future redesign. Signed-off-by:
Simon Glass <sjg@chromium.org> Reviewed-by:
Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
-
- Nov 30, 2021
-
-
Heinrich Schuchardt authored
Encapsulate the UEFI EFI_TCG2_PROTOCOL unit test in an Python test. Signed-off-by:
Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
-
Heinrich Schuchardt authored
With TPM emulation enabled in u-boot-test-hooks we should also provide the tpm2 command used for the test/py/tests/test_tpm2.py test. One of the Python TPMv2 tests expects sandbox specific values. So disable it on other platforms. Signed-off-by:
Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
-
- Nov 28, 2021
-
-
Simon Glass authored
At present an Exception is raised if a command fails. This is a very broad class and makes it difficult for callers to catch the error without also catching other things, like programming bugs. Change it to ValueError to make this easier. Signed-off-by:
Simon Glass <sjg@chromium.org>
-
Simon Glass authored
At present the collection function used by pytest is quite strict on the naming of the functions it detects. In particular it requires the name of the test to be repeated in the function name. This is not enforced anywhere else, but instead the tests are silently omitted from the pytest run. This affects a few dozen tests. The rule does not seem to have any particular purpose. Relax it, so that all tests that use the UNIT_TEST() macro will run, regardless of the name of the test function. Signed-off-by:
Simon Glass <sjg@chromium.org>
-
Simon Glass authored
At present we support reading a string list a string at a time. Apart from being inefficient, this makes it impossible to separate reading of the devicetree into the of_to_plat() method where it belongs, since any code which needs access to the string must read it from the devicetree. Add a function which returns the string property as an array of pointers to the strings, which is easily used by clients. Signed-off-by:
Simon Glass <sjg@chromium.org>
-
Simon Glass authored
These functions currently lack tests so add some. The error handling differs betwee livetree and flattree at present, so only check the error codes with livetree. Signed-off-by:
Simon Glass <sjg@chromium.org>
-
Simon Glass authored
When running a program on the host, allow input to be passed in as stdin. This is needed for running sfdisk, for example. Signed-off-by:
Simon Glass <sjg@chromium.org>
-
- Nov 26, 2021
-
-
Heinrich Schuchardt authored
* provide module docstring Signed-off-by:
Heinrich Schuchardt <heinrich.schuchardt@canonical.com> Reviewed-by:
Simon Glass <sjg@chromium.org>
-
Heinrich Schuchardt authored
* provide module docstring Signed-off-by:
Heinrich Schuchardt <heinrich.schuchardt@canonical.com> Reviewed-by:
Simon Glass <sjg@chromium.org>
-
Heinrich Schuchardt authored
* there is no os.path.unlink() method * don't inherit from object * add module docstring * move imports to the top * avoid unused variable Signed-off-by:
Heinrich Schuchardt <heinrich.schuchardt@canonical.com> Reviewed-by:
Simon Glass <sjg@chromium.org>
-
Heinrich Schuchardt authored
* don't inherit from object * imports should be on the top level * avoid unused variable names * avoid unnecessary else after raise Signed-off-by:
Heinrich Schuchardt <heinrich.schuchardt@canonical.com> Reviewed-by:
Simon Glass <sjg@chromium.org>
-
Heinrich Schuchardt authored
* don't inherit from object * remove superfluous comprehension * add module docstring Signed-off-by:
Heinrich Schuchardt <heinrich.schuchardt@canonical.com> Reviewed-by:
Simon Glass <sjg@chromium.org>
-
Heinrich Schuchardt authored
* remove unused variables * module description must precede import statements * fix inconsistent return values Signed-off-by:
Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
-
- Nov 20, 2021
-
-
Heinrich Schuchardt authored
Test that the return value of snprintf() is correct in the case of truncation. Signed-off-by:
Heinrich Schuchardt <heinrich.schuchardt@canonical.com> Reviewed-by:
Simon Glass <sjg@chromium.org>
-