summaryrefslogtreecommitdiff
path: root/sys/dev/ic
diff options
context:
space:
mode:
authorPatrick Wildt <patrick@cvs.openbsd.org>2021-02-24 10:13:09 +0000
committerPatrick Wildt <patrick@cvs.openbsd.org>2021-02-24 10:13:09 +0000
commit3164145cd925de2cef1e65d696fe5dc1e17a68e1 (patch)
tree948c6f8927a8956f17e90d4d7fb6985ce6970e33 /sys/dev/ic
parent69a55172b3e2b78c42a0ec00401498706cde22e3 (diff)
Enumerate GCI core, which seems to contain the OTP on the Apple M1.
Diffstat (limited to 'sys/dev/ic')
-rw-r--r--sys/dev/ic/bwfm.c8
-rw-r--r--sys/dev/ic/bwfmreg.h3
2 files changed, 7 insertions, 4 deletions
diff --git a/sys/dev/ic/bwfm.c b/sys/dev/ic/bwfm.c
index 1783a57bd36..6c480f0178c 100644
--- a/sys/dev/ic/bwfm.c
+++ b/sys/dev/ic/bwfm.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: bwfm.c,v 1.80 2021/01/31 11:07:51 patrick Exp $ */
+/* $OpenBSD: bwfm.c,v 1.81 2021/02/24 10:13:08 patrick Exp $ */
/*
* Copyright (c) 2010-2016 Broadcom Corporation
* Copyright (c) 2016,2017 Patrick Wildt <patrick@blueri.se>
@@ -1078,7 +1078,8 @@ bwfm_chip_dmp_erom_scan(struct bwfm_softc *sc)
rev = (val & BWFM_DMP_COMP_REVISION)
>> BWFM_DMP_COMP_REVISION_S;
- if (nmw + nsw == 0 && id != BWFM_AGENT_CORE_PMU)
+ if (nmw + nsw == 0 && id != BWFM_AGENT_CORE_PMU &&
+ id != BWFM_AGENT_CORE_GCI)
continue;
if (bwfm_chip_dmp_get_regaddr(sc, &erom, &base, &wrap))
@@ -1142,7 +1143,8 @@ bwfm_chip_dmp_get_regaddr(struct bwfm_softc *sc, uint32_t *erom,
else
*erom += 4;
}
- if (sztype != BWFM_DMP_SLAVE_SIZE_4K)
+ if (sztype != BWFM_DMP_SLAVE_SIZE_4K &&
+ sztype != BWFM_DMP_SLAVE_SIZE_8K)
continue;
stype = (val & BWFM_DMP_SLAVE_TYPE) >> BWFM_DMP_SLAVE_TYPE_S;
diff --git a/sys/dev/ic/bwfmreg.h b/sys/dev/ic/bwfmreg.h
index 04fcd752b93..ff0ffc12452 100644
--- a/sys/dev/ic/bwfmreg.h
+++ b/sys/dev/ic/bwfmreg.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: bwfmreg.h,v 1.19 2020/05/15 14:09:14 patrick Exp $ */
+/* $OpenBSD: bwfmreg.h,v 1.20 2021/02/24 10:13:08 patrick Exp $ */
/*
* Copyright (c) 2010-2016 Broadcom Corporation
* Copyright (c) 2016,2017 Patrick Wildt <patrick@blueri.se>
@@ -69,6 +69,7 @@
#define BWFM_AGENT_CORE_ARM_CM3 0x82A
#define BWFM_AGENT_CORE_PCIE2 0x83C
#define BWFM_AGENT_CORE_ARM_CR4 0x83E
+#define BWFM_AGENT_CORE_GCI 0x840
#define BWFM_AGENT_CORE_ARM_CA7 0x847
#define BWFM_AGENT_SYS_MEM 0x849