On 04/10/21 22:49, Zixuan Wang wrote:
+/* In gdt64, there are 16 entries before TSS entries */ +#define GDT64_PRE_TSS_ENTRIES (16) +#define GDT64_TSS_OFFSET (GDT64_PRE_TSS_ENTRIES)
No need to have both; in fact the definition can also be changed to TSS_MAIN/8.
tss_descr is completely broken in the current code, I'll send a patch to fix it so you don't have to deal with it.
Paolo
+extern gdt_entry_t gdt64[];