search for: gdt_entry_bad_bios_cache

Displaying 8 results from an estimated 8 matches for "gdt_entry_bad_bios_cache".

2007 Apr 18
2
[PATCH 4/21] i386 Broken bios common
...BOOT_DS (GDT_ENTRY_BOOT_CS + 1) #define __BOOT_DS (GDT_ENTRY_BOOT_DS * 8) +/* + * Turns out the BIOS data area at 0x400 is commonly accessed from broken + * BIOS using real mode selector 0x40. We cached the bogus BIOS segment + * descriptor in a spare entry and fix it up at boot. + */ +#define GDT_ENTRY_BAD_BIOS_CACHE 4 +#define GDT_ENTRY_BAD_BIOS (0x40 >> 3) +#define BAD_BIOS_AREA (0x400) + /* The PnP BIOS entries in the GDT */ #define GDT_ENTRY_PNPBIOS_CS32 (GDT_ENTRY_PNPBIOS_BASE + 0) #define GDT_ENTRY_PNPBIOS_CS16 (GDT_ENTRY_PNPBIOS_BASE + 1) Index: linux-2.6.14-...
2007 Apr 18
2
[PATCH 4/21] i386 Broken bios common
...BOOT_DS (GDT_ENTRY_BOOT_CS + 1) #define __BOOT_DS (GDT_ENTRY_BOOT_DS * 8) +/* + * Turns out the BIOS data area at 0x400 is commonly accessed from broken + * BIOS using real mode selector 0x40. We cached the bogus BIOS segment + * descriptor in a spare entry and fix it up at boot. + */ +#define GDT_ENTRY_BAD_BIOS_CACHE 4 +#define GDT_ENTRY_BAD_BIOS (0x40 >> 3) +#define BAD_BIOS_AREA (0x400) + /* The PnP BIOS entries in the GDT */ #define GDT_ENTRY_PNPBIOS_CS32 (GDT_ENTRY_PNPBIOS_BASE + 0) #define GDT_ENTRY_PNPBIOS_CS16 (GDT_ENTRY_PNPBIOS_BASE + 1) Index: linux-2.6.14-...
2007 Apr 18
1
[PATCH 7/21] i386 Losing fs gs to bios
...ent_save *save_area) +{ + int cpu = get_cpu(); + struct desc_struct *gdt = get_cpu_gdt_table(cpu); + save_area->gdt = gdt; + savesegment(fs, save_area->saved_fs); + savesegment(gs, save_area->saved_gs); + save_area->save_desc_40 = gdt[GDT_ENTRY_BAD_BIOS]; + gdt[GDT_ENTRY_BAD_BIOS] = gdt[GDT_ENTRY_BAD_BIOS_CACHE]; +} + +static inline void restore_bios_segments(struct bios_segment_save *save_area) +{ + save_area->gdt[GDT_ENTRY_BAD_BIOS] = save_area->save_desc_40; + loadsegment(fs, save_area->saved_fs); + loadsegment(gs, save_area->saved_gs); + put_cpu(); +} + #endif /* !__ASSEMBLY__ */ #endi...
2007 Apr 18
1
[PATCH 7/21] i386 Losing fs gs to bios
...ent_save *save_area) +{ + int cpu = get_cpu(); + struct desc_struct *gdt = get_cpu_gdt_table(cpu); + save_area->gdt = gdt; + savesegment(fs, save_area->saved_fs); + savesegment(gs, save_area->saved_gs); + save_area->save_desc_40 = gdt[GDT_ENTRY_BAD_BIOS]; + gdt[GDT_ENTRY_BAD_BIOS] = gdt[GDT_ENTRY_BAD_BIOS_CACHE]; +} + +static inline void restore_bios_segments(struct bios_segment_save *save_area) +{ + save_area->gdt[GDT_ENTRY_BAD_BIOS] = save_area->save_desc_40; + loadsegment(fs, save_area->saved_fs); + loadsegment(gs, save_area->saved_gs); + put_cpu(); +} + #endif /* !__ASSEMBLY__ */ #endi...
2007 Apr 18
3
[PATCH 12/21] i386 Deprecate descriptor asm
...1-04 17:45:06.000000000 -0800 +++ linux-2.6.14-zach-work/arch/i386/kernel/cpu/common.c 2005-11-05 00:28:07.000000000 -0800 @@ -604,7 +604,7 @@ void __devinit cpu_init(void) * even though they are called in protected mode. The limit is * preset, we hardwire the base here. */ - set_base(gdt[GDT_ENTRY_BAD_BIOS_CACHE], __va(BAD_BIOS_AREA)); + set_base(&gdt[GDT_ENTRY_BAD_BIOS_CACHE], __va(BAD_BIOS_AREA)); /* Set up GDT entry for 16bit stack */ prepare_protected_segment(cpu, GDT_ENTRY_ESPFIX_SS, (void *) stk16_off, Index: linux-2.6.14-zach-work/arch/i386/mm/fault.c ======================================...
2007 Apr 18
3
[PATCH 12/21] i386 Deprecate descriptor asm
...1-04 17:45:06.000000000 -0800 +++ linux-2.6.14-zach-work/arch/i386/kernel/cpu/common.c 2005-11-05 00:28:07.000000000 -0800 @@ -604,7 +604,7 @@ void __devinit cpu_init(void) * even though they are called in protected mode. The limit is * preset, we hardwire the base here. */ - set_base(gdt[GDT_ENTRY_BAD_BIOS_CACHE], __va(BAD_BIOS_AREA)); + set_base(&gdt[GDT_ENTRY_BAD_BIOS_CACHE], __va(BAD_BIOS_AREA)); /* Set up GDT entry for 16bit stack */ prepare_protected_segment(cpu, GDT_ENTRY_ESPFIX_SS, (void *) stk16_off, Index: linux-2.6.14-zach-work/arch/i386/mm/fault.c ======================================...
2007 Apr 18
0
[PATCH 10/21] i386 Use protected segment for 16bit stack
...========================================== --- linux-2.6.14-zach-work.orig/arch/i386/kernel/cpu/common.c 2005-11-04 16:54:45.000000000 -0800 +++ linux-2.6.14-zach-work/arch/i386/kernel/cpu/common.c 2005-11-05 00:28:08.000000000 -0800 @@ -607,10 +607,8 @@ void __devinit cpu_init(void) set_base(gdt[GDT_ENTRY_BAD_BIOS_CACHE], __va(BAD_BIOS_AREA)); /* Set up GDT entry for 16bit stack */ - *(__u64 *)(&gdt[GDT_ENTRY_ESPFIX_SS]) |= - ((((__u64)stk16_off) << 16) & 0x000000ffffff0000ULL) | - ((((__u64)stk16_off) << 32) & 0xff00000000000000ULL) | - (CPU_16BIT_STACK_SIZE - 1); + prepare_protect...
2007 Apr 18
0
[PATCH 10/21] i386 Use protected segment for 16bit stack
...========================================== --- linux-2.6.14-zach-work.orig/arch/i386/kernel/cpu/common.c 2005-11-04 16:54:45.000000000 -0800 +++ linux-2.6.14-zach-work/arch/i386/kernel/cpu/common.c 2005-11-05 00:28:08.000000000 -0800 @@ -607,10 +607,8 @@ void __devinit cpu_init(void) set_base(gdt[GDT_ENTRY_BAD_BIOS_CACHE], __va(BAD_BIOS_AREA)); /* Set up GDT entry for 16bit stack */ - *(__u64 *)(&gdt[GDT_ENTRY_ESPFIX_SS]) |= - ((((__u64)stk16_off) << 16) & 0x000000ffffff0000ULL) | - ((((__u64)stk16_off) << 32) & 0xff00000000000000ULL) | - (CPU_16BIT_STACK_SIZE - 1); + prepare_protect...