From mboxrd@z Thu Jan 1 00:00:00 1970 From: Andrew Cooper Subject: Re: [PATCH v2] x86/boot: use constant in head.S instead of hardcoded value Date: Wed, 22 Oct 2014 10:56:52 +0100 Message-ID: <54477F64.5080306@citrix.com> References: <1413925748-10087-1-git-send-email-daniel.kiper@oracle.com> <1413925748-10087-2-git-send-email-daniel.kiper@oracle.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mail6.bemta4.messagelabs.com ([85.158.143.247]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1Xgsf3-00085T-D8 for xen-devel@lists.xenproject.org; Wed, 22 Oct 2014 09:56:57 +0000 In-Reply-To: <1413925748-10087-2-git-send-email-daniel.kiper@oracle.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Daniel Kiper , xen-devel@lists.xenproject.org Cc: keir@xen.org, jbeulich@suse.com List-Id: xen-devel@lists.xenproject.org On 21/10/14 22:09, Daniel Kiper wrote: > ..to access multiboot.mem_lower data. > > Signed-off-by: Daniel Kiper Reviewed-by: Andrew Cooper > --- > v2 - suggestions/fixes: > - align constant name to currently used convention > (suggested by Andrew Cooper and Jan Beulich). > --- > xen/arch/x86/boot/head.S | 2 +- > xen/arch/x86/x86_64/asm-offsets.c | 1 + > 2 files changed, 2 insertions(+), 1 deletion(-) > > diff --git a/xen/arch/x86/boot/head.S b/xen/arch/x86/boot/head.S > index cd43952..c99f739 100644 > --- a/xen/arch/x86/boot/head.S > +++ b/xen/arch/x86/boot/head.S > @@ -101,7 +101,7 @@ __start: > */ > testb $MBI_MEMLIMITS,(%ebx) > jz 2f /* not available? BDA value will be fine */ > - mov 4(%ebx),%edx > + mov MB_mem_lower(%ebx),%edx > cmp $0x100,%edx /* is the multiboot value too small? */ > jb 2f /* if so, do not use it */ > shl $10-4,%edx > diff --git a/xen/arch/x86/x86_64/asm-offsets.c b/xen/arch/x86/x86_64/asm-offsets.c > index 3994f4d..447c650 100644 > --- a/xen/arch/x86/x86_64/asm-offsets.c > +++ b/xen/arch/x86/x86_64/asm-offsets.c > @@ -165,4 +165,5 @@ void __dummy__(void) > > OFFSET(MB_flags, multiboot_info_t, flags); > OFFSET(MB_cmdline, multiboot_info_t, cmdline); > + OFFSET(MB_mem_lower, multiboot_info_t, mem_lower); > }