[Mammoth] Add an owned memory capability that cleans itself up.

This commit is contained in:
Drew Galbraith 2023-11-19 17:54:28 -08:00
parent 7d48dd2b8b
commit 3e9923f227
5 changed files with 84 additions and 9 deletions

View file

@ -21,8 +21,8 @@ void interrupt_thread(void* void_driver) {
} // namespace
glcr::ErrorOr<glcr::UniquePtr<AhciDriver>> AhciDriver::Init(
MappedMemoryRegion pci_region) {
glcr::UniquePtr<AhciDriver> driver(new AhciDriver(pci_region));
OwnedMemoryRegion&& pci_region) {
glcr::UniquePtr<AhciDriver> driver(new AhciDriver(glcr::Move(pci_region)));
// RET_ERR(driver->LoadCapabilities());
RET_ERR(driver->LoadHbaRegisters());
RET_ERR(driver->LoadDevices());