Processor
This is implemented in
cpu.
Here we talk about processor related structures and functions. Including:
- Interrupts and exceptions
- Global Descriptor Table (GDT)
- Advanced Programmable Interrupt Controller (APIC) and IO APIC.
Let's first talk about other processor stuff that are not the above.
Saved CPU state
Each CPU (currently only 1) has a structure that contain the state related to the CPU.
Where it contains among others:
- the
idandapic_idof the cpu, for identification. - the
n_cliandold_interrupt_enablewhich is used by the implementation of locks. - the
contextwhich is a process context, used when switching between processes, alsoprocess_idfor current process, and other scheduling related fields.
CPU initialization
Currently, we don't perform any additional initialization after boot, and its causing some issues. As UEFI results in a different CPU state than BIOS, and we need to handle that, there is an issue for that #34.