Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1658673
| From | "Kirill A. Shutemov" <kirill.shutemov@linux.intel.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | [PATCHv7 04/14] x86/boot/efi: Fix __KERNEL_CS definition of GDT entry on 64-bit configuration |
| Date | 2017-06-06 13:40 +0200 |
| Message-ID | <tPl07-8cX-47@gated-at.bofh.it> (permalink) |
| References | <tPl05-8cX-3@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
Define __KERNEL_CS GDT entry as long mode (.L=1, .D=0) on 64-bit
configuration.
Signed-off-by: Kirill A. Shutemov <kirill.shutemov@linux.intel.com>
Cc: Matt Fleming <matt@codeblueprint.co.uk>
---
arch/x86/boot/compressed/eboot.c | 9 +++++++--
1 file changed, 7 insertions(+), 2 deletions(-)
diff --git a/arch/x86/boot/compressed/eboot.c b/arch/x86/boot/compressed/eboot.c
index 1d5093d1f319..b75c20f779ea 100644
--- a/arch/x86/boot/compressed/eboot.c
+++ b/arch/x86/boot/compressed/eboot.c
@@ -1059,8 +1059,13 @@ struct boot_params *efi_main(struct efi_config *c,
desc->p = 1;
desc->limit = 0xf;
desc->avl = 0;
- desc->l = 0;
- desc->d = SEG_OP_SIZE_32BIT;
+ if (IS_ENABLED(CONFIG_X86_64)) {
+ desc->l = 1;
+ desc->d = 0;
+ } else {
+ desc->l = 0;
+ desc->d = SEG_OP_SIZE_32BIT;
+ }
desc->g = SEG_GRANULARITY_4KB;
desc->base2 = 0x00;
desc++;
--
2.11.0
Back to linux.kernel | Previous | Next — Previous in thread | Find similar | Unroll thread
[PATCHv7 00/14] x86: 5-level paging enabling for v4.13, Part 4 "Kirill A. Shutemov" <kirill.shutemov@linux.intel.com> - 2017-06-06 13:40 +0200 [PATCHv7 03/14] x86/boot/efi: Cleanup initialization of GDT entries "Kirill A. Shutemov" <kirill.shutemov@linux.intel.com> - 2017-06-06 13:40 +0200 [PATCHv7 06/14] x86/boot/compressed: Enable 5-level paging during decompression stage "Kirill A. Shutemov" <kirill.shutemov@linux.intel.com> - 2017-06-06 13:40 +0200 [PATCHv7 04/14] x86/boot/efi: Fix __KERNEL_CS definition of GDT entry on 64-bit configuration "Kirill A. Shutemov" <kirill.shutemov@linux.intel.com> - 2017-06-06 13:40 +0200
csiph-web