Add paging
diff --git a/src/descriptor_tables.h b/src/descriptor_tables.h
index d1b68bc..b35f670 100644
--- a/src/descriptor_tables.h
+++ b/src/descriptor_tables.h
@@ -8,36 +8,33 @@
ushort base_low;
uchar base_middle;
- union
- {
+ union {
struct
{
- uint a_p : 1;
- uint a_dpl : 2;
- uint a_dt : 1;
+ uint a_p : 1;
+ uint a_dpl : 2;
+ uint a_dt : 1;
uint a_type : 4;
} __attribute__((packed));
uchar access;
};
- union
- {
+ union {
struct
{
- uint g_g : 1;
- uint g_d : 1;
+ uint g_g : 1;
+ uint g_d : 1;
uint g_zero : 2; /* includes A */
- uint g_len : 4;
+ uint g_len : 4;
} __attribute__((packed));
-
+
uchar granularity;
};
uchar base_high;
} __attribute__((packed));
-
struct gdt_pointer
{
/* Upper 16 bits of selector limits */
@@ -52,18 +49,17 @@
ushort selector;
uchar zero;
- union
- {
+ union {
struct
{
- uchar f_p : 1;
- uchar f_dpl : 2;
+ uchar f_p : 1;
+ uchar f_dpl : 2;
uchar f_const : 5;
} __attribute__((packed));
-
+
uchar flags;
};
-
+
ushort base_high;
} __attribute__((packed));
@@ -125,7 +121,6 @@
extern void irq14();
extern void irq15();
-
void init_descriptor_tables();
void init_idt();
void init_gdt();