grub-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [GRUB2 PATCH v5 1/4] i386/relocator: Add grub_relocator64_efi reloca


From: Konrad Rzeszutek Wilk
Subject: Re: [GRUB2 PATCH v5 1/4] i386/relocator: Add grub_relocator64_efi relocator
Date: Fri, 25 Mar 2016 12:28:46 -0400
User-agent: Mutt/1.5.24 (2015-08-30)

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 <address@hidden>

Reviewed-by: Konrad Rzeszutek Wilk <address@hidden>

.. 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?

Thanks.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]