Message ID | 20180613023728.202173-6-sjg@chromium.org |
---|---|
State | Superseded |
Delegated to: | Simon Glass |
Headers | show |
Series | efi: Enable basic sandbox support for EFI loader | expand |
On 06/13/2018 04:37 AM, Simon Glass wrote: > With sandbox these values depend on the host system. Let's assume that it > is x86_64 for now. > > Signed-off-by: Simon Glass <sjg@chromium.org> > --- > > Changes in v6: > - Warn about building sandbox EFI support on something other than __x86_64__ > > Changes in v5: None > Changes in v4: None > Changes in v3: None > Changes in v2: None > > include/config_distro_bootcmd.h | 13 +++++++++++++ > 1 file changed, 13 insertions(+) > > diff --git a/include/config_distro_bootcmd.h b/include/config_distro_bootcmd.h > index d672e8ebe6..1bd79ae3b8 100644 > --- a/include/config_distro_bootcmd.h > +++ b/include/config_distro_bootcmd.h > @@ -251,6 +251,8 @@ > #elif defined(CONFIG_ARM) > #define BOOTENV_EFI_PXE_ARCH "0xa" > #define BOOTENV_EFI_PXE_VCI "PXEClient:Arch:00010:UNDI:003000" > + > +/* For sandbox we only support 64-bit x86 at present */ I think the TODO in the CONFIG_SANDBOX part is enough, no need to duplicate it here. Alex > #elif defined(CONFIG_X86) > /* Always assume we're running 64bit */ > #define BOOTENV_EFI_PXE_ARCH "0x7" > @@ -261,6 +263,17 @@ > #elif defined(CONFIG_CPU_RISCV_64) > #define BOOTENV_EFI_PXE_ARCH "0x1b" > #define BOOTENV_EFI_PXE_VCI "PXEClient:Arch:00027:UNDI:003000" > +#elif defined(CONFIG_SANDBOX) > +/* > + * TODO(sjg@chromium.org): Consider providing a way to enable sandbox features > + * based on the host architecture > + */ > +# ifndef __x86_64__ > +# warning "sandbox EFI support is only tested on 64-bit x86" > +# endif > +/* To support other *host* architectures this should be changed */ > +#define BOOTENV_EFI_PXE_ARCH "0x7" > +#define BOOTENV_EFI_PXE_VCI "PXEClient:Arch:00007:UNDI:003000" > #else > #error Please specify an EFI client identifier > #endif
diff --git a/include/config_distro_bootcmd.h b/include/config_distro_bootcmd.h index d672e8ebe6..1bd79ae3b8 100644 --- a/include/config_distro_bootcmd.h +++ b/include/config_distro_bootcmd.h @@ -251,6 +251,8 @@ #elif defined(CONFIG_ARM) #define BOOTENV_EFI_PXE_ARCH "0xa" #define BOOTENV_EFI_PXE_VCI "PXEClient:Arch:00010:UNDI:003000" + +/* For sandbox we only support 64-bit x86 at present */ #elif defined(CONFIG_X86) /* Always assume we're running 64bit */ #define BOOTENV_EFI_PXE_ARCH "0x7" @@ -261,6 +263,17 @@ #elif defined(CONFIG_CPU_RISCV_64) #define BOOTENV_EFI_PXE_ARCH "0x1b" #define BOOTENV_EFI_PXE_VCI "PXEClient:Arch:00027:UNDI:003000" +#elif defined(CONFIG_SANDBOX) +/* + * TODO(sjg@chromium.org): Consider providing a way to enable sandbox features + * based on the host architecture + */ +# ifndef __x86_64__ +# warning "sandbox EFI support is only tested on 64-bit x86" +# endif +/* To support other *host* architectures this should be changed */ +#define BOOTENV_EFI_PXE_ARCH "0x7" +#define BOOTENV_EFI_PXE_VCI "PXEClient:Arch:00007:UNDI:003000" #else #error Please specify an EFI client identifier #endif
With sandbox these values depend on the host system. Let's assume that it is x86_64 for now. Signed-off-by: Simon Glass <sjg@chromium.org> --- Changes in v6: - Warn about building sandbox EFI support on something other than __x86_64__ Changes in v5: None Changes in v4: None Changes in v3: None Changes in v2: None include/config_distro_bootcmd.h | 13 +++++++++++++ 1 file changed, 13 insertions(+)