Kernel: ATAController will fail to initialize in native mode

This commit is contained in:
Bananymous 2023-04-19 17:29:36 +03:00
parent cf0320e47d
commit 4475e3e184
3 changed files with 4 additions and 0 deletions

View File

@ -29,6 +29,7 @@ namespace Kernel
ATA_MC, ATA_MC,
ATA_UNC, ATA_UNC,
ATA_BBK, ATA_BBK,
ATA_UnsupportedDevice,
Font_FileTooSmall, Font_FileTooSmall,
Font_Unsupported, Font_Unsupported,
Count Count

View File

@ -26,6 +26,7 @@ namespace Kernel
"Media changed"sv, "Media changed"sv,
"Uncorrectable data error"sv, "Uncorrectable data error"sv,
"Bad Block detected"sv, "Bad Block detected"sv,
"Unsupported ata device"sv,
"Font file too small"sv, "Font file too small"sv,
"Unsupported font format"sv, "Unsupported font format"sv,
}; };

View File

@ -39,11 +39,13 @@ namespace Kernel
{ {
buses[0].base = pci_device.read_dword(0x10) & 0xFFFFFFFC; buses[0].base = pci_device.read_dword(0x10) & 0xFFFFFFFC;
buses[0].ctrl = pci_device.read_dword(0x14) & 0xFFFFFFFC; buses[0].ctrl = pci_device.read_dword(0x14) & 0xFFFFFFFC;
return BAN::Error::from_error_code(ErrorCode::ATA_UnsupportedDevice);
} }
if (prog_if & 0x04) if (prog_if & 0x04)
{ {
buses[1].base = pci_device.read_dword(0x18) & 0xFFFFFFFC; buses[1].base = pci_device.read_dword(0x18) & 0xFFFFFFFC;
buses[1].ctrl = pci_device.read_dword(0x1C) & 0xFFFFFFFC; buses[1].ctrl = pci_device.read_dword(0x1C) & 0xFFFFFFFC;
return BAN::Error::from_error_code(ErrorCode::ATA_UnsupportedDevice);
} }
m_buses[0] = ATABus::create(this, buses[0].base, buses[0].ctrl, 14); m_buses[0] = ATABus::create(this, buses[0].base, buses[0].ctrl, 14);