Re: [PATCH 1/9] x86, boot: Move lldt/ltr out of 64bit only path

Yinghai Lu
2012-11-16T18:15:25Z

[-- Attachment #1: Type: text/plain, Size: 292 bytes --]

On Fri, Nov 16, 2012 at 7:55 AM, H. Peter Anvin <hpa@zytor.com> wrote:
> On 11/16/2012 12:53 AM, Yinghai Lu wrote:
>>
>> Also it push down startup_64 to 0x208.
>>
>
> NAK. 0x200 is an ABI, you can't change it.
>

ok, will add attached patche before this one and keep 0x200.

Thanks

Yinghai

[-- Attachment #2: move_verify_cpu.patch --]
[-- Type: application/octet-stream, Size: 913 bytes --]

Subject: [PATCH] x86, boot: move verify_cpu.S after 0x200

We are short of space before 0x200 for startup_64.

before that are 32 bit code. We could move function verify_cpu down

Signed-off-by: Yinghai Lu <yinghai@kernel.org>

---
arch/x86/boot/compressed/head_64.S | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)

Index: linux-2.6/arch/x86/boot/compressed/head_64.S
===================================================================
--- linux-2.6.orig/arch/x86/boot/compressed/head_64.S
+++ linux-2.6/arch/x86/boot/compressed/head_64.S
@@ -182,8 +182,6 @@ no_longmode:
hlt
jmp 1b

-#include "../../kernel/verify_cpu.S"
-
/*
* Be careful here startup_64 needs to be at a predictable
* address so I can export it in an ELF header. Bootloaders
@@ -349,6 +347,9 @@ relocated:
*/
jmp *%rbp

+ .code32
+#include "../../kernel/verify_cpu.S"
+
.data
gdt:
.word gdt_end - gdt