/kernel/linux/linux-5.10/arch/x86/include/asm/ |
H A D | desc.h | 44 struct desc_struct gdt[GDT_ENTRIES]; member 52 return per_cpu(gdt_page, cpu).gdt; in get_cpu_gdt_rw() 58 return this_cpu_ptr(&gdt_page)->gdt; in get_current_gdt_rw() 64 return (struct desc_struct *)&get_cpu_entry_area(cpu)->gdt; in get_cpu_gdt_ro() 147 native_write_gdt_entry(struct desc_struct *gdt, int entry, const void *desc, int type) in native_write_gdt_entry() argument 154 default: size = sizeof(*gdt); break; in native_write_gdt_entry() 157 memcpy(&gdt[entry], desc, size); in native_write_gdt_entry() 235 struct desc_ptr gdt; in native_load_tr_desc() local 240 native_store_gdt(&gdt); in native_load_tr_desc() 247 if (gdt in native_load_tr_desc() 273 struct desc_struct *gdt = get_cpu_gdt_rw(cpu); native_load_tls() local [all...] |
/kernel/linux/linux-5.10/arch/x86/boot/ |
H A D | pm.c | 82 static struct gdt_ptr gdt; in setup_gdt() local 84 gdt.len = sizeof(boot_gdt)-1; in setup_gdt() 85 gdt.ptr = (u32)&boot_gdt + (ds() << 4); in setup_gdt() 87 asm volatile("lgdtl %0" : : "m" (gdt)); in setup_gdt()
|
/kernel/linux/linux-6.6/arch/x86/boot/ |
H A D | pm.c | 82 static struct gdt_ptr gdt; in setup_gdt() local 84 gdt.len = sizeof(boot_gdt)-1; in setup_gdt() 85 gdt.ptr = (u32)&boot_gdt + (ds() << 4); in setup_gdt() 87 asm volatile("lgdtl %0" : : "m" (gdt)); in setup_gdt()
|
/kernel/linux/linux-5.10/arch/x86/purgatory/ |
H A D | entry64.S | 18 /* Setup a gdt that should be preserved */ 19 lgdt gdt(%rip) 84 SYM_DATA_START_LOCAL(gdt) 88 * so use them as gdt ptr 90 .word gdt_end - gdt - 1 91 .quad gdt 99 SYM_DATA_END_LABEL(gdt, SYM_L_LOCAL, gdt_end)
|
/kernel/linux/linux-6.6/arch/x86/boot/compressed/ |
H A D | head_32.S | 64 leal gdt@GOTOFF(%edx), %eax 129 leal gdt@GOTOFF(%ebx), %eax 172 SYM_DATA_START_LOCAL(gdt) 173 .word gdt_end - gdt - 1 179 SYM_DATA_END_LABEL(gdt, SYM_L_LOCAL, gdt_end)
|
H A D | head_64.S | 107 leal rva(gdt)(%ebp), %eax 244 /* After gdt is loaded */ 261 * the new gdt/idt that has __KERNEL_CS with CS.L = 1. 436 leaq rva(gdt)(%rbx), %rdx 597 .word gdt_end - gdt - 1 598 .quad gdt - gdt64 601 SYM_DATA_START_LOCAL(gdt) 602 .word gdt_end - gdt - 1 610 SYM_DATA_END_LABEL(gdt, SYM_L_LOCAL, gdt_end)
|
/kernel/linux/linux-6.6/arch/x86/purgatory/ |
H A D | entry64.S | 18 /* Setup a gdt that should be preserved */ 19 lgdt gdt(%rip) 84 SYM_DATA_START_LOCAL(gdt) 88 * so use them as gdt ptr 90 .word gdt_end - gdt - 1 91 .quad gdt 99 SYM_DATA_END_LABEL(gdt, SYM_L_LOCAL, gdt_end)
|
/kernel/linux/linux-6.6/arch/x86/include/asm/ |
H A D | desc.h | 45 struct desc_struct gdt[GDT_ENTRIES]; member 53 return per_cpu(gdt_page, cpu).gdt; in get_cpu_gdt_rw() 59 return this_cpu_ptr(&gdt_page)->gdt; in get_current_gdt_rw() 65 return (struct desc_struct *)&get_cpu_entry_area(cpu)->gdt; in get_cpu_gdt_ro() 148 native_write_gdt_entry(struct desc_struct *gdt, int entry, const void *desc, int type) in native_write_gdt_entry() argument 155 default: size = sizeof(*gdt); break; in native_write_gdt_entry() 158 memcpy(&gdt[entry], desc, size); in native_write_gdt_entry() 256 struct desc_ptr gdt; in native_load_tr_desc() local 261 native_store_gdt(&gdt); in native_load_tr_desc() 268 if (gdt in native_load_tr_desc() 294 struct desc_struct *gdt = get_cpu_gdt_rw(cpu); native_load_tls() local [all...] |
/kernel/linux/linux-5.10/drivers/pnp/pnpbios/ |
H A D | bioscalls.c | 58 struct desc_struct *gdt = get_cpu_gdt_rw((cpu)); \ 59 set_desc_base(&gdt[(selname) >> 3], (u32)(address)); \ 60 set_desc_limit(&gdt[(selname) >> 3], (size) - 1); \ 481 struct desc_struct *gdt = get_cpu_gdt_rw(i); in pnpbios_calls_init() local 482 if (!gdt) in pnpbios_calls_init() 484 set_desc_base(&gdt[GDT_ENTRY_PNPBIOS_CS32], in pnpbios_calls_init() 486 set_desc_base(&gdt[GDT_ENTRY_PNPBIOS_CS16], in pnpbios_calls_init() 488 set_desc_base(&gdt[GDT_ENTRY_PNPBIOS_DS], in pnpbios_calls_init()
|
/kernel/linux/linux-6.6/drivers/pnp/pnpbios/ |
H A D | bioscalls.c | 58 struct desc_struct *gdt = get_cpu_gdt_rw((cpu)); \ 59 set_desc_base(&gdt[(selname) >> 3], (u32)(address)); \ 60 set_desc_limit(&gdt[(selname) >> 3], (size) - 1); \ 480 struct desc_struct *gdt = get_cpu_gdt_rw(i); in pnpbios_calls_init() local 481 if (!gdt) in pnpbios_calls_init() 483 set_desc_base(&gdt[GDT_ENTRY_PNPBIOS_CS32], in pnpbios_calls_init() 485 set_desc_base(&gdt[GDT_ENTRY_PNPBIOS_CS16], in pnpbios_calls_init() 487 set_desc_base(&gdt[GDT_ENTRY_PNPBIOS_DS], in pnpbios_calls_init()
|
/kernel/linux/linux-5.10/arch/x86/boot/compressed/ |
H A D | head_32.S | 64 leal gdt@GOTOFF(%edx), %eax 142 leal gdt@GOTOFF(%ebx), %eax 203 SYM_DATA_START_LOCAL(gdt) 204 .word gdt_end - gdt - 1 210 SYM_DATA_END_LABEL(gdt, SYM_L_LOCAL, gdt_end)
|
H A D | head_64.S | 98 leal rva(gdt)(%ebp), %eax 235 /* After gdt is loaded */ 247 * the new gdt/idt that has __KERNEL_CS with CS.L = 1. 529 leaq rva(gdt)(%rbx), %rdx 699 .word gdt_end - gdt - 1 700 .quad gdt - gdt64 703 SYM_DATA_START_LOCAL(gdt) 704 .word gdt_end - gdt - 1 712 SYM_DATA_END_LABEL(gdt, SYM_L_LOCAL, gdt_end)
|
/kernel/linux/linux-6.6/drivers/firmware/efi/libstub/ |
H A D | x86-5lvl.c | 15 static const struct desc_struct gdt[] = { variable 92 native_load_gdt(&(struct desc_ptr){ sizeof(gdt) - 1, (u64)gdt }); in efi_5level_switch()
|
/kernel/linux/linux-6.6/arch/x86/platform/pvh/ |
H A D | head.S | 56 lgdt (_pa(gdt)) 143 SYM_DATA_START_LOCAL(gdt) 147 SYM_DATA_END(gdt)
|
/kernel/linux/linux-6.6/arch/x86/hyperv/ |
H A D | hv_vtl.c | 80 struct desc_struct *gdt; in hv_vtl_bringup_vcpu() local 90 gdt = (struct desc_struct *)((void *)(gdt_ptr.address)); in hv_vtl_bringup_vcpu() 91 tss = (struct ldttss_desc *)(gdt + GDT_ENTRY_TSS); in hv_vtl_bringup_vcpu() 92 ldt = (struct ldttss_desc *)(gdt + GDT_ENTRY_LDT); in hv_vtl_bringup_vcpu()
|
/kernel/linux/linux-5.10/arch/x86/xen/ |
H A D | smp_pv.c | 196 /* We've switched to the "real" per-cpu gdt, so make in xen_pv_smp_prepare_boot_cpu() 265 struct desc_struct *gdt; in cpu_initialize_context() local 277 gdt = get_cpu_gdt_rw(cpu); in cpu_initialize_context() 299 BUG_ON((unsigned long)gdt & ~PAGE_MASK); in cpu_initialize_context() 301 gdt_mfn = arbitrary_virt_to_mfn(gdt); in cpu_initialize_context() 302 make_lowmem_page_readonly(gdt); in cpu_initialize_context() 436 /* should set up a minimal gdt */ in stop_self()
|
/kernel/linux/linux-6.6/arch/x86/xen/ |
H A D | smp_pv.c | 195 /* We've switched to the "real" per-cpu gdt, so make in xen_pv_smp_prepare_boot_cpu() 256 struct desc_struct *gdt; in cpu_initialize_context() local 268 gdt = get_cpu_gdt_rw(cpu); in cpu_initialize_context() 286 BUG_ON((unsigned long)gdt & ~PAGE_MASK); in cpu_initialize_context() 288 gdt_mfn = arbitrary_virt_to_mfn(gdt); in cpu_initialize_context() 289 make_lowmem_page_readonly(gdt); in cpu_initialize_context() 416 /* should set up a minimal gdt */ in stop_self()
|
/kernel/linux/linux-5.10/arch/x86/kernel/ |
H A D | apm_32.c | 593 struct desc_struct *gdt; in __apm_bios_call() local 598 gdt = get_cpu_gdt_rw(cpu); in __apm_bios_call() 599 save_desc_40 = gdt[0x40 / 8]; in __apm_bios_call() 600 gdt[0x40 / 8] = bad_bios_desc; in __apm_bios_call() 611 gdt[0x40 / 8] = save_desc_40; in __apm_bios_call() 671 struct desc_struct *gdt; in __apm_bios_call_simple() local 676 gdt = get_cpu_gdt_rw(cpu); in __apm_bios_call_simple() 677 save_desc_40 = gdt[0x40 / 8]; in __apm_bios_call_simple() 678 gdt[0x40 / 8] = bad_bios_desc; in __apm_bios_call_simple() 688 gdt[ in __apm_bios_call_simple() 2248 struct desc_struct *gdt; apm_init() local [all...] |
/kernel/linux/linux-6.6/arch/x86/kernel/ |
H A D | apm_32.c | 594 struct desc_struct *gdt; in __apm_bios_call() local 600 gdt = get_cpu_gdt_rw(cpu); in __apm_bios_call() 601 save_desc_40 = gdt[0x40 / 8]; in __apm_bios_call() 602 gdt[0x40 / 8] = bad_bios_desc; in __apm_bios_call() 615 gdt[0x40 / 8] = save_desc_40; in __apm_bios_call() 675 struct desc_struct *gdt; in __apm_bios_call_simple() local 681 gdt = get_cpu_gdt_rw(cpu); in __apm_bios_call_simple() 682 save_desc_40 = gdt[0x40 / 8]; in __apm_bios_call_simple() 683 gdt[0x40 / 8] = bad_bios_desc; in __apm_bios_call_simple() 695 gdt[ in __apm_bios_call_simple() 2255 struct desc_struct *gdt; apm_init() local [all...] |
/kernel/linux/linux-5.10/arch/x86/platform/pvh/ |
H A D | head.S | 56 lgdt (_pa(gdt)) 153 SYM_DATA_START_LOCAL(gdt) 157 SYM_DATA_END(gdt)
|
/kernel/linux/linux-5.10/tools/testing/selftests/kvm/include/x86_64/ |
H A D | processor.h | 230 struct desc_ptr gdt; in get_gdt() local 231 __asm__ __volatile__("sgdt %[gdt]" in get_gdt() 232 : /* output */ [gdt]"=m"(gdt)); in get_gdt() 233 return gdt; in get_gdt()
|
/kernel/linux/linux-5.10/arch/x86/mm/ |
H A D | fault.c | 482 static void show_ldttss(const struct desc_ptr *gdt, const char *name, u16 index) in show_ldttss() argument 493 if (offset + sizeof(struct ldttss_desc) >= gdt->size) { in show_ldttss() 498 if (copy_from_kernel_nofault(&desc, (void *)(gdt->address + offset), in show_ldttss() 559 struct desc_ptr idt, gdt; in show_fault_oops() local 575 native_store_gdt(&gdt); in show_fault_oops() 578 idt.address, idt.size, gdt.address, gdt.size); in show_fault_oops() 581 show_ldttss(&gdt, "LDTR", ldtr); in show_fault_oops() 584 show_ldttss(&gdt, "TR", tr); in show_fault_oops()
|
/kernel/linux/linux-6.6/arch/x86/mm/ |
H A D | fault.c | 476 static void show_ldttss(const struct desc_ptr *gdt, const char *name, u16 index) in show_ldttss() argument 487 if (offset + sizeof(struct ldttss_desc) >= gdt->size) { in show_ldttss() 492 if (copy_from_kernel_nofault(&desc, (void *)(gdt->address + offset), in show_ldttss() 553 struct desc_ptr idt, gdt; in show_fault_oops() local 569 native_store_gdt(&gdt); in show_fault_oops() 572 idt.address, idt.size, gdt.address, gdt.size); in show_fault_oops() 575 show_ldttss(&gdt, "LDTR", ldtr); in show_fault_oops() 578 show_ldttss(&gdt, "TR", tr); in show_fault_oops()
|
/kernel/linux/linux-6.6/arch/x86/realmode/rm/ |
H A D | trampoline_64.S | 85 lgdtl tr_gdt # load gdt with whatever is appropriate 186 * the new gdt/idt that has __KERNEL_CS with CS.L = 1. 231 .short tr_gdt_end - tr_gdt - 1 # gdt limit 240 .short tr_gdt_end - tr_gdt - 1 # gdt limit
|
/kernel/linux/linux-5.10/arch/x86/kernel/acpi/ |
H A D | wakeup_32.S | 22 # reload the gdt, as we need the full 32 bit address 31 # and restore the stack ... but you need gdt for this to work
|