From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from list by lists.gnu.org with archive (Exim 4.71) id 1ZHC5A-0004Dh-Gu for mharc-grub-devel@gnu.org; Mon, 20 Jul 2015 10:30:16 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:51932) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZHC52-00048M-Tc for grub-devel@gnu.org; Mon, 20 Jul 2015 10:30:14 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZHC4v-0000N8-3L for grub-devel@gnu.org; Mon, 20 Jul 2015 10:30:08 -0400 Received: from userp1040.oracle.com ([156.151.31.81]:48219) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZHC4u-0000Mx-Rn for grub-devel@gnu.org; Mon, 20 Jul 2015 10:30:01 -0400 Received: from aserv0022.oracle.com (aserv0022.oracle.com [141.146.126.234]) by userp1040.oracle.com (Sentrion-MTA-4.3.2/Sentrion-MTA-4.3.2) with ESMTP id t6KETlYu007654 (version=TLSv1 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Mon, 20 Jul 2015 14:29:48 GMT Received: from aserv0121.oracle.com (aserv0121.oracle.com [141.146.126.235]) by aserv0022.oracle.com (8.13.8/8.13.8) with ESMTP id t6KETlMI004529 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=FAIL); Mon, 20 Jul 2015 14:29:47 GMT Received: from abhmp0018.oracle.com (abhmp0018.oracle.com [141.146.116.24]) by aserv0121.oracle.com (8.13.8/8.13.8) with ESMTP id t6KETlom030080; Mon, 20 Jul 2015 14:29:47 GMT Received: from olila.local.net-space.pl (/10.175.255.176) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Mon, 20 Jul 2015 07:29:47 -0700 From: Daniel Kiper To: xen-devel@lists.xenproject.org, grub-devel@gnu.org Subject: [PATCH v2 03/23] x86: zero BSS using stosl instead of stosb Date: Mon, 20 Jul 2015 16:28:58 +0200 Message-Id: <1437402558-7313-4-git-send-email-daniel.kiper@oracle.com> X-Mailer: git-send-email 1.7.10.4 In-Reply-To: <1437402558-7313-1-git-send-email-daniel.kiper@oracle.com> References: <1437402558-7313-1-git-send-email-daniel.kiper@oracle.com> X-Source-IP: aserv0022.oracle.com [141.146.126.234] 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, keir@xen.org, ian.campbell@citrix.com, andrew.cooper3@citrix.com, stefano.stabellini@eu.citrix.com, roy.franz@linaro.org, ning.sun@intel.com, david.vrabel@citrix.com, jbeulich@suse.com, phcoder@gmail.com, wei.liu2@citrix.com, qiaowei.ren@intel.com, richard.l.maliszewski@intel.com, gang.wei@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, 20 Jul 2015 14:30:14 -0000 Additionally, align relevant comment to coding style. Suggested-by: Andrew Cooper Signed-off-by: Daniel Kiper --- xen/arch/x86/boot/head.S | 5 +++-- xen/arch/x86/xen.lds.S | 2 ++ 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/xen/arch/x86/boot/head.S b/xen/arch/x86/boot/head.S index f63b349..ed42782 100644 --- a/xen/arch/x86/boot/head.S +++ b/xen/arch/x86/boot/head.S @@ -123,12 +123,13 @@ __start: call reloc mov %eax,sym_phys(multiboot_ptr) - /* Initialize BSS (no nasty surprises!) */ + /* Initialize BSS (no nasty surprises!). */ mov $sym_phys(__bss_start),%edi mov $sym_phys(__bss_end),%ecx sub %edi,%ecx + shr $2,%ecx xor %eax,%eax - rep stosb + rep stosl /* Interrogate CPU extended features via CPUID. */ mov $0x80000000,%eax diff --git a/xen/arch/x86/xen.lds.S b/xen/arch/x86/xen.lds.S index 6553cff..3e1f2af 100644 --- a/xen/arch/x86/xen.lds.S +++ b/xen/arch/x86/xen.lds.S @@ -162,6 +162,7 @@ SECTIONS . = ALIGN(STACK_SIZE); __init_end = .; + . = ALIGN(4); .bss : { /* BSS */ __bss_start = .; *(.bss.stack_aligned) @@ -175,6 +176,7 @@ SECTIONS *(.bss.percpu.read_mostly) . = ALIGN(SMP_CACHE_BYTES); __per_cpu_data_end = .; + . = ALIGN(4); __bss_end = .; } :text _end = . ; -- 1.7.10.4