From: Simon Glass <sjg@chromium.org>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH v9 00/18] efi: Enable sandbox support for EFI loader
Date: Wed, 8 Aug 2018 03:54:15 -0600 [thread overview]
Message-ID: <20180808095433.230882-1-sjg@chromium.org> (raw)
A limitation of the EFI loader at present is that it does not build with
sandbox. This makes it hard to write tests, since sandbox is used for most
testing in U-Boot.
This series enables the EFI loader feature. It allows sandbox to build and
run a trivial function which calls the EFI API to output a message.
Also included in v8 is support for running the full EFI self tests. These
run OK with some tweaks to a few parts of the code.
With v9, various EFI patches have been applied which change things. This
series includes a partial review of one, which makes 'bootefi test' work.
But there are still problems with 'bootefi selftest':
$ sandbox/u-boot -D -c "bootefi selftest"
...
Executing 'block device'
/home/sjg/c/src/third_party/u-boot/files/lib/efi_selftest/efi_selftest_block_device.c(385):
TODO: Wrong volume label 'xxa1', expected 'U-BOOT TEST'
map_to_sysmem: Added map from 00007ffd0782d2a0 to 8000000
phys_to_virt: Used map from 8000000 to 00007ffd0782d2a0
writing /u-boot.txt
find_tag: Used map from 00007ffd0782d2a0 to 8000000
phys_to_virt: Used map from 8000000 to 00007ffd0782d2a0
/home/sjg/c/src/third_party/u-boot/files/lib/efi_selftest/efi_selftest_block_device.c(458):
ERROR: Unexpected file content
/home/sjg/c/src/third_party/u-boot/files/lib/efi_selftest/efi_selftest.c(109):
ERROR: Executing 'block device' failed
...
Executing 'simple network protocol'
DHCP Discover
DHCP Discover
DHCP Discover
DHCP Discover
DHCP Discover
DHCP Discover
DHCP Discover
DHCP Discover
DHCP Discover
DHCP Discover
/home/sjg/c/src/third_party/u-boot/files/lib/efi_selftest/efi_selftest_snp.c(311):
ERROR: Timeout occurred
/home/sjg/c/src/third_party/u-boot/files/lib/efi_selftest/efi_selftest.c(109):
ERROR: Executing 'simple network protocol' failed
This series is at u-boot-dm/efi-working
Changes in v9:
- Add comments to bootefi_test_prepare() about the memset()s
- Add revert for "efi_loader: Rename sections to allow for implicit data"
- Drop fdt_end variable in efi_install_fdt()
- Fix 'thi' typo
Changes in v8:
- Drop 'efi: Adjust memory handling to support sandbox'
- Drop 'efi: sandbox: Add relocation constants'
- Drop 'sandbox: smbios: Update to support sandbox'
- Expand series substantially to support bootefi selftest
- Rebase to master
- Rebase to master, bringing in all EFI changes
Changes in v7:
- Drop an unnecessary comment
- Drop patch "efi: Init the 'rows' and 'cols' variables"
- Drop patches previous applied
- Update patch subject s/builder/build/
Changes in v6:
- Warn about building sandbox EFI support on something other than __x86_64__
Changes in v5:
- Add new patch to disallow CMD_BOOTEFI_SELFTEST on sandbox
- Drop call to efi_init_obj_list() which is now done in do_bootefi()
- Introduce load_options_path to specifyc U-Boot env var for load_options_path
- Rebase to master
Changes in v4:
- Rebase to master
- Update SPDX tags
Changes in v3:
- Add new patch to rename bootefi_test_finish() to bootefi_run_finish()
- Add new patch to split out test init/uninit into functions
- Add patch to create a function to set up for running EFI code
- Init the 'rows' and 'cols' vars to avoid a compiler error (gcc 4.8.4)
- Rebase to master
Changes in v2:
- Rebase to master
Alexander Graf (1):
efi_loader: Pass address to fs_read()
Simon Glass (17):
Revert "efi_loader: Rename sections to allow for implicit data"
efi: Don't allow CMD_BOOTEFI_SELFTEST on sandbox
efi: sandbox: Add distroboot support
efi: sandbox: Enable EFI loader build for sandbox
efi: Split out test init/uninit into functions
efi: sandbox: Add a simple 'bootefi test' command
efi: Create a function to set up for running EFI code
efi: Rename bootefi_test_finish() to bootefi_run_finish()
sandbox: Align RAM buffer to the machine page size
sandbox: Try to start the RAM buffer at a particular address
sandbox: Add support for calling abort()
sandbox: Enhance map_to_sysmem() to handle foreign pointers
efi: Add a call to exit() along with why we can't use it
efi: Relocate FDT to 127MB instead of 128MB
efi: sandbox: Tidy up copy_fdt() to work with sandbox
efi: Add more debugging for memory allocations
efi: sandbox: Enable selftest command
arch/sandbox/config.mk | 3 -
arch/sandbox/cpu/cpu.c | 141 ++++++++++++++++--
arch/sandbox/cpu/os.c | 17 ++-
arch/sandbox/cpu/state.c | 8 +
arch/sandbox/cpu/u-boot.lds | 9 +-
arch/sandbox/include/asm/state.h | 21 +++
cmd/bootefi.c | 242 +++++++++++++++++++++----------
configs/sandbox_defconfig | 1 +
include/config_distro_bootcmd.h | 11 ++
include/efi_loader.h | 3 +
include/os.h | 4 +
lib/efi_loader/Kconfig | 12 +-
lib/efi_loader/Makefile | 1 +
lib/efi_loader/efi_boottime.c | 15 ++
lib/efi_loader/efi_file.c | 5 +-
lib/efi_loader/efi_memory.c | 22 ++-
lib/efi_loader/efi_test.c | 26 ++++
17 files changed, 439 insertions(+), 102 deletions(-)
create mode 100644 lib/efi_loader/efi_test.c
--
2.18.0.597.ga71716f1ad-goog
next reply other threads:[~2018-08-08 9:54 UTC|newest]
Thread overview: 48+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-08-08 9:54 Simon Glass [this message]
2018-08-08 9:54 ` [U-Boot] [PATCH v9 01/18] Revert "efi_loader: Rename sections to allow for implicit data" Simon Glass
2018-08-23 20:18 ` [U-Boot] [U-Boot, v9, 01/18] Partially revert " Tom Rini
2018-08-08 9:54 ` [U-Boot] [PATCH v9 02/18] efi: Don't allow CMD_BOOTEFI_SELFTEST on sandbox Simon Glass
2018-08-26 16:53 ` Alexander Graf
2018-09-14 15:46 ` Simon Glass
2018-08-08 9:54 ` [U-Boot] [PATCH v9 03/18] efi: sandbox: Add distroboot support Simon Glass
2018-08-26 16:54 ` Alexander Graf
2018-08-08 9:54 ` [U-Boot] [PATCH v9 04/18] efi: sandbox: Enable EFI loader build for sandbox Simon Glass
2018-08-26 16:55 ` Alexander Graf
2018-09-14 15:46 ` Simon Glass
2018-09-15 8:11 ` Alexander Graf
2018-09-15 8:32 ` Simon Glass
2018-08-08 9:54 ` [U-Boot] [PATCH v9 05/18] efi: Split out test init/uninit into functions Simon Glass
2018-08-08 9:54 ` [U-Boot] [PATCH v9 06/18] efi: sandbox: Add a simple 'bootefi test' command Simon Glass
2018-08-26 16:58 ` Alexander Graf
2018-09-14 15:46 ` Simon Glass
2018-08-08 9:54 ` [U-Boot] [PATCH v9 07/18] efi: Create a function to set up for running EFI code Simon Glass
2018-08-08 9:54 ` [U-Boot] [PATCH v9 08/18] efi: Rename bootefi_test_finish() to bootefi_run_finish() Simon Glass
2018-08-08 9:54 ` [U-Boot] [PATCH v9 09/18] sandbox: Align RAM buffer to the machine page size Simon Glass
2018-08-26 17:01 ` Alexander Graf
2018-08-08 9:54 ` [U-Boot] [PATCH v9 10/18] sandbox: Try to start the RAM buffer at a particular address Simon Glass
2018-08-26 17:01 ` Alexander Graf
2018-09-14 15:46 ` Simon Glass
2018-10-15 20:07 ` Simon Glass
2018-08-08 9:54 ` [U-Boot] [PATCH v9 11/18] sandbox: Add support for calling abort() Simon Glass
2018-08-08 9:54 ` [U-Boot] [PATCH v9 12/18] sandbox: Enhance map_to_sysmem() to handle foreign pointers Simon Glass
2018-08-26 17:11 ` Alexander Graf
2018-09-14 15:46 ` Simon Glass
2018-09-15 8:16 ` Alexander Graf
2018-09-15 8:31 ` Simon Glass
2018-08-08 9:54 ` [U-Boot] [PATCH v9 13/18] efi: Add a call to exit() along with why we can't use it Simon Glass
2018-08-23 20:37 ` Heinrich Schuchardt
2018-08-26 17:13 ` Alexander Graf
2018-09-14 15:46 ` Simon Glass
2018-08-08 9:54 ` [U-Boot] [PATCH v9 14/18] efi: Relocate FDT to 127MB instead of 128MB Simon Glass
2018-08-26 17:23 ` [U-Boot] [U-Boot, v9, " Alexander Graf
2018-08-08 9:54 ` [U-Boot] [PATCH v9 15/18] efi: sandbox: Tidy up copy_fdt() to work with sandbox Simon Glass
2018-08-26 17:23 ` [U-Boot] [U-Boot, v9, " Alexander Graf
2018-08-08 9:54 ` [U-Boot] [PATCH v9 16/18] efi: Add more debugging for memory allocations Simon Glass
2018-08-23 20:49 ` Heinrich Schuchardt
2018-08-26 18:27 ` Simon Glass
2018-08-26 17:22 ` Alexander Graf
2018-08-08 9:54 ` [U-Boot] [PATCH v9 17/18] efi_loader: Pass address to fs_read() Simon Glass
2018-08-26 17:23 ` [U-Boot] [U-Boot, v9, " Alexander Graf
2018-08-08 9:54 ` [U-Boot] [PATCH v9 18/18] efi: sandbox: Enable selftest command Simon Glass
2018-08-26 17:28 ` [U-Boot] [PATCH v9 00/18] efi: Enable sandbox support for EFI loader Alexander Graf
2018-09-14 15:46 ` Simon Glass
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20180808095433.230882-1-sjg@chromium.org \
--to=sjg@chromium.org \
--cc=u-boot@lists.denx.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox