Received: from list by lists.gnu.org with archive (Exim 4.71) id 1ZOq4r-0000z3-5u for mharc-grub-devel@gnu.org; Mon, 10 Aug 2015 12:37:33 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:36269) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZOq4o-0000vR-6J for grub-devel@gnu.org; Mon, 10 Aug 2015 12:37:31 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZOq4j-0002Fu-6Y for grub-devel@gnu.org; Mon, 10 Aug 2015 12:37:30 -0400 Received: from userp1040.oracle.com ([156.151.31.81]:28617) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZOq4i-0002Fj-Vv for grub-devel@gnu.org; Mon, 10 Aug 2015 12:37:25 -0400 Received: from userv0021.oracle.com (userv0021.oracle.com [156.151.31.71]) by userp1040.oracle.com (Sentrion-MTA-4.3.2/Sentrion-MTA-4.3.2) with ESMTP id t7AGbJim024802 (version=TLSv1 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Mon, 10 Aug 2015 16:37:19 GMT Received: from userv0121.oracle.com (userv0121.oracle.com [156.151.31.72]) by userv0021.oracle.com (8.13.8/8.13.8) with ESMTP id t7AGbJ7E007967 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=FAIL); Mon, 10 Aug 2015 16:37:19 GMT Received: from abhmp0016.oracle.com (abhmp0016.oracle.com [141.146.116.22]) by userv0121.oracle.com (8.13.8/8.13.8) with ESMTP id t7AGbHEt002032; Mon, 10 Aug 2015 16:37:17 GMT Received: from l.oracle.com (/10.137.176.158) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Mon, 10 Aug 2015 09:36:55 -0700 Received: by l.oracle.com (Postfix, from userid 1000) id F14456A3C8E; Mon, 10 Aug 2015 12:36:50 -0400 (EDT) Date: Mon, 10 Aug 2015 12:36:50 -0400 From: Konrad Rzeszutek Wilk To: Daniel Kiper Subject: Re: [Xen-devel] [PATCH v2 06/23] x86/boot: use %ecx instead of %eax Message-ID: <20150810163650.GB13576@l.oracle.com> References: <1437402558-7313-1-git-send-email-daniel.kiper@oracle.com> <1437402558-7313-7-git-send-email-daniel.kiper@oracle.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1437402558-7313-7-git-send-email-daniel.kiper@oracle.com> User-Agent: Mutt/1.5.23 (2014-03-12) X-Source-IP: userv0021.oracle.com [156.151.31.71] X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.4.x-2.6.x [generic] X-Received-From: 156.151.31.81 Cc: jgross@suse.com, grub-devel@gnu.org, keir@xen.org, ian.campbell@citrix.com, stefano.stabellini@eu.citrix.com, andrew.cooper3@citrix.com, gang.wei@intel.com, roy.franz@linaro.org, ning.sun@intel.com, david.vrabel@citrix.com, jbeulich@suse.com, phcoder@gmail.com, xen-devel@lists.xenproject.org, wei.liu2@citrix.com, richard.l.maliszewski@intel.com, qiaowei.ren@intel.com, fu.wei@linaro.org X-BeenThere: grub-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list Reply-To: The development of GNU GRUB List-Id: The development of GNU GRUB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 10 Aug 2015 16:37:31 -0000 On Mon, Jul 20, 2015 at 04:29:01PM +0200, Daniel Kiper wrote: > Use %ecx instead of %eax to store low memory upper limit from EBDA. > This way we do not wipe multiboot protocol identifier. It is needed > in reloc() to differentiate between multiboot (v1) and > multiboot2 protocol. > > Signed-off-by: Daniel Kiper > Reviewed-by: Andrew Cooper Reviewed-by: Konrad Rzeszutek Wilk > --- > xen/arch/x86/boot/head.S | 24 ++++++++++++------------ > 1 file changed, 12 insertions(+), 12 deletions(-) > > diff --git a/xen/arch/x86/boot/head.S b/xen/arch/x86/boot/head.S > index 3cbb2e6..77e7da9 100644 > --- a/xen/arch/x86/boot/head.S > +++ b/xen/arch/x86/boot/head.S > @@ -87,14 +87,14 @@ __start: > jne not_multiboot > > /* Set up trampoline segment 64k below EBDA */ > - movzwl 0x40e,%eax /* EBDA segment */ > - cmp $0xa000,%eax /* sanity check (high) */ > + movzwl 0x40e,%ecx /* EBDA segment */ > + cmp $0xa000,%ecx /* sanity check (high) */ > jae 0f > - cmp $0x4000,%eax /* sanity check (low) */ > + cmp $0x4000,%ecx /* sanity check (low) */ > jae 1f > 0: > - movzwl 0x413,%eax /* use base memory size on failure */ > - shl $10-4,%eax > + movzwl 0x413,%ecx /* use base memory size on failure */ > + shl $10-4,%ecx > 1: > /* > * Compare the value in the BDA with the information from the > @@ -106,21 +106,21 @@ __start: > cmp $0x100,%edx /* is the multiboot value too small? */ > jb 2f /* if so, do not use it */ > shl $10-4,%edx > - cmp %eax,%edx /* compare with BDA value */ > - cmovb %edx,%eax /* and use the smaller */ > + cmp %ecx,%edx /* compare with BDA value */ > + cmovb %edx,%ecx /* and use the smaller */ > > 2: /* Reserve 64kb for the trampoline */ > - sub $0x1000,%eax > + sub $0x1000,%ecx > > /* From arch/x86/smpboot.c: start_eip had better be page-aligned! */ > - xor %al, %al > - shl $4, %eax > - mov %eax,sym_phys(trampoline_phys) > + xor %cl, %cl > + shl $4, %ecx > + mov %ecx,sym_phys(trampoline_phys) > > /* Save the Multiboot info struct (after relocation) for later use. */ > mov $sym_phys(cpu0_stack)+1024,%esp > push %ebx /* Multiboot information address. */ > - push %eax /* Boot trampoline address. */ > + push %ecx /* Boot trampoline address. */ > call reloc > add $8,%esp /* Remove reloc() args from stack. */ > mov %eax,sym_phys(multiboot_ptr) > -- > 1.7.10.4 > > > _______________________________________________ > Xen-devel mailing list > Xen-devel@lists.xen.org > http://lists.xen.org/xen-devel