Displaying 2 results from an estimated 2 matches for "prepare_bios_seg".
2007 Apr 18
1
[PATCH 7/21] i386 Losing fs gs to bios
...i386/desc.h 2005-11-05 00:28:10.000000000 -0800
@@ -158,6 +158,32 @@ static inline unsigned long get_desc_bas
return base;
}
+struct bios_segment_save {
+ struct desc_struct save_desc_40;
+ struct desc_struct *gdt;
+ unsigned short saved_fs;
+ unsigned short saved_gs;
+};
+
+static inline void prepare_bios_segments(struct bios_segment_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_...
2007 Apr 18
1
[PATCH 7/21] i386 Losing fs gs to bios
...i386/desc.h 2005-11-05 00:28:10.000000000 -0800
@@ -158,6 +158,32 @@ static inline unsigned long get_desc_bas
return base;
}
+struct bios_segment_save {
+ struct desc_struct save_desc_40;
+ struct desc_struct *gdt;
+ unsigned short saved_fs;
+ unsigned short saved_gs;
+};
+
+static inline void prepare_bios_segments(struct bios_segment_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_...