mbox series

[00/11] sandbox: efi_loader support

Message ID 20180614163334.46827-1-agraf@suse.de
Headers show
Series sandbox: efi_loader support | expand

Message

Alexander Graf June 14, 2018, 4:33 p.m. UTC
This patch set augments Simon's patch set for efi_loader support
in sandbox[1], but follows a different memory allocation scheme.

Instead of keeping U-Boot (physical) addresses in the EFI memory
map, this patch set makes the EFI memory map contain host virtual
(virtual) addresses. That way most logic "just works" and all EFI
interfaces automatically gain sandbox awareness.

With this patch set in place, I can run a good chunk of the selftest
suite as well as efi binaries compiled using gnu-efi.

Alex

[1] https://patchwork.ozlabs.org/project/uboot/list/?series=49832

Alexander Graf (7):
  efi_loader: Use compiler constants for image loader
  efi_loader: Use map_sysmem() in bootefi command
  efi.h: Do not use config options
  efi_loader: Allow SMBIOS tables in highmem
  sandbox: Map host memory for efi_loader
  efi_loader: Disable miniapps on sandbox
  efi_loader: Pass virtual address to fs_read()

Heinrich Schuchardt (1):
  efi_loader: efi_allocate_pages is too restrictive

Simon Glass (3):
  efi: sandbox: Add distroboot support
  efi: sandbox: Add relocation constants
  efi: sandbox: Enable EFI loader for sandbox

 arch/sandbox/cpu/cpu.c            | 16 ++++++++++++++++
 cmd/bootefi.c                     | 13 ++++++++-----
 include/config_distro_bootcmd.h   | 13 +++++++++++++
 include/efi.h                     | 17 ++++-------------
 lib/efi/Makefile                  |  4 ++--
 lib/efi_loader/Kconfig            |  2 +-
 lib/efi_loader/efi_file.c         |  4 +++-
 lib/efi_loader/efi_image_loader.c | 12 ++++++------
 lib/efi_loader/efi_memory.c       |  2 +-
 lib/efi_loader/efi_runtime.c      | 12 ++++++++++++
 lib/efi_loader/efi_smbios.c       | 11 +++++++++--
 lib/efi_selftest/Makefile         |  2 +-
 12 files changed, 76 insertions(+), 32 deletions(-)

Comments

Simon Glass June 14, 2018, 4:55 p.m. UTC | #1
Hi,

On 14 June 2018 at 10:33, Alexander Graf <agraf@suse.de> wrote:
> This patch set augments Simon's patch set for efi_loader support
> in sandbox[1], but follows a different memory allocation scheme.
>
> Instead of keeping U-Boot (physical) addresses in the EFI memory
> map, this patch set makes the EFI memory map contain host virtual
> (virtual) addresses. That way most logic "just works" and all EFI
> interfaces automatically gain sandbox awareness.
>
> With this patch set in place, I can run a good chunk of the selftest
> suite as well as efi binaries compiled using gnu-efi.

Can you rebase this on top of my series? You seem to have picked up
only a few patches from my series. Ideally I'd like to get those
applied so that sandbox works, and then do future work on top of that.

Regards,
Simon
Alexander Graf June 14, 2018, 5:10 p.m. UTC | #2
On 06/14/2018 06:55 PM, Simon Glass wrote:
> Hi,
>
> On 14 June 2018 at 10:33, Alexander Graf <agraf@suse.de> wrote:
>> This patch set augments Simon's patch set for efi_loader support
>> in sandbox[1], but follows a different memory allocation scheme.
>>
>> Instead of keeping U-Boot (physical) addresses in the EFI memory
>> map, this patch set makes the EFI memory map contain host virtual
>> (virtual) addresses. That way most logic "just works" and all EFI
>> interfaces automatically gain sandbox awareness.
>>
>> With this patch set in place, I can run a good chunk of the selftest
>> suite as well as efi binaries compiled using gnu-efi.
> Can you rebase this on top of my series? You seem to have picked up
> only a few patches from my series. Ideally I'd like to get those
> applied so that sandbox works, and then do future work on top of that.

I did that on purpose, yes. I omitted patches that we either don't need 
(like the smbios one, because we already call the helpers with pointers) 
or that I think move us into the wrong direction (like the one that 
calls map_sysmem() in the allocation path or the new bootefi test target 
where I would rather like to see the selftest target extended.


Alex