Reto Buerki
0f624cdde7
hw_x86_64: Perform indirect long jump to 64-bit code
2015-03-27 11:53:18 +01:00
Reto Buerki
15d0e86592
hw_x86_64: Load Global Descriptor Table register
2015-03-27 11:53:17 +01:00
Reto Buerki
27191b17ce
hw_x86_64: Declare Global Descriptor Table (GDT) in .data
...
The table specifies a 64-bit code segment descriptor at index 1, a
64-bit data segment descriptor at index 2 and a task segment descriptor
at index 3.
2015-03-27 11:53:17 +01:00
Reto Buerki
59bba7624f
hw_x86_64: Set system control flags of cr0 register
...
Enable paging, write protection, caching and native FPU error reporting,
see Intel SDM Vol. 3A, section 2.5.
2015-03-27 11:53:17 +01:00
Reto Buerki
032fc3b190
hw_x86_64: Enable IA-32e mode and execute-disable
...
Set bits 8 (LME) and 11 (NXE) in the IA32_EFER MSR to enable IA-32e mode
and execute-disable.
2015-03-27 11:53:17 +01:00
Reto Buerki
d23cd7e5ff
hw_x86_64: Load initial pagetable address into cr3
2015-03-27 11:53:17 +01:00
Reto Buerki
bafb893a70
hw_x86_64: Declare initial pagetables in .data segment
...
The table specifies the initial identity mapping for the memory region
from 2 MiB to 4 MiB using one 2 MiB mapping.
2015-03-27 11:53:17 +01:00
Reto Buerki
be430b9648
hw_x86_64: Enable Physical Address Extension (PAE)
...
This is a prerequisite for IA-32e mode.
2015-03-27 11:53:16 +01:00
Norman Feske
a974726e26
hw: skeleton for building on x86_64
...
This patch contains the initial code needed to build and bootstrap the
base-hw kernel on x86 64-bit platforms. It gets stuck earlier
because the binary contains 64-bit instructions, but it is started in
32-bit mode. The initial setup of page tables and switch to long mode is
still missing from the crt0 code.
2015-03-27 11:53:16 +01:00