#
27b32ee0 |
|
03-May-2018 |
Jérôme Duval <jerome.duval@gmail.com> |
kernel/x86_64: adjust descriptors tables for compatibility mode. * also adjust BOOT_GDT_SEGMENT_COUNT for x86, the definition is used by the boot loader. * add some 32-bit definitions. * add a UserTLSDescriptor class, this will be used by 32-bit threads. Change-Id: I5b1d978969a1ce97091a16c9ec2ad7c0ca831656
|
#
e9922e77 |
|
22-Oct-2014 |
Michael Lotz <mmlr@mlotz.ch> |
haiku_loader: Fix wrong size of gBootGDT on x86_64. The BOOT_GDT_SEGMENT_COUNT was based on USER_DATA_SEGMENT on both x86 and x86_64. However, on x86_64 the order of the segments is different, leading to a too small gBootGDT array. Move the define to the arch specific headers so they can be setup correctly in either case. Also add a STATIC_ASSERT() to check that the descriptors fit into the array. Pointed out by CID 1210898.
|
#
a5b070f1 |
|
16-Dec-2013 |
Pawel Dziepak <pdziepak@quarnos.org> |
x86: Store pointer to the current thread in gs:0 Apparently, reading from dr3 is slower than reading from memory with cache hit. Also, depending on hypervisor configuration, accessing dr3 may cause a VM exit (and, at least on kvm, it does), what makes it much slower than a memory access even when there is a cache miss.
|
#
611376fe |
|
16-Dec-2013 |
Pawel Dziepak <pdziepak@quarnos.org> |
x86: Let each CPU have its own GDT
|
#
d38f1301 |
|
12-Jul-2012 |
Alex Smith <alex@alex-smith.me.uk> |
Cleaned up 32-bit descriptors.h.
|
#
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.
|
#
4304bb98 |
|
04-Jul-2012 |
Alex Smith <alex@alex-smith.me.uk> |
Added arch_cpu.cpp to the x86_64 build. * Some things are currently ifndef'd out completely for x86_64 because they aren't implemented, there's a few other ifdef's to handle x86_64 differences but most of the code works unchanged. * Renamed some i386_* functions to x86_*. * Added a temporary method for setting the current thread on x86_64 (a global variable, not SMP safe). This will be changed to be done via the GS segment but I've not implemented that yet.
|
#
0897e314 |
|
02-Jul-2012 |
Alex Smith <alex@alex-smith.me.uk> |
Merged x86_64 headers into x86 headers. Not many changes seeing as there's not much x86_64 stuff done yet. Small differences are handled with ifdefs, large differences (descriptors.h, struct iframe) have separate headers under arch/x86/32 and arch/x86/64.
|
#
e9922e775f2fbbffa4847ae797e5349542948f25 |
|
22-Oct-2014 |
Michael Lotz <mmlr@mlotz.ch> |
haiku_loader: Fix wrong size of gBootGDT on x86_64. The BOOT_GDT_SEGMENT_COUNT was based on USER_DATA_SEGMENT on both x86 and x86_64. However, on x86_64 the order of the segments is different, leading to a too small gBootGDT array. Move the define to the arch specific headers so they can be setup correctly in either case. Also add a STATIC_ASSERT() to check that the descriptors fit into the array. Pointed out by CID 1210898.
|
#
a5b070f1fac87567bd1837c53bdd7d44f3a5d3c4 |
|
16-Dec-2013 |
Pawel Dziepak <pdziepak@quarnos.org> |
x86: Store pointer to the current thread in gs:0 Apparently, reading from dr3 is slower than reading from memory with cache hit. Also, depending on hypervisor configuration, accessing dr3 may cause a VM exit (and, at least on kvm, it does), what makes it much slower than a memory access even when there is a cache miss.
|
#
611376fef7e00967fb65342802ba668a807348d5 |
|
16-Dec-2013 |
Pawel Dziepak <pdziepak@quarnos.org> |
x86: Let each CPU have its own GDT
|
#
d38f1301d1e3f4c56f6350b40be3275ceff478ee |
|
12-Jul-2012 |
Alex Smith <alex@alex-smith.me.uk> |
Cleaned up 32-bit descriptors.h.
|
#
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.
|
#
4304bb9894335fe5e5bd667a1f27dc7605c2e5b9 |
|
04-Jul-2012 |
Alex Smith <alex@alex-smith.me.uk> |
Added arch_cpu.cpp to the x86_64 build. * Some things are currently ifndef'd out completely for x86_64 because they aren't implemented, there's a few other ifdef's to handle x86_64 differences but most of the code works unchanged. * Renamed some i386_* functions to x86_*. * Added a temporary method for setting the current thread on x86_64 (a global variable, not SMP safe). This will be changed to be done via the GS segment but I've not implemented that yet.
|
#
0897e314b79d09b04349d3cfe6093a3fd6220da1 |
|
02-Jul-2012 |
Alex Smith <alex@alex-smith.me.uk> |
Merged x86_64 headers into x86 headers. Not many changes seeing as there's not much x86_64 stuff done yet. Small differences are handled with ifdefs, large differences (descriptors.h, struct iframe) have separate headers under arch/x86/32 and arch/x86/64.
|