[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH 1/7] efi: add grub_efi_get_dram_base() function for arm*
From: |
Daniel Kiper |
Subject: |
Re: [PATCH 1/7] efi: add grub_efi_get_dram_base() function for arm* |
Date: |
Tue, 1 Aug 2017 13:41:33 +0200 |
User-agent: |
Mutt/1.3.28i |
On Fri, Jul 28, 2017 at 06:38:22PM +0100, Leif Lindholm wrote:
> On Thu, Jul 27, 2017 at 04:27:26PM +0200, Daniel Kiper wrote:
> > On Mon, Jun 12, 2017 at 03:53:35PM +0100, Leif Lindholm wrote:
> > > Since ARM platforms do not have a common memory map, add a helper
> > > function that finds the lowest address region with the EFI_MEMORY_WB
> > > attribute set in the UEFI memory map.
> > >
> > > Required for the arm/arm64 linux loader to restrict the initrd
> > > location to where it will be accessible by the kernel at runtime.
> > >
> > > Signed-off-by: Leif Lindholm <address@hidden>
> > > ---
> > > grub-core/kern/efi/mm.c | 42 ++++++++++++++++++++++++++++++++++++++++++
> > > include/grub/efi/efi.h | 1 +
> > > 2 files changed, 43 insertions(+)
> > >
> > > diff --git a/grub-core/kern/efi/mm.c b/grub-core/kern/efi/mm.c
> > > index 20a47aaf5..460a4b763 100644
> > > --- a/grub-core/kern/efi/mm.c
> > > +++ b/grub-core/kern/efi/mm.c
> > > @@ -525,3 +525,45 @@ grub_efi_mm_init (void)
> > > grub_efi_free_pages ((grub_addr_t) memory_map,
> > > 2 * BYTES_TO_PAGES (MEMORY_MAP_SIZE));
> > > }
> > > +
> > > +#if defined (__arm__) || defined (__aarch64__)
> > > +grub_err_t
> > > +grub_efi_get_dram_base(grub_addr_t *base_addr)
> >
> > Please make this function more generic and get
> > attribute as an argument.
>
> While I am normally a huge fan of making everything as generic as
> possible, this really is a very special case - and as far as I know,
> it is really only relevant to ARM/AArch64. I would expect other
> architectures to just have a static inline, return 0 in efi/memory.h,
> if we ended up merging even more Linux EFI stub loaders together.
>
> Or are you looking for some more multidimensional memory map lookup
> thing? If so, could you give me an example invocation to work
> against?
OK, let's leave it as is. Just change function name to grub_efi_get_ram_base().
Daniel
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- Re: [PATCH 1/7] efi: add grub_efi_get_dram_base() function for arm*,
Daniel Kiper <=