In the example provided we will be using a dynamic memory mapping. This is for exemplification only and can be changed with your own implementation of the memory mapper.
Here we create an AcpiHandlerImpl
that implements the AcpiHandler
trait from the apic
crate.
We have also added an enum with all the APIC registers from
the OS Dev Wiki
The main functions of the file are:
- Init the Local APIC
- Init the IO APIC
- Map the APIC
This implements a basic frame allocator based on the blog post
Implements a basic Global Descriptor Table based on
the blog post as well as ensures that
all segment registers are written, including ss
and ds
.
Implements a basic Interrupt Descriptor Table based on the blog post