summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarco S Hyman <marc@cvs.openbsd.org>2004-05-10 20:12:50 +0000
committerMarco S Hyman <marc@cvs.openbsd.org>2004-05-10 20:12:50 +0000
commit3116cb2c252e2e5b7bec13967d4dd24bc94b7c2a (patch)
tree1ee43b00c247479a94ef5663133f89e872161fe8
parentd8673e05cc6bf28c802101fd765950433175cd5e (diff)
ugly hackery for auich support on amd64.
Will not work on machine with > 4G phys memory. OK deraadt@
-rw-r--r--sys/dev/pci/auich.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/sys/dev/pci/auich.c b/sys/dev/pci/auich.c
index 7d4b1f82016..41825e95308 100644
--- a/sys/dev/pci/auich.c
+++ b/sys/dev/pci/auich.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: auich.c,v 1.38 2004/04/09 07:24:15 miod Exp $ */
+/* $OpenBSD: auich.c,v 1.39 2004/05/10 20:12:49 marc Exp $ */
/*
* Copyright (c) 2000,2001 Michael Shalayeff
@@ -53,6 +53,15 @@
#include <dev/ic/ac97.h>
+/*
+ * XXX > 4GB kaboom: define kvtop as a truncated vtophys. Will not
+ * do the right thing on machines with more than 4 gig of ram.
+ */
+#if defined(__amd64__)
+#include <uvm/uvm_extern.h> /* for vtophys */
+#define kvtop(va) (int)vtophys((vaddr_t)(va))
+#endif
+
/* 12.1.10 NAMBAR - native audio mixer base address register */
#define AUICH_NAMBAR 0x10
/* 12.1.11 NABMBAR - native audio bus mastering base address register */