diff options
Diffstat (limited to 'i686/lgdt.c')
-rw-r--r-- | i686/lgdt.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/i686/lgdt.c b/i686/lgdt.c index d1b24c3..473a91d 100644 --- a/i686/lgdt.c +++ b/i686/lgdt.c @@ -10,11 +10,11 @@ static struct SegmentDescriptor_t segments[8] __attribute__((aligned(32))); void gdt_install() { + const struct Pointer ptr = {sizeof(segments) - 1, (unsigned)&segments}; SegmentDescriptor(&segments[0], 0, 0, 0); /* null segment */ SegmentDescriptor(&segments[2], 0, 0xffffffff, 0x9a); /* ktext segment */ SegmentDescriptor(&segments[3], 0, 0xffffffff, 0x92); /* kdata segment */ - const struct Pointer ptr = {.limit = sizeof(segments) - 1, .base = (unsigned)&segments}; __asm__("lgdt (%0)" : : "a"(&ptr)); /* load the kernel data segment */ |