History log of /haiku/src/system/kernel/arch/x86/paging/32bit/X86VMTranslationMap32Bit.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.


# 643cf35e 03-Dec-2011 Michael Lotz <mmlr@mlotz.ch>

Add debug helper functions to mark pages present.

They can be used to mark pages as present/non-present without actually
unmapping them. Marking pages as non-present causes every access to
fault. We can use that for debugging as it allows us to "read protect"
individual kernel pages.


# 4535495d 10-Jan-2011 Ingo Weinhold <ingo_weinhold@gmx.de>

Merged the signals branch into trunk, with these changes:
* The team and thread kernel structures have been renamed to Team and Thread
respectively and moved into the new BKernel namespace.
* Several (kernel add-on) sources have been converted from C to C++ since
private kernel headers are included that are no longer C compatible.

Changes after merging:
* Fixed gcc 2 build (warnings mainly in the scary firewire bus manager).


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@40196 a95241bf-73f2-0310-859d-f6bbb57e9c96


# b9447668 10-Jul-2010 Ingo Weinhold <ingo_weinhold@gmx.de>

* Moved the vm_page initialization from vm_page.cpp:vm_page_init() to the new
vm_page::Init().
* Made vm_page::wired_count private and added accessor methods.
* Added VMCache::fWiredPagesCount (the number of wired pages the cache
contains) and accessor methods.
* Made more use of vm_page::IsMapped().
* vm_copy_on_write_area(): Added vm_page_reservation* parameter that can be
used to request a special handling for wired pages. If given the wired pages
are replaced by copies and the original pages are moved to the upper cache.
* vm_copy_area():
- We don't need to do any wired ranges handling, if the source area is a
B_SHARED_AREA, since we don't touch the area's mappings in this case.
- We no longer wait for wired ranges of the concerned areas to disappear.
Instead we use the new vm_copy_on_write_area() feature and just let it
copy the wired pages. This fixes #6288, an issue introduced with the use
of user mutexes in libroot: When executing multiple concurrent fork()s all
but the first one would wait on the fork mutex, which (being a user mutex)
would wire a page that the vm_copy_area() of the first fork() would wait
for.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37460 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 86b6de1f 21-Jun-2010 Ingo Weinhold <ingo_weinhold@gmx.de>

UnmapPages(): Avoid potential integer overflow.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37192 a95241bf-73f2-0310-859d-f6bbb57e9c96


# a19f81b6 21-Jun-2010 Ingo Weinhold <ingo_weinhold@gmx.de>

Unmap(),Protect(): Removed goto programming by a do {} while loop. Also fixed
problem with potential integer overflow at the end of the address space.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37190 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 66f9974b 21-Jun-2010 Ingo Weinhold <ingo_weinhold@gmx.de>

Use InvalidatePage() instead of playing with the invalidation cache by hand.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37189 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 0d5ab7a1 21-Jun-2010 Ingo Weinhold <ingo_weinhold@gmx.de>

Moved duplicate code from the VMTranslationMap subclasses' UnmapPage() and
ClearAccessedAndModified() implementations into helper methods PageUnmapped()
and UnaccessedPageUnmapped() in the base class.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37187 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 96732e86 13-Jun-2010 Ingo Weinhold <ingo_weinhold@gmx.de>

X86VMTranslationMap{32bit,PAE}::UnmapPage(): Added some helpful output to
asserts.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37128 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 1c7fda89 08-Jun-2010 Ingo Weinhold <ingo_weinhold@gmx.de>

* Moved X86VMTranslationMap32Bit to its own source file.
* Made all helper function operating on paging structures static methods of
X86PagingMethod32Bit.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37064 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 643cf35ee8b8ba35ef88ca9daba4ca9ab65cf1ff 03-Dec-2011 Michael Lotz <mmlr@mlotz.ch>

Add debug helper functions to mark pages present.

They can be used to mark pages as present/non-present without actually
unmapping them. Marking pages as non-present causes every access to
fault. We can use that for debugging as it allows us to "read protect"
individual kernel pages.


# 4535495d80c86e19e2610e7444a4fcefe3e0f8e6 10-Jan-2011 Ingo Weinhold <ingo_weinhold@gmx.de>

Merged the signals branch into trunk, with these changes:
* The team and thread kernel structures have been renamed to Team and Thread
respectively and moved into the new BKernel namespace.
* Several (kernel add-on) sources have been converted from C to C++ since
private kernel headers are included that are no longer C compatible.

Changes after merging:
* Fixed gcc 2 build (warnings mainly in the scary firewire bus manager).


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@40196 a95241bf-73f2-0310-859d-f6bbb57e9c96


# b9447668707741085389f650383b018d33d7d0bf 10-Jul-2010 Ingo Weinhold <ingo_weinhold@gmx.de>

* Moved the vm_page initialization from vm_page.cpp:vm_page_init() to the new
vm_page::Init().
* Made vm_page::wired_count private and added accessor methods.
* Added VMCache::fWiredPagesCount (the number of wired pages the cache
contains) and accessor methods.
* Made more use of vm_page::IsMapped().
* vm_copy_on_write_area(): Added vm_page_reservation* parameter that can be
used to request a special handling for wired pages. If given the wired pages
are replaced by copies and the original pages are moved to the upper cache.
* vm_copy_area():
- We don't need to do any wired ranges handling, if the source area is a
B_SHARED_AREA, since we don't touch the area's mappings in this case.
- We no longer wait for wired ranges of the concerned areas to disappear.
Instead we use the new vm_copy_on_write_area() feature and just let it
copy the wired pages. This fixes #6288, an issue introduced with the use
of user mutexes in libroot: When executing multiple concurrent fork()s all
but the first one would wait on the fork mutex, which (being a user mutex)
would wire a page that the vm_copy_area() of the first fork() would wait
for.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37460 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 86b6de1faeab785e7163255d12f08b8357ac6d58 21-Jun-2010 Ingo Weinhold <ingo_weinhold@gmx.de>

UnmapPages(): Avoid potential integer overflow.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37192 a95241bf-73f2-0310-859d-f6bbb57e9c96


# a19f81b6c7b9d594c310a15c9de587b111fac19d 21-Jun-2010 Ingo Weinhold <ingo_weinhold@gmx.de>

Unmap(),Protect(): Removed goto programming by a do {} while loop. Also fixed
problem with potential integer overflow at the end of the address space.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37190 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 66f9974b06804abaecbfa5a4d9dca14b3b09d728 21-Jun-2010 Ingo Weinhold <ingo_weinhold@gmx.de>

Use InvalidatePage() instead of playing with the invalidation cache by hand.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37189 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 0d5ab7a14d2b2d10ce462eba9896d7a7bd01d827 21-Jun-2010 Ingo Weinhold <ingo_weinhold@gmx.de>

Moved duplicate code from the VMTranslationMap subclasses' UnmapPage() and
ClearAccessedAndModified() implementations into helper methods PageUnmapped()
and UnaccessedPageUnmapped() in the base class.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37187 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 96732e8650592415bcd28e13b3188ed754504b57 13-Jun-2010 Ingo Weinhold <ingo_weinhold@gmx.de>

X86VMTranslationMap{32bit,PAE}::UnmapPage(): Added some helpful output to
asserts.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37128 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 1c7fda897e52591c6f2ada9a2a16f33e6e127b32 08-Jun-2010 Ingo Weinhold <ingo_weinhold@gmx.de>

* Moved X86VMTranslationMap32Bit to its own source file.
* Made all helper function operating on paging structures static methods of
X86PagingMethod32Bit.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37064 a95241bf-73f2-0310-859d-f6bbb57e9c96