summaryrefslogtreecommitdiff
path: root/src/sys/io/ic
diff options
context:
space:
mode:
authorIan Moffett <ian@osmora.org>2025-09-21 16:53:03 -0400
committerIan Moffett <ian@osmora.org>2025-09-21 16:53:24 -0400
commite6e0bb0d435b3410d520baea60652af05cae8232 (patch)
treebd36cc276a02bf951e6663fb3c8b403ef7e1b5df /src/sys/io/ic
parentd88c40fc062f28c63ae7bc3836407df3470287a3 (diff)
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 <ian@osmora.org>
Diffstat (limited to 'src/sys/io/ic')
-rw-r--r--src/sys/io/ic/ahci.c7
1 files changed, 7 insertions, 0 deletions
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