#
1f8a8d2b |
|
02-Oct-2020 |
Jérôme Duval <jerome.duval@gmail.com> |
boot/bios_ia32: basic support la57 aka 5-level paging for x86_64 kernels la57 kernel support is required. we simply add a 5th level and enable the cr4 feature. the safemode option "256tb_memory_limit" is named after the 4gb one, but the current support is limited to 512GB as before (this can be later extended). Change-Id: I922774473c4a6112a0e4ff74162285ad58aa53af Reviewed-on: https://review.haiku-os.org/c/haiku/+/3552 Reviewed-by: Adrien Destugues <pulkomandy@gmail.com> Reviewed-by: Axel Dörfler <axeld@pinc-software.de>
|
#
527da4ca |
|
27-Jan-2014 |
Pawel Dziepak <pdziepak@quarnos.org> |
x86[_64]: Separate bootloader and kernel GDT and IDT logic From now on bootloader sets up its own minimal valid GDT and IDT. Then the kernel replaces them with its own tables.
|
#
611376fe |
|
16-Dec-2013 |
Pawel Dziepak <pdziepak@quarnos.org> |
x86: Let each CPU have its own GDT
|
#
03add8e7 |
|
29-Jul-2012 |
Alex Smith <alex@alex-smith.me.uk> |
Implemented TLS for x86_64.
|
#
76a1175d |
|
11-Jul-2012 |
Alex Smith <alex@alex-smith.me.uk> |
Support for SMP on x86_64. No major changes to the kernel: just compiled in arch_smp.cpp and fixed the IDT load in arch_cpu_init_percpu to use the correct limit for x86_64 (uses sizeof(interrupt_descriptor)). In the boot loader, changed smp_boot_other_cpus to construct a temporary GDT and get the page directory address from CR3, as what's in kernel_args will be 64-bit stuff and will not work to switch the CPUs into 32-bit mode in the trampoline code. Refactored 64-bit kernel entry code to not use the stack after disabling paging, as the secondary CPUs are given a 32-bit virtual stack address by the SMP trampoline code which will no longer work.
|
#
0da10c8b |
|
05-Jul-2012 |
Alex Smith <alex@alex-smith.me.uk> |
Some fixes to the long mode switch code. * Wasn't storing the fixed virtual address of the PML4 in kernel_args. * After switching to long mode, reload GDTR with the virtual address of the GDT. This was working fine until now because the physical address was identity mapped, but broke as soon as I removed the identity mapping.
|
#
40aeaeb9 |
|
04-Jul-2012 |
Alex Smith <alex@alex-smith.me.uk> |
Should enable CR4.PGE while switching to the kernel.
|
#
c005e747 |
|
03-Jul-2012 |
Alex Smith <alex@alex-smith.me.uk> |
Removed the x86_64 headers/source directories, now all merged with x86.
|
#
0705884a |
|
27-Jun-2012 |
Alex Smith <alex@alex-smith.me.uk> |
Style fixes.
|
#
e5fc2bfc |
|
26-Jun-2012 |
Alex Smith <alex@alex-smith.me.uk> |
Implemented long mode setup/switch code, the bootloader can now start the 64-bit kernel! The setup procedure is fairly simple: create a 64-bit GDT and 64-bit page tables that include all kernel mappings from the 32-bit address space, but at the correct 64-bit address, then go through kernel_args and changes all virtual addresses to 64-bit addresses, and finally switch to long mode and jump to the kernel.
|
#
527da4ca8a4c008b58da456c01a49dcf16a98fbc |
|
27-Jan-2014 |
Pawel Dziepak <pdziepak@quarnos.org> |
x86[_64]: Separate bootloader and kernel GDT and IDT logic From now on bootloader sets up its own minimal valid GDT and IDT. Then the kernel replaces them with its own tables.
|
#
611376fef7e00967fb65342802ba668a807348d5 |
|
16-Dec-2013 |
Pawel Dziepak <pdziepak@quarnos.org> |
x86: Let each CPU have its own GDT
|
#
03add8e7c216a9ba83a2c565cb82962d6cdc53c4 |
|
29-Jul-2012 |
Alex Smith <alex@alex-smith.me.uk> |
Implemented TLS for x86_64.
|
#
76a1175dbe1a314563ca18c0b7fb82695a9730cd |
|
11-Jul-2012 |
Alex Smith <alex@alex-smith.me.uk> |
Support for SMP on x86_64. No major changes to the kernel: just compiled in arch_smp.cpp and fixed the IDT load in arch_cpu_init_percpu to use the correct limit for x86_64 (uses sizeof(interrupt_descriptor)). In the boot loader, changed smp_boot_other_cpus to construct a temporary GDT and get the page directory address from CR3, as what's in kernel_args will be 64-bit stuff and will not work to switch the CPUs into 32-bit mode in the trampoline code. Refactored 64-bit kernel entry code to not use the stack after disabling paging, as the secondary CPUs are given a 32-bit virtual stack address by the SMP trampoline code which will no longer work.
|
#
0da10c8b51f9ec443a53873b37d07fab30a5734e |
|
05-Jul-2012 |
Alex Smith <alex@alex-smith.me.uk> |
Some fixes to the long mode switch code. * Wasn't storing the fixed virtual address of the PML4 in kernel_args. * After switching to long mode, reload GDTR with the virtual address of the GDT. This was working fine until now because the physical address was identity mapped, but broke as soon as I removed the identity mapping.
|
#
40aeaeb907f5390e3eeb2958aa5d8362652eca22 |
|
04-Jul-2012 |
Alex Smith <alex@alex-smith.me.uk> |
Should enable CR4.PGE while switching to the kernel.
|
#
c005e747ef9ea6ba091c72e3fa56f8318a4bf893 |
|
03-Jul-2012 |
Alex Smith <alex@alex-smith.me.uk> |
Removed the x86_64 headers/source directories, now all merged with x86.
|
#
0705884ac415022fb9c734da089fe3dd5a06873a |
|
27-Jun-2012 |
Alex Smith <alex@alex-smith.me.uk> |
Style fixes.
|
#
e5fc2bfcab8c15a3ff7d33c358f9aa82ed73c823 |
|
26-Jun-2012 |
Alex Smith <alex@alex-smith.me.uk> |
Implemented long mode setup/switch code, the bootloader can now start the 64-bit kernel! The setup procedure is fairly simple: create a 64-bit GDT and 64-bit page tables that include all kernel mappings from the 32-bit address space, but at the correct 64-bit address, then go through kernel_args and changes all virtual addresses to 64-bit addresses, and finally switch to long mode and jump to the kernel.
|