From 0a278662f53159354a0391a17741a20db736256a Mon Sep 17 00:00:00 2001 From: Cao jin Date: Wed, 23 Jan 2019 18:00:14 +0800 Subject: x86/boot: Save several bytes in decompressor gdt64 represents the content of GDTR under x86-64, which actually needs 10 bytes only, ".long" & ".word" is superfluous. Signed-off-by: Cao jin Signed-off-by: Thomas Gleixner Acked-by: Kirill A. Shutemov Cc: Cc: Link: https://lkml.kernel.org/r/20190123100014.23721-1-caoj.fnst@cn.fujitsu.com --- arch/x86/boot/compressed/head_64.S | 2 -- 1 file changed, 2 deletions(-) (limited to 'arch/x86/boot') diff --git a/arch/x86/boot/compressed/head_64.S b/arch/x86/boot/compressed/head_64.S index 64037895b085..b27b338d2f6d 100644 --- a/arch/x86/boot/compressed/head_64.S +++ b/arch/x86/boot/compressed/head_64.S @@ -645,8 +645,6 @@ no_longmode: .data gdt64: .word gdt_end - gdt - .long 0 - .word 0 .quad 0 gdt: .word gdt_end - gdt -- cgit v1.2.3 From 82434d23f36de42f70925f70d645ed3b1394361b Mon Sep 17 00:00:00 2001 From: Kirill A. Shutemov Date: Wed, 6 Feb 2019 18:29:08 +0300 Subject: x86/boot/compressed/64: Explain paging_prepare()'s return value paging_prepare() returns a two-quadword structure which lands into RDX:RAX: - Address of the trampoline is returned in RAX. - Non zero RDX means trampoline needs to enable 5-level paging. Document that explicitly. Signed-off-by: Kirill A. Shutemov Signed-off-by: Borislav Petkov Cc: dave.hansen@linux.intel.com Cc: "H. Peter Anvin" Cc: Ingo Molnar Cc: Kyle D Pelton Cc: Thomas Gleixner Cc: Wei Huang Cc: x86-ml Link: https://lkml.kernel.org/r/20190206154756.matwldebbxkmlnae@black.fi.intel.com --- arch/x86/boot/compressed/head_64.S | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'arch/x86/boot') diff --git a/arch/x86/boot/compressed/head_64.S b/arch/x86/boot/compressed/head_64.S index b27b338d2f6d..73b9d7e91a9c 100644 --- a/arch/x86/boot/compressed/head_64.S +++ b/arch/x86/boot/compressed/head_64.S @@ -358,8 +358,11 @@ ENTRY(startup_64) * paging_prepare() sets up the trampoline and checks if we need to * enable 5-level paging. * - * Address of the trampoline is returned in RAX. - * Non zero RDX on return means we need to enable 5-level paging. + * paging_prepare() returns a two-quadword structure which lands + * into RDX:RAX: + * - Address of the trampoline is returned in RAX. + * - Non zero RDX means trampoline needs to enable 5-level + * paging. * * RSI holds real mode data and needs to be preserved across * this function call. @@ -565,7 +568,7 @@ adjust_got: * * RDI contains the return address (might be above 4G). * ECX contains the base address of the trampoline memory. - * Non zero RDX on return means we need to enable 5-level paging. + * Non zero RDX means trampoline needs to enable 5-level paging. */ ENTRY(trampoline_32bit_src) /* Set up data and stack segments */ -- cgit v1.2.3