|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [GRUB2 PATCH v5 1/4] i386/relocator: Add grub_relocator64_efi relocator
On Fri, Mar 25, 2016 at 12:28:46PM -0400, Konrad Rzeszutek Wilk wrote:
> On Fri, Mar 18, 2016 at 06:00:23PM +0100, Daniel Kiper wrote:
> > Add grub_relocator64_efi relocator. It will be used on EFI 64-bit platforms
> > when multiboot2 compatible image requests MULTIBOOT_TAG_TYPE_EFI_BS.
> > Relocator
> > will set lower parts of %rax and %rbx accordingly to multiboot2
> > specification.
> > On the other hand processor mode, just before jumping into loaded image,
> > will
> > be set accordingly to Unified Extensible Firmware Interface Specification,
> > Version 2.4 Errata B, section 2.3.4, x64 Platforms, boot services. This way
> > loaded image will be able to use EFI boot services without any issues.
> >
> > Signed-off-by: Daniel Kiper <daniel.kiper@xxxxxxxxxx>
>
> Reviewed-by: Konrad Rzeszutek Wilk <konrad.wilk@xxxxxxxxxx>
>
> .. with one modification:
> .. snip..
> > diff --git a/grub-core/lib/x86_64/efi/relocator.c
> > b/grub-core/lib/x86_64/efi/relocator.c
> > new file mode 100644
> > index 0000000..c93d061
> > --- /dev/null
> > +++ b/grub-core/lib/x86_64/efi/relocator.c
> > +grub_err_t
> > +grub_relocator64_efi_boot (struct grub_relocator *rel,
> > + struct grub_relocator64_efi_state state)
> > +{
> > + grub_err_t err;
> > + void *relst;
> > + grub_relocator_chunk_t ch;
> > +
> > + err = grub_relocator_alloc_chunk_align (rel, &ch, 0,
> > + 0x40000000 - RELOCATOR_SIZEOF
> > (64_efi),
> ^^^^^^^^^^ - why the 1GB?
>
> Could you give a bit details on it? Or preferrable have a comment right
> above saying what that value is used?
I took this from BSD loader. I assumed that if it uses this value then
it is safe to do the same here. However, it looks that we can safely use
"4 GiB - RELOCATOR_SIZEOF (64_efi)" too (probably higher value is also
good but I do not think we should go that way). If there are not
objections then I will repost fixed patch series next week.
Daniel
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |