[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH v2 03/23] x86: zero BSS using stosl instead of stosb
From: |
Daniel Kiper |
Subject: |
[PATCH v2 03/23] x86: zero BSS using stosl instead of stosb |
Date: |
Mon, 20 Jul 2015 16:28:58 +0200 |
Additionally, align relevant comment to coding style.
Suggested-by: Andrew Cooper <address@hidden>
Signed-off-by: Daniel Kiper <address@hidden>
---
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
- [PATCH v2 00/23] x86: multiboot2 protocol support, Daniel Kiper, 2015/07/20
- [PATCH v2 01/23] x86/boot: remove unneeded instruction, Daniel Kiper, 2015/07/20
- [PATCH v2 04/23] x86/boot: call reloc() using cdecl calling convention, Daniel Kiper, 2015/07/20
- [PATCH v2 03/23] x86: zero BSS using stosl instead of stosb,
Daniel Kiper <=
- [PATCH v2 07/23] x86/boot/reloc: Rename some variables and rearrange code a bit, Daniel Kiper, 2015/07/20
- [PATCH v2 06/23] x86/boot: use %ecx instead of %eax, Daniel Kiper, 2015/07/20
- [PATCH v2 05/23] x86/boot/reloc: create generic alloc and copy functions, Daniel Kiper, 2015/07/20
- [PATCH v2 08/23] x86: add multiboot2 protocol support, Daniel Kiper, 2015/07/20
- [PATCH v2 11/23] efi: split out efi_init(), Daniel Kiper, 2015/07/20
- [PATCH v2 12/23] efi: split out efi_console_set_mode(), Daniel Kiper, 2015/07/20
- [PATCH v2 02/23] x86/boot: copy only text section from *.lnk file to *.bin file, Daniel Kiper, 2015/07/20
- [PATCH v2 13/23] efi: split out efi_get_gop(), Daniel Kiper, 2015/07/20
- [PATCH v2 16/23] efi: split out efi_variables(), Daniel Kiper, 2015/07/20
- [PATCH v2 19/23] x86/efi: create new early memory allocator, Daniel Kiper, 2015/07/20