diff --git a/kernel/ahci.c b/kernel/ahci.c index bf24528..ab0f8dd 100644 --- a/kernel/ahci.c +++ b/kernel/ahci.c @@ -49,7 +49,7 @@ void ahci_try_setup_device(uint16 bus, uint16 slot, uint16 func) { void ahci_try_setup_known_device(char *dev_name, uint64 ahci_base_mem, uint16 bus, uint16 slot, uint16 func) { cprintf("%s controller found (bus=%d, slot=%d, func=%d, abar=0x%x)\n", dev_name, bus, slot, func, ahci_base_mem); - HBA_MEM *ptr = (HBA_MEM *)&ahci_base_mem; + HBA_MEM *ptr = (HBA_MEM *)IO2V(ahci_base_mem); cprintf(" HBA in "); if(ptr->ghc == 0x0) { cprintf("legacy mode\n");