[denali] Get Ahci device address from yellowstone.

This commit is contained in:
Drew Galbraith 2023-06-26 17:01:59 -07:00
parent 02e6b49d90
commit 16dd675828
11 changed files with 125 additions and 52 deletions

View file

@ -8,7 +8,6 @@
namespace {
const uint64_t kSataPciPhys = 0xB00FA000;
const uint64_t kPciSize = 0x1000;
const uint64_t kGhc_InteruptEnable = 0x2;
@ -155,7 +154,7 @@ void AhciDriver::InterruptLoop() {
}
glcr::ErrorCode AhciDriver::LoadPciDeviceHeader() {
pci_region_ = MappedMemoryRegion::DirectPhysical(kSataPciPhys, kPciSize);
pci_region_ = MappedMemoryRegion::DirectPhysical(ahci_phys_, kPciSize);
pci_device_header_ = reinterpret_cast<PciDeviceHeader*>(pci_region_.vaddr());
return glcr::OK;
}