That's really helpful. Thanks.
I think I might have all the segments done. Does this look right?
Code: Select all
FullGDT gdt[32] __attribute__((used)) = {{
{
{0x0000, 0x0000, 0x00, 0x00, 0x00, 0x00},
{0xFFFF, 0x0000, 0x00, 0x9A, 0x08, 0x00},
{0xFFFF, 0x0000, 0x00, 0x92, 0x08, 0x00},
{0xFFFFFFFF, 0x0000, 0x00, 0x9A, 0x08, 0x00},
{0xFFFFFFFF, 0x0000, 0x00, 0x92, 0x08, 0x00},
{0xFFFF, 0x0000, 0x00, 0x9A, 0x0A, 0x00},
{0xFFFF, 0x0000, 0x00, 0x92, 0x0A, 0x00},
{0x0067, 0x0000, 0x00, 0xE9, 0x00, 0x00},
},
{0x00000000, 0x00000000},
{0x0000, 0x0000000000000000},
{0,{0,0,0},0,{0,0,0,0,0,0,0},0,0,0},
}};
If it is, then I got this warning.
Code: Select all
arch/x86_64/gdt.c:49:18: warning: conversion from 'unsigned int' to 'short unsigned int' changes value from '4294967295' to '65535' [-Woverflow]
49 | {0xFFFFFFFF, 0x0000, 0x00, 0x9A, 0x08, 0x00},
| ^~~~~~~~~~
arch/x86_64/gdt.c:50:18: warning: conversion from 'unsigned int' to 'short unsigned int' changes value from '4294967295' to '65535' [-Woverflow]
50 | {0xFFFFFFFF, 0x0000, 0x00, 0x92, 0x08, 0x00},
| ^~~~~~~~~~
If it isn't, then I don't know what I'm doing wrong.