This command was written before the lmb unification, so does not
currently build. Tidy it up and enable it for the EFI app, by default.
Also allow it to search any partition, not just a FAT one, since we may
have the kernel on ext4
Signed-off-by: Simon Glass <sjg@chromium.org>
The EFI app shows a list of every disk and partition it can find. On
Qualcomm x1e laptops this can fill the screen. The information is not
that useful, so just show a summary.
Signed-off-by: Simon Glass <sjg@chromium.org>
For a fake go, we should tell the event not to actually do anything
irreversable, so pass the flag along.
Move the enum into a separate event_decl.h header file since otherwise
we must include bootm.h which causes a breakage with qemu-ppce500
We also don't want to pull event.h into the tools build, since it uses
types like u8 which are not available outside U-Boot
Signed-off-by: Simon Glass <sjg@chromium.org>
This shows an image type as an OS, which is not correct. Fix it up to
show both.
Series-changes: 2
- Add a colon so it is clear that 'load_os type' is not a compound term
Signed-off-by: Simon Glass <sjg@chromium.org>
When CONFIG_EVENT is disabled, we should not try to send an event. This
is already handled for events without parameters, so handle it for
events that do have parameters, too.
Signed-off-by: Simon Glass <sjg@chromium.org>
On platforms where most of the memory is above 4GB, the EFI app may find
itself using addresses with 9 or even 10 digits. Expand the width of the
columns to cope with this.
Add some double bars across digits 9 and 8 so that it is easier to make
the value.
Signed-off-by: Simon Glass <sjg@chromium.org>
This variable is tricky to set up and is only used to show an address.
Drop it and use the source variable instead.
Signed-off-by: Simon Glass <sjg@chromium.org>
Some machines start U-Boot in a different exception level, so provide a
way to view it.
Series-changes: 2
- Use the existing current_el() function
Signed-off-by: Simon Glass <sjg@chromium.org>
Provides some debugging info while doing bootm processing.
Series-changes: 2
- Make the messages longer and more explanatory
Signed-off-by: Simon Glass <sjg@chromium.org>
In some cases it is useful to find out the location of physical memory,
e.g. so that the memory@ nodes can be correctly set up in the
devicetree. Add support for parsing this information from the SMBIOS
tables.
Series-to: concept
Series-cc: heinrich
Series-version: 2
Cover-letter:
smbios: Refactor the smbios command and parser
The 'smbios' command has its own code for parsing SMBIOS tables. There
in also lib/smbios-parser.c which parses tables, although only
version 2.
This series moved parsing to lib/ and rationalises the code a little. It
also adds support for a few more tables.
Finally, a hook is added so operation from coreboot can be tested on
ellesmere.
END
Signed-off-by: Simon Glass <sjg@chromium.org>
Use the smbios_info struct in this function, so it can deal with any
version of SMBIOS table.
Also update smbios_update_version_full() to work the same way.
Drop find_next_header() which is now unused.
Signed-off-by: Simon Glass <sjg@chromium.org>
At present smbios_next_table() does not support SMBIOS v2 tables. Pass
in the info struct so that it can check for the end of the tables.
Signed-off-by: Simon Glass <sjg@chromium.org>
The code in the smbios command is a nice implementation of finding the
tables. It supports both SMBIOS2 and SMBIOS3, which smbios-parser.c does
not.
Move this code over to the library, creating a struct to hold the
result.
Series-changes: 2
- Fix the return values on error
Signed-off-by: Simon Glass <sjg@chromium.org>
The 'smbios' command has some parsing code, as does the SMBIOS parser
in the lib/ directory. Start to unify these by moving over a few
functions.
Require CONFIG_SMBIOS_PARSER to be enabled when using the command.
Signed-off-by: Simon Glass <sjg@chromium.org>
This function has the same name as the struct, which is confusing.
Rename it to smbios_get_header() and update the function comment a
little.
Signed-off-by: Simon Glass <sjg@chromium.org>
This fails in CI sometimes, so increase the limit to 50ms:
cyclic_run() cyclic function video_init took too long: 20725us vs 5000us max
Signed-off-by: Simon Glass <sjg@chromium.org>
Move setup_localboot_image() to a new module
Series-to: concept
Cover-letter:
test: Split up the image-creation code
This series moves the image-creation code into separate files so it is
easier to find and maintain.
END
Signed-off-by: Simon Glass <sjg@chromium.org>
Co-authored-by: Claude <noreply@anthropic.com>
Move setup_cros_image() to its own module. This function creates disk
images with a ChromiumOS partition layout.
Signed-off-by: Simon Glass <sjg@chromium.org>
Co-authored-by: Claude <noreply@anthropic.com>
Move setup_bootmenu_image() to its own module. This function creates an
image styled on Armbian 22.08 Jammy with a boot menu.
Co-authored-by: Claude <noreply@anthropic.com>
Move mkdir_cond(), copy_partition(), and setup_extlinux_image() to a
common module which can be used by the rest of the image-creation code.
Signed-off-by: Simon Glass <sjg@chromium.org>
Co-authored-by: Claude <noreply@anthropic.com>
Rather than having this code mixed with the tests, it seems better to
put it up one level. Move the directory and tidy up references.
Signed-off-by: Simon Glass <sjg@chromium.org>
This can indicate that something is horribly wrong. It seems better to
abort, rather than just print a message which might not be noticed.
If the mapping does not map exactly, abort.
Series-to: concept
Cover-letter:
sandbox: Fix memory corruption around 1MB
After many hours of debugging, it turns out that the PCI EA driver is
mapping itself into RAM at 1MB. This happens to be where the kernel
ends up, with the vbe_abrec_os bootmeth. Since measurement is enabled,
bootm_measure() calls map_sysmem() on the kernel in order to measure it.
easurement takes place, although of course using the wrong data. Then,
through a strange sequence of events, which I have found very hard to
narrow down, the malloc() heap is corrupted.
This series provides a fix.
To repeat this problem:
NO_LTO=1 ./test/py/test.py --bd sandbox --build -k
"(ut or vbe) and not efi and not slow and not dm"
which dies when running vbe_test_abrec_oem_norun:
...
=> echo $?
0
=> host bind 0 [...]/build-sandbox/persistent-data/vbe1.img
=> ut -f bootstd vbe_test_abrec_oem_norun
Test: bootstd_setup_for_tests: bootstd_common.c
common/dlmalloc.c:793: do_check_free_chunk:
Assertion `next->prev_size == sz' failed.
resetting ...
With this series, the above now passes.
END
Signed-off-by: Simon Glass <sjg@chromium.org>
Update the sizes to the expected size of the device's mapping in each
case, to avoid a warning in map_physmem() about a partial map.
Signed-off-by: Simon Glass <sjg@chromium.org>
Update the size to the expected size of the device's mapping, to avoid
a warning in map_physmem() about a partial map.
Signed-off-by: Simon Glass <sjg@chromium.org>
The address chosen for testing this feature is 1MB which is part of the
sandbox RAM. When devices access this, e.g. with map_sysmem(), the
memory is mapped to a PCI device. Any changes then apply to that device
and are not written to memory. Reads also come from the device.
It is not safe to use RAM space in this way.
A symptom that something is wrong is the log message:
map_physmem: Warning: partial map at 100000, wanted 4, got 2000
Move the memory out of the way and document it.
Signed-off-by: Simon Glass <sjg@chromium.org>
Fixes: 21ebbafde8 ("test: dm: Add a test for PCI Enhanced Allocation")
Pass in the two fixtures this function actually requires, rather than
ubman, which is a function-scoped fixture.
Series-to: concept
Cover-letter:
test: Move towards using a fixture for test images
There are quite a few test images created by the test system. Most are
needed for bootstd tests.
At present these are created by a test, called test_ut_dm_init_bootstd()
which runs before the test_ut() tests.
This means that it is possible to create the images once, then iterate
on a test without the images being recreated each time.
While this is not a terrible approach, it does have some drawbacks:
- If an image is missing or corrupted for some reason, the test fails
- The relationship between the images and the tests is not obvious
- Images are often created even if the tests to be run do not need them
Overall, it seems worthwhile to explore moving to using a fixture for
the images.
Another problem is that 'make qcheck' and 'make pcheck' are not tested
in CI, so can break over time. The latter is a good way of seeing
whether each test is independent, e.g. not reliant on files created by
another test.
Overall this area of U-Boot could use some attention. This series makes
a very small start on this:
- Update test_fdt_add_pubkey() to work without test_vboot_base()
- Fix 'make qcheck' so that it passes
- Minor fixes to a few tests
- Pass separate fixtures to the image-setup functions instead of the
overall ubman fixture
END
Signed-off-by: Simon Glass <sjg@chromium.org>
Pass in the two fixtures this function actually requires, rather than
ubman, which is a function-scoped fixture.
Signed-off-by: Simon Glass <sjg@chromium.org>
Pass in the two fixtures this function actually requires, rather than
ubman, which is a function-scoped fixture.
Signed-off-by: Simon Glass <sjg@chromium.org>
Pass in the two fixtures this function actually requires, rather than
ubman, which is a function-scoped fixture.
Signed-off-by: Simon Glass <sjg@chromium.org>
Pass in the two fixtures this function actually requires, rather than
ubman, which is a function-scoped fixture.
Signed-off-by: Simon Glass <sjg@chromium.org>
Pass in the two fixtures this function actually requires, rather than
ubman, which is a function-scoped fixture.
Signed-off-by: Simon Glass <sjg@chromium.org>
Pass in the two fixtures this function actually requires, rather than
ubman, which is a function-scoped fixture.
Signed-off-by: Simon Glass <sjg@chromium.org>
Pass in the two fixtures this function actually requires, rather than
ubman, which is a function-scoped fixture.
Signed-off-by: Simon Glass <sjg@chromium.org>
Pass in the two fixtures this function actually requires, rather than
ubman, which is a function-scoped fixture.
Signed-off-by: Simon Glass <sjg@chromium.org>
Pass in the two fixtures this function actually requires, rather than
ubman, which is a function-scoped fixture.
Signed-off-by: Simon Glass <sjg@chromium.org>