lkml.org 
[lkml]   [2020]   [May]   [18]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v3 31/75] x86/head/64: Install boot GDT
On Tue, Apr 28, 2020 at 05:16:41PM +0200, Joerg Roedel wrote:
> @@ -480,6 +500,22 @@ SYM_DATA_LOCAL(early_gdt_descr_base, .quad INIT_PER_CPU_VAR(gdt_page))
> SYM_DATA(phys_base, .quad 0x0)
> EXPORT_SYMBOL(phys_base)
>
> +/* Boot GDT used when kernel addresses are not mapped yet */
> +SYM_DATA_LOCAL(boot_gdt_descr, .word boot_gdt_end - boot_gdt)
> +SYM_DATA_LOCAL(boot_gdt_base, .quad 0)
> +SYM_DATA_START(boot_gdt)
> + .quad 0
> + .quad 0x00cf9a000000ffff /* __KERNEL32_CS */
> + .quad 0x00af9a000000ffff /* __KERNEL_CS */
> + .quad 0x00cf92000000ffff /* __KERNEL_DS */
> + .quad 0 /* __USER32_CS - unused */
> + .quad 0 /* __USER_DS - unused */
> + .quad 0 /* __USER_CS - unused */
> + .quad 0 /* unused */
> + .quad 0x0080890000000000 /* TSS descriptor */
> + .quad 0x0000000000000000 /* TSS continued */

Any chance you could use macros ala GDT_ENTRY_INIT() for those instead
of the naked values?

--
Regards/Gruss,
Boris.

https://people.kernel.org/tglx/notes-about-netiquette

\
 
 \ /
  Last update: 2020-05-18 10:24    [W:0.932 / U:0.452 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site