mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 08:37:34 +00:00
Kernel: Use the new API to query and map BAR spaces in most places
This might be a bit overkill in some instances, but it's nice to be consistent
This commit is contained in:
parent
c65455e122
commit
2dc20f9e39
7 changed files with 28 additions and 26 deletions
|
@ -7,6 +7,7 @@
|
|||
#include <AK/ByteReader.h>
|
||||
#include <Kernel/Bus/PCI/API.h>
|
||||
#include <Kernel/Bus/PCI/Access.h>
|
||||
#include <Kernel/Bus/PCI/BarMapping.h>
|
||||
#include <Kernel/Bus/PCI/Controller/VolumeManagementDevice.h>
|
||||
|
||||
namespace Kernel::PCI {
|
||||
|
@ -36,7 +37,7 @@ NonnullOwnPtr<VolumeManagementDevice> VolumeManagementDevice::must_create(PCI::D
|
|||
// resource size of BAR0.
|
||||
dbgln("VMD Host bridge @ {}: Start bus at {}, end bus {}", device_identifier.address(), start_bus, 0xff);
|
||||
PCI::Domain domain { s_vmd_pci_domain_number++, start_bus, 0xff };
|
||||
auto start_address = PhysicalAddress(PCI::get_BAR0(device_identifier)).page_base();
|
||||
auto start_address = PCI::get_bar_address(device_identifier, PCI::HeaderType0BaseRegister::BAR0).release_value_but_fixme_should_propagate_errors();
|
||||
return adopt_own_if_nonnull(new (nothrow) VolumeManagementDevice(domain, start_address)).release_nonnull();
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue