From e6e0bb0d435b3410d520baea60652af05cae8232 Mon Sep 17 00:00:00 2001 From: Ian Moffett Date: Sun, 21 Sep 2025 16:53:03 -0400 Subject: kern: ahci: Only support 64-bit HBAs for now Abort if the host controller does not support 64-bit addressing Signed-off-by: Ian Moffett --- src/sys/io/ic/ahci.c | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'src/sys/io/ic') diff --git a/src/sys/io/ic/ahci.c b/src/sys/io/ic/ahci.c index 3a6f0c3..5cc675f 100644 --- a/src/sys/io/ic/ahci.c +++ b/src/sys/io/ic/ahci.c @@ -286,6 +286,13 @@ ahci_hba_init(struct ahci_hba *hba) hba->pi = mmio_read32(&io->pi); hba->nport = AHCI_CAP_NP(cap) + 1; + /* Only support 64-bit addressing as of now */ + if (AHCI_CAP_S64A(cap) == 0) { + pr_trace("HBA does not support 64-bit addressing\n"); + pr_trace("aborting..\n"); + return -ENOTSUP; + } + /* * We cannot be so certain what state the BIOS or whatever * firmware left the host controller in, therefore the HBA -- cgit v1.2.3