Data structures and functions used by IA-32e but not Protected Mode.
Functions to read and write control registers. See Intel Vol. 3a Section 2.5, especially Figure 2-7.
Functions and data-structures to load descriptor tables.
I/O port functionality.
Shared interrupt description and set-up code.
MSR value list and function to read and write them.
Helpers to program the task state segment. See Intel 3a, Chapter 7
Functions to read time stamp counters on x86.
Functions to flush the translation lookaside buffer (TLB).
Information about the xAPIC and x2APIC mode for the local APIC.
Generate a software interrupt. This is a macro argument needs to be an immediate.
It does so by loading RIP from the IA32_LSTAR MSR (after saving the address of the instruction following SYSCALL into RCX).
x86 Protection levels Note: This should not contain values larger than 2 bits, otherwise segment descriptor code needs to be adjusted accordingly.