aboutsummaryrefslogtreecommitdiff
path: root/sys/dev/cardbus/cardbus_cis.c
diff options
context:
space:
mode:
authorWarner Losh <imp@FreeBSD.org>2004-04-11 19:22:25 +0000
committerWarner Losh <imp@FreeBSD.org>2004-04-11 19:22:25 +0000
commita7c43559c1747f3d10a2841562f507ef196eb466 (patch)
tree910eff77246ed57c9c614d919552172520785554 /sys/dev/cardbus/cardbus_cis.c
parent1e73ec7d534421f877136c75b1717667d5f04b6c (diff)
downloadsrc-a7c43559c1747f3d10a2841562f507ef196eb466.tar.gz
src-a7c43559c1747f3d10a2841562f507ef196eb466.zip
Add note about why we're ignoring the below 1MB bit.
Notes
Notes: svn path=/head/; revision=128131
Diffstat (limited to 'sys/dev/cardbus/cardbus_cis.c')
-rw-r--r--sys/dev/cardbus/cardbus_cis.c19
1 files changed, 19 insertions, 0 deletions
diff --git a/sys/dev/cardbus/cardbus_cis.c b/sys/dev/cardbus/cardbus_cis.c
index 410543230330..e17b935aed2d 100644
--- a/sys/dev/cardbus/cardbus_cis.c
+++ b/sys/dev/cardbus/cardbus_cis.c
@@ -374,6 +374,25 @@ decode_tuple_bar(device_t cbdev, device_t child, int id,
if (reg & TPL_BAR_REG_PREFETCHABLE)
dinfo->mprefetchable |= BARBIT(bar);
#if 0
+ /*
+ * XXX: It appears from a careful reading of the spec
+ * that we're not supposed to honor this when the bridge
+ * is not on the main system bus. PCI spec doesn't appear
+ * to allow for memory ranges not listed in the bridge's
+ * decode range to be decoded. The PC Card spec seems to
+ * indicate that this should only be done on x86 based
+ * machines, which seems to imply that on non-x86 machines
+ * the adddresses can be anywhere. This further implies that
+ * since the hardware can do it on non-x86 machines, it should
+ * be able to do it on x86 machines. Therefore, we can and
+ * should ignore this hint. Furthermore, the PC Card spec
+ * recommends always allocating memory above 1MB, contradicting
+ * the other part of the PC Card spec.
+ *
+ * NetBSD ignores this bit, but it also ignores the
+ * prefetchable bit too, so that's not an indication of
+ * correctness.
+ */
if (reg & TPL_BAR_REG_BELOW1MB)
dinfo->mbelow1mb |= BARBIT(bar);
#endif