summaryrefslogtreecommitdiff
path: root/src/sys
diff options
context:
space:
mode:
Diffstat (limited to 'src/sys')
-rw-r--r--src/sys/include/io/ic/ahciregs.h1
-rw-r--r--src/sys/io/ic/ahci.c7
2 files changed, 8 insertions, 0 deletions
diff --git a/src/sys/include/io/ic/ahciregs.h b/src/sys/include/io/ic/ahciregs.h
index cb212ea..a62df04 100644
--- a/src/sys/include/io/ic/ahciregs.h
+++ b/src/sys/include/io/ic/ahciregs.h
@@ -134,6 +134,7 @@ struct hba_memspace {
#define AHCI_CAP_EMS(CAP) ((CAP >> 6) & 1) /* Enclosure management support */
#define AHCI_CAP_SAL(CAP) ((CAP >> 25) & 1) /* Supports activity LED */
#define AHCI_CAP_SSS(CAP) ((CAP >> 27) & 1) /* Supports staggered spin up */
+#define AHCI_CAP_S64A(CAP) ((CAP >> 31) & 1) /* Supports 64-bit addressing */
/*
* Device detection (DET) and Interface power
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