diff options
author | H. Peter Anvin <hpa@zytor.com> | 2009-05-09 01:20:34 +0200 |
---|---|---|
committer | H. Peter Anvin <hpa@zytor.com> | 2009-05-09 02:18:10 +0200 |
commit | 5b11f1cee5797b38d16b94d8745b12b6727a8373 (patch) | |
tree | 01d9ce7df1629c1ec17815c33ad3ce8b5bed3094 /arch/x86/boot/compressed/head_32.S | |
parent | x86, boot: stylistic cleanups for boot/compressed/head_64.S (diff) | |
download | linux-5b11f1cee5797b38d16b94d8745b12b6727a8373.tar.xz linux-5b11f1cee5797b38d16b94d8745b12b6727a8373.zip |
x86, boot: straighten out ranges to copy/zero in compressed/head*.S
Both on 32 and 64 bits, we copy all the way up to the end of bss,
except that on 64 bits there is a hack to avoid copying on top of the
page tables. There is no point in copying bss at all, especially
since we are just about to zero it all anyway.
To clean up and unify the handling, we now do:
- copy from startup_32 to _bss.
- zero from _bss to _ebss.
- the _ebss symbol is aligned to an 8-byte boundary.
- the page tables are moved to a separate section.
Use _bss as the copy endpoint since _edata may be misaligned.
[ Impact: cleanup, trivial performance improvement ]
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
Diffstat (limited to 'arch/x86/boot/compressed/head_32.S')
-rw-r--r-- | arch/x86/boot/compressed/head_32.S | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/arch/x86/boot/compressed/head_32.S b/arch/x86/boot/compressed/head_32.S index 7bd7766ffabf..59425e157df3 100644 --- a/arch/x86/boot/compressed/head_32.S +++ b/arch/x86/boot/compressed/head_32.S @@ -93,9 +93,9 @@ ENTRY(startup_32) * where decompression in place becomes safe. */ pushl %esi - leal _ebss(%ebp), %esi - leal _ebss(%ebx), %edi - movl $(_ebss - startup_32), %ecx + leal _bss(%ebp), %esi + leal _bss(%ebx), %edi + movl $(_bss - startup_32), %ecx std rep movsb cld @@ -125,7 +125,7 @@ relocated: * Clear BSS */ xorl %eax, %eax - leal _edata(%ebx), %edi + leal _bss(%ebx), %edi leal _ebss(%ebx), %ecx subl %edi, %ecx cld |