Displaying 9 results from an estimated 9 matches for "pnp_bios_is_utter_crap".
2007 Apr 18
1
[PATCH 7/21] i386 Losing fs gs to bios
...87,7 @@ static inline u16 call_pnp_bios(u16 func
{
unsigned long flags;
u16 status;
- struct desc_struct save_desc_40;
- int cpu;
+ struct bios_segment_save save_area;
/*
* PnP BIOSes are generally not terribly re-entrant.
@@ -97,10 +96,8 @@ static inline u16 call_pnp_bios(u16 func
if(pnp_bios_is_utter_crap)
return PNP_FUNCTION_NOT_SUPPORTED;
- cpu = get_cpu();
- save_desc_40 = per_cpu(cpu_gdt_table,cpu)[0x40 / 8];
- per_cpu(cpu_gdt_table,cpu)[0x40 / 8] =
- per_cpu(cpu_gdt_table,cpu)[GDT_ENTRY_BAD_BIOS_CACHE];
+ /* Save %fs, %gs and TLS segment which fakes real mode selector 0x40 */
+ prepare_b...
2007 Apr 18
1
[PATCH 7/21] i386 Losing fs gs to bios
...87,7 @@ static inline u16 call_pnp_bios(u16 func
{
unsigned long flags;
u16 status;
- struct desc_struct save_desc_40;
- int cpu;
+ struct bios_segment_save save_area;
/*
* PnP BIOSes are generally not terribly re-entrant.
@@ -97,10 +96,8 @@ static inline u16 call_pnp_bios(u16 func
if(pnp_bios_is_utter_crap)
return PNP_FUNCTION_NOT_SUPPORTED;
- cpu = get_cpu();
- save_desc_40 = per_cpu(cpu_gdt_table,cpu)[0x40 / 8];
- per_cpu(cpu_gdt_table,cpu)[0x40 / 8] =
- per_cpu(cpu_gdt_table,cpu)[GDT_ENTRY_BAD_BIOS_CACHE];
+ /* Save %fs, %gs and TLS segment which fakes real mode selector 0x40 */
+ prepare_b...
2007 Apr 18
0
Cleaning up descriptor patch
...e page fault handler, we have some tests against kernel / user
CS which avoid the logic of actually figuring out the segment limit. I
propose we use the same trick as arch/i386/mm/extable.c, which simply
masks the RPL off and combines the segments together to test for faults
before setting the pnp_bios_is_utter_crap variable. In this case, we
can simply test:
if (likely((seg & 0xe8) == __KERNEL_CS)
and be done with any RPL masking at all. Perhaps this is best put in a
macro in segment.h,
#define SEGMENT_IS_FLAT_CODE(x) (((x) & 0xe8) == GDT_ENTRY_KERNEL_CS * 8)
Also, note the segment check for...
2007 Apr 18
2
[patch 3/8] Allow a kernel to not be in ring 0.
...tion(struct pt_regs *regs
const struct exception_table_entry *fixup;
#ifdef CONFIG_PNPBIOS
- if (unlikely((regs->xcs & ~15) == (GDT_ENTRY_PNPBIOS_BASE << 3)))
+ if (unlikely(SEGMENT_IS_PNP_CODE(regs->xcs)))
{
extern u32 pnp_bios_fault_eip, pnp_bios_fault_esp;
extern u32 pnp_bios_is_utter_crap;
--- 2.6.18-rc3-32.orig/arch/i386/mm/fault.c
+++ 2.6.18-rc3-32/arch/i386/mm/fault.c
@@ -27,6 +27,7 @@
#include <asm/uaccess.h>
#include <asm/desc.h>
#include <asm/kdebug.h>
+#include <asm/segment.h>
extern void die(const char *,struct pt_regs *,long);
@@ -119,10 +120...
2007 Apr 18
2
[patch 3/8] Allow a kernel to not be in ring 0.
...tion(struct pt_regs *regs
const struct exception_table_entry *fixup;
#ifdef CONFIG_PNPBIOS
- if (unlikely((regs->xcs & ~15) == (GDT_ENTRY_PNPBIOS_BASE << 3)))
+ if (unlikely(SEGMENT_IS_PNP_CODE(regs->xcs)))
{
extern u32 pnp_bios_fault_eip, pnp_bios_fault_esp;
extern u32 pnp_bios_is_utter_crap;
--- 2.6.18-rc3-32.orig/arch/i386/mm/fault.c
+++ 2.6.18-rc3-32/arch/i386/mm/fault.c
@@ -27,6 +27,7 @@
#include <asm/uaccess.h>
#include <asm/desc.h>
#include <asm/kdebug.h>
+#include <asm/segment.h>
extern void die(const char *,struct pt_regs *,long);
@@ -119,10 +120...
2007 Apr 18
8
[patch 0/8] Basic infrastructure patches for a paravirtualized kernel
Hi Andrew,
This series of patches lays the basic ground work for the
paravirtualized kernel patches coming later on. I think this lot is
ready for the rough-and-tumble world of the -mm tree.
The main change from the last posting is that all the page-table
related patches have been moved out, and will be posted separately.
Also, the off-by-one in reserving the top of address space has been
2007 Apr 18
8
[patch 0/8] Basic infrastructure patches for a paravirtualized kernel
Hi Andrew,
This series of patches lays the basic ground work for the
paravirtualized kernel patches coming later on. I think this lot is
ready for the rough-and-tumble world of the -mm tree.
The main change from the last posting is that all the page-table
related patches have been moved out, and will be posted separately.
Also, the off-by-one in reserving the top of address space has been
2007 Apr 18
15
[PATCH 0 of 13] Basic infrastructure patches for a paravirtualized kernel
[ REPOST: Apologies to anyone who has seen this before. It
didn't make it onto any of the lists it should have. -J ]
Hi Andrew,
This series of patches lays the basic ground work for the
paravirtualized kernel patches coming later on. I think this lot is
ready for the rough-and-tumble world of the -mm tree.
For the most part, these patches do nothing or very little. The
patches should
2007 Apr 18
15
[PATCH 0 of 13] Basic infrastructure patches for a paravirtualized kernel
[ REPOST: Apologies to anyone who has seen this before. It
didn't make it onto any of the lists it should have. -J ]
Hi Andrew,
This series of patches lays the basic ground work for the
paravirtualized kernel patches coming later on. I think this lot is
ready for the rough-and-tumble world of the -mm tree.
For the most part, these patches do nothing or very little. The
patches should