#
ef894353 |
|
16-Sep-2022 |
David Karoly <karolyd577@gmail.com> |
boot/x86: unify KERNEL_LOAD_ADDRESS for BIOS and EFI Change-Id: Ia3157c7c0908698da94c1aa85cb6366fb00fb7f1 Reviewed-on: https://review.haiku-os.org/c/haiku/+/5670 Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org> Reviewed-by: Jérôme Duval <jerome.duval@gmail.com> Reviewed-by: Fredrik Holmqvist <fredrik.holmqvist@gmail.com>
|
#
f9be2680 |
|
14-Sep-2022 |
David Karoly <karolyd577@gmail.com> |
x86: use elif defined(__x86_64__) in arch_kernel.h Change-Id: Ibad5f34d73d48c5d1af870131f20ae9b52d88eb8 Reviewed-on: https://review.haiku-os.org/c/haiku/+/5664 Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org> Reviewed-by: Jérôme Duval <jerome.duval@gmail.com>
|
#
235aa994 |
|
17-Dec-2021 |
David Karoly <karolyd577@gmail.com> |
boot: rework 32-bit/64-bit kernel load base selection Change-Id: I0aed05c0ef2ff1a162581e4f988bf24ed1e521e0 Reviewed-on: https://review.haiku-os.org/c/haiku/+/4816 Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org> Reviewed-by: Adrien Destugues <pulkomandy@gmail.com> Reviewed-by: Fredrik Holmqvist <fredrik.holmqvist@gmail.com>
|
#
2555f335 |
|
14-May-2020 |
Michael Lotz <mmlr@mlotz.ch> |
Cleanup: Various comment and whitespace fixes. Change-Id: I37c3e3346813efc595df651421b7e8ff4fbf3339 Reviewed-on: https://review.haiku-os.org/c/haiku/+/2845 Reviewed-by: waddlesplash <waddlesplash@gmail.com>
|
#
9e1ce8ed |
|
05-Mar-2019 |
Jérôme Duval <jerome.duval@gmail.com> |
kernel: tweak USER_SIZE. Change-Id: Id0a4ad785bbd195e425dd32ca891dc4525bb3e18 Reviewed-on: https://review.haiku-os.org/c/1151 Reviewed-by: waddlesplash <waddlesplash@gmail.com>
|
#
01796e78 |
|
20-Feb-2019 |
Augustin Cavalier <waddlesplash@gmail.com> |
kernel/x86: Re-introduce the 1MB lower barrier. It was removed in 2008 to make VM86 work, which is now gone. Fixes #14911.
|
#
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
|
#
964fb0c3 |
|
16-Jan-2018 |
Jérôme Duval <jerome.duval@gmail.com> |
kernel: make arch_kernel.h for x86 C safe.
|
#
a8f8d2c0 |
|
04-Apr-2013 |
Pawel Dziepak <pdziepak@quarnos.org> |
x86_64: put user stack and team data at top of user address space
|
#
f697412f |
|
03-Apr-2013 |
Pawel Dziepak <pdziepak@quarnos.org> |
vm: place commpage and team data near the top of user address space Placing commpage and team user data somewhere at the top of the user accessible virtual address space prevents these areas from conflicting with elf images that require to be mapped at exact address (in most cases: runtime_loader).
|
#
5e0c3db2 |
|
22-Mar-2013 |
Alex Smith <alex@alex-smith.me.uk> |
Account for the physical map area in the kernel VM space. Fixes #9547. The physical memory map area was not included in the kernel virtual address space range (it was below KERNEL_BASE). This caused problems if an I/O operation took place on physical memory mapped there (the bad address error seen in #9547 was occurring in lock_memory_etc()). Changed KERNEL_BASE and KERNEL_SIZE to cover the area and add a null area that covers all of it. Also changed X86VMTranslationMap64Bit to handle large pages in Query(), as the physical map area uses large pages.
|
#
9f629ef3 |
|
17-Aug-2012 |
Alex Smith <alex@alex-smith.me.uk> |
Rename KERNEL_LOAD_BASE_64BIT to KERNEL_LOAD_BASE_64_BIT for consistency.
|
#
d93ed095 |
|
02-Aug-2012 |
Alex Smith <alex@alex-smith.me.uk> |
Improved safety for user memory accesses. * Changed IS_USER_ADDRESS to check an address using USER_BASE and USER_SIZE, rather than just !IS_KERNEL_ADDRESS. The old check would allow user buffers to point into the physical memory map area. * Added an unmapped hole at the end of the bottom half of the address space which catches buffers that cross into the uncanonical address region. This also removes the need to check for uncanonical return addresses in the syscall handler, it is no longer possible for the return address to be uncanonical under normal circumstances. All cases in which the return address might be changed by the kernel are still handled via the IRET path.
|
#
15feb603 |
|
06-Jul-2012 |
Alex Smith <alex@alex-smith.me.uk> |
A few improvements suggested by Ingo.
|
#
950b24e3 |
|
04-Jul-2012 |
Alex Smith <alex@alex-smith.me.uk> |
Begun work on VMTranslationMap implementation for x86_64. * Added empty source files for all the 64-bit paging method code, and a stub implementation of X86PagingMethod64Bit. * arch_vm_translation_map.cpp has been modified to use X86PagingMethod64Bit on x86_64.
|
#
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.
|
#
f69dd487 |
|
25-Jun-2012 |
Alex Smith <alex@alex-smith.me.uk> |
Fixed x86 GCC2 build.
|
#
6f6d78e8 |
|
25-Jun-2012 |
Alex Smith <alex@alex-smith.me.uk> |
Cleaned up ELF64 address handling. * platform_allocate_elf_region() is removed, it is implemented in platform- independent code now (ELF*Class::AllocateRegion). For ELF64 it is now assumed that 64-bit addresses are mapped in the loader's 32-bit address space as (address - KERNEL_BASE_64BIT + KERNEL_BASE). * mapped_delta field from preloaded_*_image removed, now handled compile-time using the ELF*Class::Map method. * Also link the kernel with -z max-page-size=0x1000, removes the need for 2MB alignment on the data segment (not going to map the kernel with large pages for the time being).
|
#
d648afb8 |
|
11-May-2008 |
Ingo Weinhold <ingo_weinhold@gmx.de> |
* For each userland team the kernel creates an area in the userland address space that is fully locked and marked B_KERNEL_AREA. It can thus be accessed by the kernel without additional checks. * For each userland thread we do create a user_thread structure in that area. The structure is accessible from userland via TLS, using the private get_user_thread() function. * Introduced private userland functions [un]defer_signals(). They can be used to cheaply disable/re-enable signal delivery. They use the user_thread::defer_signals/pending_signals fields which are checked/updated by the kernel. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25451 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
7cbf8fdd |
|
07-May-2008 |
Axel Dörfler <axeld@pinc-software.de> |
First part of the vm86 work by Jan Klötzke: * Allow userland teams to create areas below 1 MB when requested specifically. * Note, this is a temporary solution - see the comments in the code. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25358 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
34b3b26b |
|
10-Jan-2008 |
Ingo Weinhold <ingo_weinhold@gmx.de> |
Merged branch haiku/branches/developer/bonefish/optimization revision 23139 into trunk, with roughly the following changes (for details svn log the branch): * The int 99 syscall handler is now fully in assembly. * Added a sysenter/sysexit handler and use it on Pentiums that support it (via commpage). * Got rid of i386_handle_trap(). A bit of functionality was moved into the assembly handler which now uses a jump table to call C functions handling the respective interrupt. * Some optimizations to get user debugger support code out of the interrupt handling path. * Introduced a thread::flags fields which allows to skip handling of rare events (signals, user debug enabling/disabling) on the common interrupt handling path. * Got rid of the explicit iframe stack. The iframes can still be retrieved by iterating through the stack frames. * Made the commpage an architecture independent feature. It's used for the real time data stuff (instead of creating a separate area). * The x86 CPU modules can now provide processor optimized versions for common functions (currently memcpy() only). They are used in the kernel and are provided to the userland via commpage entries. * Introduced build system feature allowing easy use of C structure member offsets in assembly code. Changes after merging: * Fixed merge conflict in src/system/kernel/arch/x86/arch_debug.cpp (caused by refactoring and introduction of "call" debugger command). git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@23370 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
3999c1f3 |
|
09-Jun-2004 |
Axel Dörfler <axeld@pinc-software.de> |
Minor cleanup. git-svn-id: file:///srv/svn/repos/haiku/trunk/current@7881 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
52a38012 |
|
08-Jul-2002 |
ejakowatz <ejakowatz@nowhere.fake> |
It is accomplished ... git-svn-id: file:///srv/svn/repos/haiku/trunk/current@10 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
a8f8d2c057711ac2894f02e2b8704cd8b03c346f |
|
04-Apr-2013 |
Pawel Dziepak <pdziepak@quarnos.org> |
x86_64: put user stack and team data at top of user address space
|
#
f697412ff81a6d6a4a9866abce93f1f20a68330f |
|
03-Apr-2013 |
Pawel Dziepak <pdziepak@quarnos.org> |
vm: place commpage and team data near the top of user address space Placing commpage and team user data somewhere at the top of the user accessible virtual address space prevents these areas from conflicting with elf images that require to be mapped at exact address (in most cases: runtime_loader).
|
#
5e0c3db2867defa76df0e83fd74a9a39e0dd622b |
|
22-Mar-2013 |
Alex Smith <alex@alex-smith.me.uk> |
Account for the physical map area in the kernel VM space. Fixes #9547. The physical memory map area was not included in the kernel virtual address space range (it was below KERNEL_BASE). This caused problems if an I/O operation took place on physical memory mapped there (the bad address error seen in #9547 was occurring in lock_memory_etc()). Changed KERNEL_BASE and KERNEL_SIZE to cover the area and add a null area that covers all of it. Also changed X86VMTranslationMap64Bit to handle large pages in Query(), as the physical map area uses large pages.
|
#
9f629ef38e6655e1509dca6db587a2035243ccdb |
|
17-Aug-2012 |
Alex Smith <alex@alex-smith.me.uk> |
Rename KERNEL_LOAD_BASE_64BIT to KERNEL_LOAD_BASE_64_BIT for consistency.
|
#
d93ed095640345495ace3b653ea87b66815c7c81 |
|
02-Aug-2012 |
Alex Smith <alex@alex-smith.me.uk> |
Improved safety for user memory accesses. * Changed IS_USER_ADDRESS to check an address using USER_BASE and USER_SIZE, rather than just !IS_KERNEL_ADDRESS. The old check would allow user buffers to point into the physical memory map area. * Added an unmapped hole at the end of the bottom half of the address space which catches buffers that cross into the uncanonical address region. This also removes the need to check for uncanonical return addresses in the syscall handler, it is no longer possible for the return address to be uncanonical under normal circumstances. All cases in which the return address might be changed by the kernel are still handled via the IRET path.
|
#
15feb60325be086823e80a3468f7aab2bfbc9f7d |
|
06-Jul-2012 |
Alex Smith <alex@alex-smith.me.uk> |
A few improvements suggested by Ingo.
|
#
950b24e32d8ddbc0d2a4e46de77c0fb4cc18b128 |
|
04-Jul-2012 |
Alex Smith <alex@alex-smith.me.uk> |
Begun work on VMTranslationMap implementation for x86_64. * Added empty source files for all the 64-bit paging method code, and a stub implementation of X86PagingMethod64Bit. * arch_vm_translation_map.cpp has been modified to use X86PagingMethod64Bit on x86_64.
|
#
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.
|
#
f69dd487b1c4e0a3f35d6477e9a6720315e89f35 |
|
25-Jun-2012 |
Alex Smith <alex@alex-smith.me.uk> |
Fixed x86 GCC2 build.
|
#
6f6d78e877c1a485d98de60395854a6d6de61c0d |
|
25-Jun-2012 |
Alex Smith <alex@alex-smith.me.uk> |
Cleaned up ELF64 address handling. * platform_allocate_elf_region() is removed, it is implemented in platform- independent code now (ELF*Class::AllocateRegion). For ELF64 it is now assumed that 64-bit addresses are mapped in the loader's 32-bit address space as (address - KERNEL_BASE_64BIT + KERNEL_BASE). * mapped_delta field from preloaded_*_image removed, now handled compile-time using the ELF*Class::Map method. * Also link the kernel with -z max-page-size=0x1000, removes the need for 2MB alignment on the data segment (not going to map the kernel with large pages for the time being).
|
#
d648afb8d7852cc7ca9819315356ec605e2e0ee7 |
|
11-May-2008 |
Ingo Weinhold <ingo_weinhold@gmx.de> |
* For each userland team the kernel creates an area in the userland address space that is fully locked and marked B_KERNEL_AREA. It can thus be accessed by the kernel without additional checks. * For each userland thread we do create a user_thread structure in that area. The structure is accessible from userland via TLS, using the private get_user_thread() function. * Introduced private userland functions [un]defer_signals(). They can be used to cheaply disable/re-enable signal delivery. They use the user_thread::defer_signals/pending_signals fields which are checked/updated by the kernel. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25451 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
7cbf8fdd5a22f56b50ce28270e0f867401dd6c0f |
|
07-May-2008 |
Axel Dörfler <axeld@pinc-software.de> |
First part of the vm86 work by Jan Klötzke: * Allow userland teams to create areas below 1 MB when requested specifically. * Note, this is a temporary solution - see the comments in the code. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25358 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
34b3b26b3b8c46ba46ddde037b10dd173f4936d6 |
|
10-Jan-2008 |
Ingo Weinhold <ingo_weinhold@gmx.de> |
Merged branch haiku/branches/developer/bonefish/optimization revision 23139 into trunk, with roughly the following changes (for details svn log the branch): * The int 99 syscall handler is now fully in assembly. * Added a sysenter/sysexit handler and use it on Pentiums that support it (via commpage). * Got rid of i386_handle_trap(). A bit of functionality was moved into the assembly handler which now uses a jump table to call C functions handling the respective interrupt. * Some optimizations to get user debugger support code out of the interrupt handling path. * Introduced a thread::flags fields which allows to skip handling of rare events (signals, user debug enabling/disabling) on the common interrupt handling path. * Got rid of the explicit iframe stack. The iframes can still be retrieved by iterating through the stack frames. * Made the commpage an architecture independent feature. It's used for the real time data stuff (instead of creating a separate area). * The x86 CPU modules can now provide processor optimized versions for common functions (currently memcpy() only). They are used in the kernel and are provided to the userland via commpage entries. * Introduced build system feature allowing easy use of C structure member offsets in assembly code. Changes after merging: * Fixed merge conflict in src/system/kernel/arch/x86/arch_debug.cpp (caused by refactoring and introduction of "call" debugger command). git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@23370 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
3999c1f3ec626b95bc85fbdd85a44d2180a74010 |
|
09-Jun-2004 |
Axel Dörfler <axeld@pinc-software.de> |
Minor cleanup. git-svn-id: file:///srv/svn/repos/haiku/trunk/current@7881 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
52a380120846174213ccce9c4aab0dda17c72083 |
|
08-Jul-2002 |
ejakowatz <ejakowatz@nowhere.fake> |
It is accomplished ... git-svn-id: file:///srv/svn/repos/haiku/trunk/current@10 a95241bf-73f2-0310-859d-f6bbb57e9c96
|