mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 21:47:45 +00:00
Kernel+Userland: Remove supervisor pages concept
There's no real value in separating physical pages to supervisor and user types, so let's remove the concept and just let everyone to use "user" physical pages which can be allocated from any PhysicalRegion we want to use. Later on, we will remove the "user" prefix as this prefix is not needed anymore.
This commit is contained in:
parent
ed9b2a85ed
commit
1c499e75bd
8 changed files with 8 additions and 96 deletions
|
@ -22,7 +22,7 @@ namespace Kernel {
|
|||
|
||||
UNMAP_AFTER_INIT ErrorOr<NonnullRefPtr<AHCIPort>> AHCIPort::create(AHCIController const& controller, AHCI::HBADefinedCapabilities hba_capabilities, volatile AHCI::PortRegisters& registers, u32 port_index)
|
||||
{
|
||||
auto identify_buffer_page = MUST(MM.allocate_supervisor_physical_page());
|
||||
auto identify_buffer_page = MUST(MM.allocate_user_physical_page());
|
||||
auto port = TRY(adopt_nonnull_ref_or_enomem(new (nothrow) AHCIPort(controller, move(identify_buffer_page), hba_capabilities, registers, port_index)));
|
||||
TRY(port->allocate_resources_and_initialize_ports());
|
||||
return port;
|
||||
|
@ -35,14 +35,14 @@ ErrorOr<void> AHCIPort::allocate_resources_and_initialize_ports()
|
|||
return {};
|
||||
}
|
||||
|
||||
m_fis_receive_page = TRY(MM.allocate_supervisor_physical_page());
|
||||
m_fis_receive_page = TRY(MM.allocate_user_physical_page());
|
||||
|
||||
for (size_t index = 0; index < 1; index++) {
|
||||
auto dma_page = TRY(MM.allocate_supervisor_physical_page());
|
||||
auto dma_page = TRY(MM.allocate_user_physical_page());
|
||||
m_dma_buffers.append(move(dma_page));
|
||||
}
|
||||
for (size_t index = 0; index < 1; index++) {
|
||||
auto command_table_page = TRY(MM.allocate_supervisor_physical_page());
|
||||
auto command_table_page = TRY(MM.allocate_user_physical_page());
|
||||
m_command_table_pages.append(move(command_table_page));
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue