[PATCH v8 5/8] sandbox: Report host default-filename in native mode
Simon Glass
sjg at chromium.org
Sun Oct 27 18:16:32 CET 2024
Hi Ilias, Heinrich,
On Fri, 25 Oct 2024 at 11:57, Ilias Apalodimas
<ilias.apalodimas at linaro.org> wrote:
>
> Hi Simon,
>
>
> On Tue, 22 Oct 2024 at 15:00, Simon Glass <sjg at chromium.org> wrote:
> >
> > When the --native flag is given, pretend to be running the host
> > architecture rather than sandbox.
> >
> > Add an 'efidebug filename' command to report it.
>
> Heinrich does this allow you to continue your testing in native archs?
Yes, Heinrich seems OK with it.
Separately from this patch, at present something is broken / missing
on x86_64 (with recent QEMU / Tianocore), so I cannot run the tests
with qemu-x86_64 today. It was apparently running OK before the last
EDK II and QEMU updates.
Also sandbox only works with the EFI Self-Certification Test (SCT)
when natively compiled on aarch64 or riscv64[1][2]. There might be
something missing on sandbox x86_64, which gives a segfault when
running InstallX64.efi
I am running these:
ii ovmf 2024.02-2 all UEFI firmware for 64-bit
x86 virtual machines
ii qemu-system-x86 1:8.2.2+ds-0ubuntu1.2 amd64 QEMU full
system emulation binaries (x86)
So far I have not tried going back to older versions.
>
> >
> > Signed-off-by: Simon Glass <sjg at chromium.org>
> > ---
> >
> > Changes in v8:
> > - Add new patch to report host default-filename in native mode
> >
> > boot/bootmeth_efi.c | 25 ++------------------
> > boot/efi_fname.c | 57 +++++++++++++++++++++++++++++++++------------
> > cmd/efidebug.c | 25 ++++++++++++++++++++
> > include/efi.h | 25 ++++++++++++++++++++
> > 4 files changed, 94 insertions(+), 38 deletions(-)
> >
[..]
> > diff --git a/include/efi.h b/include/efi.h
> > index 1b8093bd4d3..70bb47e742f 100644
> > --- a/include/efi.h
> > +++ b/include/efi.h
> > @@ -678,4 +678,29 @@ void efi_show_tables(struct efi_system_table *systab);
> > */
> > const char *efi_get_basename(void);
> >
> > +#ifdef CONFIG_SANDBOX
> > +#include <asm/state.h>
> > +#endif
> > +
> > +static inline bool efi_use_host_arch(void)
> > +{
> > +#ifdef CONFIG_SANDBOX
>
> #if IS_ENABLED(CONFIG_SANDBOX) is preferred no ?
That is more for use with if(), which I cannot use here.
>
> > + struct sandbox_state *state = state_get_current();
> > +
> > + return state->native;
> > +#else
> > + return false;
> > +#endif
> > +}
> > +
[..]
Regards,
Simon
[1] https://github.com/U-Boot-EFI/u-boot-sct-results
[2] https://github.com/xypron/sct_release_test/tree/main
More information about the U-Boot
mailing list