xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
From: Daniel Kiper <daniel.kiper@oracle.com>
To: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Cc: jgross@suse.com, grub-devel@gnu.org, eric.snowberg@oracle.com,
	arvidjaar@gmail.com, andrew.cooper3@citrix.com,
	stefano.stabellini@eu.citrix.com, cardoe@cardoe.com,
	pgnet.dev@gmail.com, roy.franz@linaro.org, ning.sun@intel.com,
	david.vrabel@citrix.com, jbeulich@suse.com, phcoder@gmail.com,
	xen-devel@lists.xenproject.org, qiaowei.ren@intel.com,
	richard.l.maliszewski@intel.com, gang.wei@intel.com,
	fu.wei@linaro.org, seth.goldberg@oracle.com
Subject: Re: [GRUB2 PATCH v5 1/4] i386/relocator: Add grub_relocator64_efi relocator
Date: Fri, 25 Mar 2016 21:43:39 +0100	[thread overview]
Message-ID: <20160325204339.GQ3489__4730.9524067261$1458938741$gmane$org@olila.local.net-space.pl> (raw)
In-Reply-To: <20160325162846.GA20741@char.us.oracle.com>

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@oracle.com>
>
> Reviewed-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
>
> .. 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@lists.xen.org
http://lists.xen.org/xen-devel

  parent reply	other threads:[~2016-03-25 20:44 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <1458320427-4653-1-git-send-email-daniel.kiper@oracle.com>
2016-03-18 17:00 ` [GRUB2 PATCH v5 1/4] i386/relocator: Add grub_relocator64_efi relocator Daniel Kiper
2016-03-25 16:28   ` Konrad Rzeszutek Wilk
     [not found]   ` <20160325162846.GA20741@char.us.oracle.com>
2016-03-25 20:43     ` Daniel Kiper [this message]
2016-03-18 17:00 ` [GRUB2 PATCH v5 2/4] multiboot2: Add tags used to pass ImageHandle to loaded image Daniel Kiper
2016-03-18 17:00 ` [GRUB2 PATCH v5 3/4 - FOR REVIEW ONLY] multiboot2: Do not pass memory maps to image if EFI boot services are enabled Daniel Kiper
2016-03-18 17:00 ` [GRUB2 PATCH v5 3/4 - FOR COMMIT] " Daniel Kiper
2016-03-18 17:00 ` [GRUB2 PATCH v5 4/4] multiboot2: Add support for relocatable images Daniel Kiper
     [not found] ` <1458320427-4653-6-git-send-email-daniel.kiper@oracle.com>
2016-03-25 16:54   ` Konrad Rzeszutek Wilk

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='20160325204339.GQ3489__4730.9524067261$1458938741$gmane$org@olila.local.net-space.pl' \
    --to=daniel.kiper@oracle.com \
    --cc=andrew.cooper3@citrix.com \
    --cc=arvidjaar@gmail.com \
    --cc=cardoe@cardoe.com \
    --cc=david.vrabel@citrix.com \
    --cc=eric.snowberg@oracle.com \
    --cc=fu.wei@linaro.org \
    --cc=gang.wei@intel.com \
    --cc=grub-devel@gnu.org \
    --cc=jbeulich@suse.com \
    --cc=jgross@suse.com \
    --cc=konrad.wilk@oracle.com \
    --cc=ning.sun@intel.com \
    --cc=pgnet.dev@gmail.com \
    --cc=phcoder@gmail.com \
    --cc=qiaowei.ren@intel.com \
    --cc=richard.l.maliszewski@intel.com \
    --cc=roy.franz@linaro.org \
    --cc=seth.goldberg@oracle.com \
    --cc=stefano.stabellini@eu.citrix.com \
    --cc=xen-devel@lists.xenproject.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).