search for: lgdt

Displaying 20 results from an estimated 92 matches for "lgdt".

Did you mean: gdt
2014 Feb 22
2
[PATCH] efi: off-by-one in gdt allocation
From: Sylvain Gault <sylvain.gault at gmail.com> The assembly instruction lgdt take a segment limit that is one less than the actual size, so that base+limit points to the last byte. Signed-off-by: Sylvain Gault <sylvain.gault at gmail.com> --- efi/main.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/efi/main.c b/efi/main.c index 94878f9..b...
2007 Jul 24
0
fedora7 can not boot in hvm domain of xen3.1
...evice (XEN) HVM10: (XEN) HVM10: Booting from CD-Rom... (XEN) HVM10: 0x000095D3: 0x0:0x95D3 (0) external interrupt 8 (XEN) HVM10: 0x000F9BE8: 0xF000:0x9BE8 (0) opc 0xC3 (XEN) HVM10: 0x0000484F: 0x0:0x484F (0) data32 (XEN) HVM10: 0x0000484F: 0x0:0x484F (0) %cs: (XEN) HVM10: 0x00004851: 0x0:0x4851 (0) lgdt 0x4810 <47, 0x4810> (XEN) HVM10: 0x00004856: 0x0:0x4856 (0) movl %cr0, %eax (XEN) HVM10: 0x00004859: 0x0:0x4859 (0) opc 0xC (XEN) HVM10: 0x0000485B: 0x0:0x485B (0) movl %eax, %cr0 (XEN) HVM10: 0x000048C1: 0x0:0x48C1 (0) <VM86_REAL> (XEN) HVM10: 0x0000484F: 0x0:0x484F (0) data32 (XEN) HV...
2020 Jul 24
0
[PATCH v5 31/75] x86/head/64: Load GDT after switch to virtual addresses
.../* + * We must switch to a new descriptor in kernel space for the GDT + * because soon the kernel won't have access anymore to the userspace + * addresses where we're currently running on. We have to do that here + * because in 32bit we couldn't load a 64bit linear address. + */ + lgdt early_gdt_descr(%rip) + /* Check if nx is implemented */ movl $0x80000001, %eax cpuid @@ -193,14 +201,6 @@ SYM_CODE_START(secondary_startup_64) pushq $0 popfq - /* - * We must switch to a new descriptor in kernel space for the GDT - * because soon the kernel won't have access anym...
2007 Apr 18
0
[PATCH 5/12] desc-cleanup
Stop using extra underscores on asm and volatiles, that is just silly. Also, make lgdt/lidt/sgdt/sldt explicitly "l". Index: linux-2.6.13/include/asm-i386/desc.h =================================================================== --- linux-2.6.13.orig/include/asm-i386/desc.h 2005-08-08 17:10:49.000000000 -0700 +++ linux-2.6.13/include/asm-i386/desc.h 2005-08-08 17:15:46.000...
2007 Apr 18
0
[PATCH 5/12] desc-cleanup
Stop using extra underscores on asm and volatiles, that is just silly. Also, make lgdt/lidt/sgdt/sldt explicitly "l". Index: linux-2.6.13/include/asm-i386/desc.h =================================================================== --- linux-2.6.13.orig/include/asm-i386/desc.h 2005-08-08 17:10:49.000000000 -0700 +++ linux-2.6.13/include/asm-i386/desc.h 2005-08-08 17:15:46.000...
2007 Apr 18
1
[PATCH 4/14] i386 / Clean up asm and volatile keywords in desc
Stop using extra underscores on asm and volatiles, that is just silly. Also, make lgdt/lidt/sgdt/sldt explicitly "l". Patch-base: 2.6.13-rc5-mm1 Patch-keys: i386 desc cleanup Signed-off-by: Zachary Amsden <zach@vmware.com> Index: linux-2.6.13/include/asm-i386/mach-default/mach_desc.h =================================================================== --- linux-2.6.13...
2007 Apr 18
1
[PATCH 4/14] i386 / Clean up asm and volatile keywords in desc
Stop using extra underscores on asm and volatiles, that is just silly. Also, make lgdt/lidt/sgdt/sldt explicitly "l". Patch-base: 2.6.13-rc5-mm1 Patch-keys: i386 desc cleanup Signed-off-by: Zachary Amsden <zach@vmware.com> Index: linux-2.6.13/include/asm-i386/mach-default/mach_desc.h =================================================================== --- linux-2.6.13...
2020 Jun 04
0
[PATCH v3 31/75] x86/head/64: Install boot GDT
...@ -72,6 +72,26 @@ SYM_CODE_START_NOALIGN(startup_64) /* Set up the stack for verify_cpu(), similar to initial_stack below */ leaq (__end_init_task - SIZEOF_PTREGS)(%rip), %rsp + /* Setup boot GDT descriptor and load boot GDT */ + leaq boot_gdt(%rip), %rax + movq %rax, boot_gdt_descr+2(%rip) + lgdt boot_gdt_descr(%rip) + + /* New GDT is live - reload data segment registers */ + movl $__KERNEL_DS, %eax + movl %eax, %ds + movl %eax, %ss + movl %eax, %es + + /* Now switch to __KERNEL_CS so IRET works reliably */ + pushq $__KERNEL_CS + leaq .Lon_kernel_cs(%rip), %rax + pushq %rax + lretq + +.Lon_...
2020 May 18
2
[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) >
2020 May 18
2
[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) >
2007 Jun 27
0
[PATCH 1/10] Provide basic Xen PM infrastructure
.../* mmu_cr4_features contains latest cr4 setting */ + mov REF(mmu_cr4_features), GREG(ax) + mov GREG(ax), %cr4 + + mov REF(saved_cr3), GREG(ax) + mov GREG(ax), %cr3 + + mov REF(saved_cr0), GREG(ax) + mov GREG(ax), %cr0 + + lgdt REF(saved_gdt) + lidt REF(saved_idt) + lldt REF(saved_ldt) + + mov REF(saved_ss), %ss + LOAD_GREG(sp) + +#if defined(__x86_64__) + + mov REF(saved_cr8), %rax + mov %rax, %cr8 + + pushq SAVED_GREG(flags) + popfq + +...
2016 Mar 15
2
GSoC, question on open projects
...at the open projects page, found some interesting projects but still have some questions about them: "Add support for 16-bit x86 assembly and real mode to the assembler and disassembler, for use by BIOS code. This includes both 16-bit instruction encodings as well as privileged instructions (lgdt, lldt, ltr, lmsw, clts, invd, invlpg, wbinvd, hlt, rdmsr, wrmsr, rdpmc, rdtsc) and the control and debug registers." Correct me if I'm mistaken, but isn't this already implemented in llvm mc? I haven't searched for every instruction part of these architectures but I was able find...
2020 Feb 11
0
[PATCH 08/62] x86/boot/compressed/64: Add IDT Infrastructure
...t/compressed/head_64.S @@ -33,6 +33,7 @@ #include <asm/processor-flags.h> #include <asm/asm-offsets.h> #include <asm/bootparam.h> +#include <asm/desc_defs.h> #include "pgtable.h" /* @@ -358,6 +359,10 @@ SYM_CODE_START(startup_64) movq %rax, gdt64+2(%rip) lgdt gdt64(%rip) + pushq %rsi + call load_stage1_idt + popq %rsi + /* * paging_prepare() sets up the trampoline and checks if we need to * enable 5-level paging. @@ -465,6 +470,16 @@ SYM_FUNC_END_ALIAS(efi_stub_entry) .text SYM_FUNC_START_LOCAL_NOALIGN(.Lrelocated) +/* + * Reload GDT afte...
2007 Apr 18
3
[RFC, PATCH 10/24] i386 Vmi descriptor changes
...truct *)per_cpu(cpu_gdt_descr, cpu).address; } -#define load_TR_desc() __asm__ __volatile__("ltr %w0"::"q" (GDT_ENTRY_TSS*8)) -#define load_LDT_desc() __asm__ __volatile__("lldt %w0"::"q" (GDT_ENTRY_LDT*8)) - -#define load_gdt(dtr) __asm__ __volatile("lgdt %0"::"m" (*dtr)) -#define load_idt(dtr) __asm__ __volatile("lidt %0"::"m" (*dtr)) -#define load_tr(tr) __asm__ __volatile("ltr %0"::"mr" (tr)) -#define load_ldt(ldt) __asm__ __volatile("lldt %0"::"mr" (ldt)) - -#define store...
2007 Apr 18
3
[RFC, PATCH 10/24] i386 Vmi descriptor changes
...truct *)per_cpu(cpu_gdt_descr, cpu).address; } -#define load_TR_desc() __asm__ __volatile__("ltr %w0"::"q" (GDT_ENTRY_TSS*8)) -#define load_LDT_desc() __asm__ __volatile__("lldt %w0"::"q" (GDT_ENTRY_LDT*8)) - -#define load_gdt(dtr) __asm__ __volatile("lgdt %0"::"m" (*dtr)) -#define load_idt(dtr) __asm__ __volatile("lidt %0"::"m" (*dtr)) -#define load_tr(tr) __asm__ __volatile("ltr %0"::"mr" (tr)) -#define load_ldt(ldt) __asm__ __volatile("lldt %0"::"mr" (ldt)) - -#define store...
2007 Apr 18
1
[PATCH 0/7] Using %gs for per-cpu areas on x86
OK, here it is. Benchmarks still coming. This is against Andi's 2.6.18-rc7-git3 tree, and replaces the patches between (and not including) i386-pda-asm-offsets and i386-early-fault. One patch is identical, one is mildly modified, the rest are re-implemented but inspired by Jeremy's PDA work. Thanks, Rusty. -- Help! Save Australia from the worst of the DMCA: http://linux.org.au/law
2007 Apr 18
1
[PATCH 0/7] Using %gs for per-cpu areas on x86
OK, here it is. Benchmarks still coming. This is against Andi's 2.6.18-rc7-git3 tree, and replaces the patches between (and not including) i386-pda-asm-offsets and i386-early-fault. One patch is identical, one is mildly modified, the rest are re-implemented but inspired by Jeremy's PDA work. Thanks, Rusty. -- Help! Save Australia from the worst of the DMCA: http://linux.org.au/law
2020 Feb 11
0
[PATCH 25/62] x86/head/64: Install boot GDT
...S @@ -72,6 +72,20 @@ SYM_CODE_START_NOALIGN(startup_64) /* Set up the stack for verify_cpu(), similar to initial_stack below */ leaq (__end_init_task - SIZEOF_PTREGS)(%rip), %rsp + /* Setup boot GDT descriptor and load boot GDT */ + leaq boot_gdt(%rip), %rax + movq %rax, boot_gdt_base(%rip) + lgdt boot_gdt_descr(%rip) + + /* GDT loaded - switch to __KERNEL_CS so IRET works reliably */ + pushq $__KERNEL_CS + leaq .Lon_kernel_cs(%rip), %rax + pushq %rax + lretq + +.Lon_kernel_cs: + UNWIND_HINT_EMPTY + /* Sanitize CPU configuration */ call verify_cpu @@ -480,6 +494,18 @@ SYM_DATA_LOCAL(ea...
2020 Feb 11
1
[PATCH 25/62] x86/head/64: Install boot GDT
...the stack for verify_cpu(), similar to initial_stack below */ > leaq (__end_init_task - SIZEOF_PTREGS)(%rip), %rsp > > + /* Setup boot GDT descriptor and load boot GDT */ > + leaq boot_gdt(%rip), %rax > + movq %rax, boot_gdt_base(%rip) > + lgdt boot_gdt_descr(%rip) > + > + /* GDT loaded - switch to __KERNEL_CS so IRET works reliably */ > + pushq $__KERNEL_CS > + leaq .Lon_kernel_cs(%rip), %rax > + pushq %rax > + lretq > + > +.Lon_kernel_cs: > + UNWIND_HINT_EMPTY I w...
2020 Apr 16
0
[PATCH 12/70] x86/boot/compressed/64: Add IDT Infrastructure
...might be overwritten soon by the in-place decompression, so reload > > + * GDT at the relocated address. The GDT is referenced by exception > > + * handling and needs to be set up correctly. > > + */ > > + leaq gdt(%rip), %rax > > + movq %rax, gdt64+2(%rip) > > + lgdt gdt64(%rip) > > + > > /* > > * Clear BSS (stack is currently empty) > > */ > > Note that this is now done in mainline as of commit c98a76eabbb6e, just > prior to jumping to .Lrelocated, so this can be dropped on the next > rebase. Thanks for the heads-up,...