mirror of
https://github.com/taigrr/gopher-os
synced 2025-01-18 04:43:13 -08:00
The GDT is initially loaded in the 32-bit rt0 code where we cannot use the 48-bit VMA for the GDT table and instead we use its physical address. This approach works as the rt0 code establishes an identity mapping for the region 0-8M. However, when the kernel creates a more granular PDT it only includes the VMA addresses for the kernel ELF image sections making the 0-8M invalid. Unless the GDT is reloaded with the VMA of the table, the CPU will cause a non-recoverable page fault when it tries to restore the segment registers while returning from a recoverable page fault.
Description
Languages
Go
84.9%
ASL
10.2%
Assembly
4%
Makefile
0.9%