History log of /haiku-fatelf/src/system/kernel/arch/x86/paging/pae/X86PagingMethodPAE.cpp
Revision Date Author Comments
# d1f280c8 01-Apr-2012 Hamish Morrison <hamishm53@gmail.com>

Add support for pthread_attr_get/setguardsize()

* Added the aforementioned functions.
* create_area_etc() now takes a guard size parameter.
* The thread_info::stack_base/end range now refers to the usable range
only.


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


# 4e8fbfb2 03-Jul-2012 Alex Smith <alex@alex-smith.me.uk>

x86_{read,write}_cr{0,4} can just be implemented as macros, put an x86_ prefix on the other read/write macros for consistency.


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


# 403ad054 19-Jul-2010 Axel Dörfler <axeld@pinc-software.de>

* Fixed warnings that occur with GCC4.4.


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


# 45bd7bb3 25-Jun-2010 Ingo Weinhold <ingo_weinhold@gmx.de>

Removed unnecessary inclusions of <boot/kernel_args.h> in private kernel
headers and respectively added includes in source files.


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


# 58bdffb9 23-Jun-2010 Ingo Weinhold <ingo_weinhold@gmx.de>

Disabled tracing and removed a bit of debug output.


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


# a8ad734f 14-Jun-2010 Ingo Weinhold <ingo_weinhold@gmx.de>

* Introduced structures {virtual,physical}_address_restrictions, which specify
restrictions for virtual/physical addresses.
* vm_page_allocate_page_run():
- Fixed conversion of base/limit to array indexes. sPhysicalPageOffset was not
taken into account.
- Takes a physical_address_restrictions instead of base/limit and also
supports alignment and boundary restrictions, now.
* map_backing_store(), VM[User,Kernel]AddressSpace::InsertArea()/
ReserveAddressRange() take a virtual_address_restrictions parameter, now. They
also support an alignment independent from the range size.
* create_area_etc(), vm_create_anonymous_area(): Take
{virtual,physical}_address_restrictions parameters, now.
* Removed no longer needed B_PHYSICAL_BASE_ADDRESS.
* DMAResources:
- Fixed potential overflows of uint32 when initializing from device node
attributes.
- Fixed bounce buffer creation TODOs: By using create_area_etc() with the
new restrictions parameters we can directly support physical high address,
boundary, and alignment.


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


# 8d257216 13-Jun-2010 Ingo Weinhold <ingo_weinhold@gmx.de>

X86PagingMethodPAE::PutPageTableEntryInTable(): Incorrectly used 32 bit type,
which caused the upper 32 bit of the address to be ignored, thus mapping to
the wrong page.


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


# 4d2b2dc4 11-Jun-2010 Ingo Weinhold <ingo_weinhold@gmx.de>

Enable PAE on all CPUs.


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


# 4bdc89aa 11-Jun-2010 Ingo Weinhold <ingo_weinhold@gmx.de>

* Implemented X86PagingMethodPAE::PhysicalPageSlotPool::AllocatePool().
* Implemented X86PagingMethodPAE::IsKernelPageAccessible().


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


# 5d896949 10-Jun-2010 Ingo Weinhold <ingo_weinhold@gmx.de>

Added methods {Allocate,Free}32BitPage(), which allocate+map/unmap+free a
page with a 32 bit physical address (needed for the PDPTs). A small set of
free pages is cached, so the rather expensive vm_page_allocate_page_run() can
be avoided most of the time.


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


# 0c4c918a 10-Jun-2010 Ingo Weinhold <ingo_weinhold@gmx.de>

Fleshed out most of the unimplemented methods. The kernel boots up to the
creation of the initial shell, now.


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


# 5d6d1935 09-Jun-2010 Ingo Weinhold <ingo_weinhold@gmx.de>

Implemented X86PagingMethodPAE::Init() and all of its direct dependencies:
* The 32 bit paging structures inherited from the boot loader are translated
to PAE structures and PAE is enabled.
* Implemented the initialization of the initial PhysicalPageSlotPool, so that
the physical page mapper can be initialized.


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


# 5b4d62a2 08-Jun-2010 Ingo Weinhold <ingo_weinhold@gmx.de>

Skeleton classes for PAE support.


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


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


# 4e8fbfb2d158de7b1cadd1c060acee51a7d67309 03-Jul-2012 Alex Smith <alex@alex-smith.me.uk>

x86_{read,write}_cr{0,4} can just be implemented as macros, put an x86_ prefix on the other read/write macros for consistency.


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


# 403ad05453e57f7ef338f2caa1d2325a5a5e6245 19-Jul-2010 Axel Dörfler <axeld@pinc-software.de>

* Fixed warnings that occur with GCC4.4.


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


# 45bd7bb3db9d9e4dcb02b89a3e7c2bf382c0a88c 25-Jun-2010 Ingo Weinhold <ingo_weinhold@gmx.de>

Removed unnecessary inclusions of <boot/kernel_args.h> in private kernel
headers and respectively added includes in source files.


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


# 58bdffb9676382b213c7c600908ed6a780c19e64 23-Jun-2010 Ingo Weinhold <ingo_weinhold@gmx.de>

Disabled tracing and removed a bit of debug output.


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


# a8ad734f1c698917badb15e1641e0f38b3e9a013 14-Jun-2010 Ingo Weinhold <ingo_weinhold@gmx.de>

* Introduced structures {virtual,physical}_address_restrictions, which specify
restrictions for virtual/physical addresses.
* vm_page_allocate_page_run():
- Fixed conversion of base/limit to array indexes. sPhysicalPageOffset was not
taken into account.
- Takes a physical_address_restrictions instead of base/limit and also
supports alignment and boundary restrictions, now.
* map_backing_store(), VM[User,Kernel]AddressSpace::InsertArea()/
ReserveAddressRange() take a virtual_address_restrictions parameter, now. They
also support an alignment independent from the range size.
* create_area_etc(), vm_create_anonymous_area(): Take
{virtual,physical}_address_restrictions parameters, now.
* Removed no longer needed B_PHYSICAL_BASE_ADDRESS.
* DMAResources:
- Fixed potential overflows of uint32 when initializing from device node
attributes.
- Fixed bounce buffer creation TODOs: By using create_area_etc() with the
new restrictions parameters we can directly support physical high address,
boundary, and alignment.


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


# 8d2572165b60b1138320effd9c69c0585b954092 13-Jun-2010 Ingo Weinhold <ingo_weinhold@gmx.de>

X86PagingMethodPAE::PutPageTableEntryInTable(): Incorrectly used 32 bit type,
which caused the upper 32 bit of the address to be ignored, thus mapping to
the wrong page.


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


# 4d2b2dc4d2b9308d784ce2c1e90e4c0d04cd3d92 11-Jun-2010 Ingo Weinhold <ingo_weinhold@gmx.de>

Enable PAE on all CPUs.


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


# 4bdc89aa14ec9a9ed0e35cfa1413470300c50813 11-Jun-2010 Ingo Weinhold <ingo_weinhold@gmx.de>

* Implemented X86PagingMethodPAE::PhysicalPageSlotPool::AllocatePool().
* Implemented X86PagingMethodPAE::IsKernelPageAccessible().


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


# 5d89694992e4c05f2296ad711ebd35905efeb152 10-Jun-2010 Ingo Weinhold <ingo_weinhold@gmx.de>

Added methods {Allocate,Free}32BitPage(), which allocate+map/unmap+free a
page with a 32 bit physical address (needed for the PDPTs). A small set of
free pages is cached, so the rather expensive vm_page_allocate_page_run() can
be avoided most of the time.


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


# 0c4c918a3da495a74d756206a8b7c3dbf1286109 10-Jun-2010 Ingo Weinhold <ingo_weinhold@gmx.de>

Fleshed out most of the unimplemented methods. The kernel boots up to the
creation of the initial shell, now.


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


# 5d6d1935d6cf1b294dc40f43ba977e82ea38b704 09-Jun-2010 Ingo Weinhold <ingo_weinhold@gmx.de>

Implemented X86PagingMethodPAE::Init() and all of its direct dependencies:
* The 32 bit paging structures inherited from the boot loader are translated
to PAE structures and PAE is enabled.
* Implemented the initialization of the initial PhysicalPageSlotPool, so that
the physical page mapper can be initialized.


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


# 5b4d62a2618dd2ae37b975e4ca283b410f39f9c7 08-Jun-2010 Ingo Weinhold <ingo_weinhold@gmx.de>

Skeleton classes for PAE support.


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