History log of /haiku/src/system/kernel/arch/x86/paging/64bit/X86VMTranslationMap64Bit.cpp
Revision Date Author Comments
# 057fe191 01-Sep-2021 Augustin Cavalier <waddlesplash@gmail.com>

kernel: Break thread-related AutoLockers into a separate header.

Including thread.h brings a massive array of things with it from
the kernel thread arch headers, team and thread definitions,
hash tables, linked lists, Referenceable, etc. that the vast majority
of AutoLock.h consumers neither want nor need.

So, put these in a separate header, and adjust all consumers of these
lockers to include the new file.

This change exposes the fact that a lot of files were inadvertently
making use of headers included indirectly through thread.h. Those
will be fixed in the next commit.


# 58353b38 02-Oct-2020 Jérôme Duval <jerome.duval@gmail.com>

kernel/x86_64: LA57 aka 5-level paging

this enables the kernel to correctly take over when the bootloader prepares
the paging in 4-level or 5-level.

Change-Id: I0444486d8e17aade574e2afe255a3c2cfc49f21f
Reviewed-on: https://review.haiku-os.org/c/haiku/+/3551
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
Reviewed-by: Axel Dörfler <axeld@pinc-software.de>


# be573dcd 22-Apr-2013 Pawel Dziepak <pdziepak@quarnos.org>

arch: make sure not to set NX-bit when it is reserved


# 966f2076 06-Mar-2013 Pawel Dziepak <pdziepak@quarnos.org>

x86: enable data execution prevention

Set execute disable bit for any page that belongs to area with neither
B_EXECUTE_AREA nor B_KERNEL_EXECUTE_AREA set.

In order to take advanage of NX bit in 32 bit protected mode PAE must be
enabled. Thus, from now on it is also enabled when the CPU supports NX bit.

vm_page_fault() takes additional argument which indicates whether page fault
was caused by an illegal instruction fetch.


# 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.


# aef19e3c 22-Jul-2012 Alex Smith <alex@alex-smith.me.uk>

Implemented creation and destruction of user translation maps.


# cc248cf2 08-Jul-2012 Alex Smith <alex@alex-smith.me.uk>

A couple of bug fixes.

* mmu_get_virtual_mapping() should check that the page directory entry is
present rather than assuming there's a page table there. This was resulting
in some invalid mappings being created in the 64-bit virtual address space.
* arch_vm_init_end() should clear from KERNEL_LOAD_BASE to virtual_end, not
from KERNEL_BASE. On x86_64 this was causing it to loop through ~512GB of
address space, which obviously was taking quite a while.


# e276cc04 05-Jul-2012 Alex Smith <alex@alex-smith.me.uk>

Finished implementation of x86_64 paging.

* vm_init now runs up until create_preloaded_image_areas(), which needs
fixing to handle ELF64.
* Not completely tested. I know Map(), Unmap() and Query() work fine, the
other methods have not been tested as the kernel doesn't boot far enough
for any of them to be called yet. As far as I know they're correct, though.
* Not yet implemented the destructor for X86VMTranslationMap64Bit or Init()
for a user address space.


# 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.


# be573dcd88b099c4ba98dcf3c63300231f207a37 22-Apr-2013 Pawel Dziepak <pdziepak@quarnos.org>

arch: make sure not to set NX-bit when it is reserved


# 966f207668d19610dae34d5331150e3742815bcf 06-Mar-2013 Pawel Dziepak <pdziepak@quarnos.org>

x86: enable data execution prevention

Set execute disable bit for any page that belongs to area with neither
B_EXECUTE_AREA nor B_KERNEL_EXECUTE_AREA set.

In order to take advanage of NX bit in 32 bit protected mode PAE must be
enabled. Thus, from now on it is also enabled when the CPU supports NX bit.

vm_page_fault() takes additional argument which indicates whether page fault
was caused by an illegal instruction fetch.


# 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.


# aef19e3c95ba3047d6d95b2731c6ea66dbbfddab 22-Jul-2012 Alex Smith <alex@alex-smith.me.uk>

Implemented creation and destruction of user translation maps.


# cc248cf2b37b96f8f86d652e0121be105b23d192 08-Jul-2012 Alex Smith <alex@alex-smith.me.uk>

A couple of bug fixes.

* mmu_get_virtual_mapping() should check that the page directory entry is
present rather than assuming there's a page table there. This was resulting
in some invalid mappings being created in the 64-bit virtual address space.
* arch_vm_init_end() should clear from KERNEL_LOAD_BASE to virtual_end, not
from KERNEL_BASE. On x86_64 this was causing it to loop through ~512GB of
address space, which obviously was taking quite a while.


# e276cc0457a4ddb3f137504e220ee5e839f132d4 05-Jul-2012 Alex Smith <alex@alex-smith.me.uk>

Finished implementation of x86_64 paging.

* vm_init now runs up until create_preloaded_image_areas(), which needs
fixing to handle ELF64.
* Not completely tested. I know Map(), Unmap() and Query() work fine, the
other methods have not been tested as the kernel doesn't boot far enough
for any of them to be called yet. As far as I know they're correct, though.
* Not yet implemented the destructor for X86VMTranslationMap64Bit or Init()
for a user address space.


# 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.