[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-devel] [PATCH 5/5] x86/boot: Move/copy sections more efficiently
Both the trampoline copy and BSS initialise can be performed more efficiently by using 4-byte varients of the string operations. The ALIGN(STACK_SIZE) actually belongs with .bss.stack_aligned, but __init_end still needs page alignment because of the init sections being freed and returned to the domheap after boot. Signed-off-by: Andrew Cooper <andrew.cooper3@xxxxxxxxxx> CC: Jan Beulich <JBeulich@xxxxxxxx> --- xen/arch/x86/boot/head.S | 9 +++++---- xen/arch/x86/xen.lds.S | 5 ++++- 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/xen/arch/x86/boot/head.S b/xen/arch/x86/boot/head.S index cfd59dc..604c515 100644 --- a/xen/arch/x86/boot/head.S +++ b/xen/arch/x86/boot/head.S @@ -128,7 +128,8 @@ __start: mov $sym_phys(__bss_end),%ecx sub %edi,%ecx xor %eax,%eax - rep stosb + shr $2,%ecx + rep stosl /* Interrogate CPU extended features via CPUID. */ mov $0x80000000,%eax @@ -198,8 +199,8 @@ __start: /* Copy bootstrap trampoline to low memory, below 1MB. */ mov $sym_phys(trampoline_start),%esi - mov $trampoline_end - trampoline_start,%ecx - rep movsb + mov $((trampoline_end - trampoline_start) / 4),%ecx + rep movsl /* Jump into the relocated trampoline. */ lret @@ -211,6 +212,6 @@ reloc: ENTRY(trampoline_start) #include "trampoline.S" -GLOBAL(trampoline_end) +ENTRY(trampoline_end) #include "x86_64.S" diff --git a/xen/arch/x86/xen.lds.S b/xen/arch/x86/xen.lds.S index 8295ecf..b49c031 100644 --- a/xen/arch/x86/xen.lds.S +++ b/xen/arch/x86/xen.lds.S @@ -153,11 +153,13 @@ SECTIONS __xsm_initcall_start = .; *(.xsm_initcall.init) __xsm_initcall_end = .; + + . = ALIGN(PAGE_SIZE); } :text - . = ALIGN(STACK_SIZE); __init_end = .; .bss : { /* BSS */ + . = ALIGN(STACK_SIZE); __bss_start = .; *(.bss.stack_aligned) . = ALIGN(PAGE_SIZE); @@ -170,6 +172,7 @@ SECTIONS *(.bss.percpu.read_mostly) . = ALIGN(SMP_CACHE_BYTES); __per_cpu_data_end = .; + . = ALIGN(8); __bss_end = .; } :text _end = . ; -- 1.7.10.4 _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxx http://lists.xen.org/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |