4 Commits

Author SHA1 Message Date
Simon Glass
1c43924b3f efi_loader: Fix display of addresses in log
The allocate/free-pages functions return an address, so there is no need
to convert it. Fix this.

Signed-off-by: Simon Glass <sjg@chromium.org>
Fixes: c824a96d76 ("efi_loader: Use the log with memory-related...")
2025-01-30 13:05:18 -07:00
Simon Glass
c824a96d76 efi_loader: Use the log with memory-related functions
Update a few memory functions to log their inputs and outputs. To avoid
the use of 'goto', etc. the functions are turned into stubs, calling a
separate function to do the actual operation.

Add a few tests.

Signed-off-by: Simon Glass <sjg@chromium.org>
2024-12-18 19:50:32 -07:00
Simon Glass
b9dcd6fde2 test: efi_loader: Add a simple test for the EFI log
Create a test which does some sample calls and checks the output.

Expand the size of the sandbox bloblist to accommodate the log.

Signed-off-by: Simon Glass <sjg@chromium.org>
2024-12-18 19:48:05 -07:00
Simon Glass
9224c73471 efi_loader: Add support for logging EFI calls
The current logging system suffers from some disadvantages, mainly that
it writes its output to the console and cannot be easily reviewed.

Add a dedicated log, storing records in a binary format and including
the result codes and any return values from each call. The log is built
sequentially in memory and can be reviewed after any EFI operation. It
could potentially be written to media for later review, but that is not
implemented so far.

Signed-off-by: Simon Glass <sjg@chromium.org>
2024-12-18 19:47:44 -07:00