File tree Expand file tree Collapse file tree 2 files changed +1
-10
lines changed
Expand file tree Collapse file tree 2 files changed +1
-10
lines changed Original file line number Diff line number Diff line change @@ -24,12 +24,7 @@ global label_exit
2424 mov ebp , esp
2525
2626 ; Load GDT Table
27- ; Workaround for Issue #3
28- mov eax , [ esp + 8 ] ; gdtr_address
29- mov ebx , eax
30- add ebx , 8 ; &gdtr_table
31- mov [ eax + 2 ], ebx ; gdtr.base_address = &gdtr_table
32-
27+ mov eax , [ esp + 8 ] ; gdtr_address
3328 lgdt [ eax ] ; Load GDT Table
3429
3530 ; Enter Protected mode
Original file line number Diff line number Diff line change @@ -26,7 +26,6 @@ struct GDTEntry {
2626};
2727#pragma pack(pop)
2828
29- // Issue#2: gdt_table must immediately after gdtr.
3029struct GDTReference gdtr ;
3130struct GDTEntry gdt_table [GDT_TABLE_SIZE ];
3231
@@ -71,9 +70,6 @@ int populate_gdt_table() {
7170 0b0100 , // 32-bit protected mode
7271 0x92 );
7372
74- // Issue#2: For some reason gdtr.base_address assigned is not
75- // being respected later on. So, as a bad workaround hardcoding
76- // base_address as &gdtr+8 in stage2.asm.
7773 gdtr .base_address = (int )gdt_table ;
7874 gdtr .size = (sizeof (gdt_table ));
7975
You can’t perform that action at this time.
0 commit comments