diff options
author | 2004-05-10 20:12:49 +0000 | |
---|---|---|
committer | 2004-05-10 20:12:49 +0000 | |
commit | 20d1cae9af73f50244048039645b894fbf9ef862 (patch) | |
tree | 1a81ad6f487021d6fc2fd9d5f867dfd1bef9f0ca | |
parent | unbreak chsh, ok millert (diff) | |
download | wireguard-openbsd-20d1cae9af73f50244048039645b894fbf9ef862.tar.xz wireguard-openbsd-20d1cae9af73f50244048039645b894fbf9ef862.zip |
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.c | 11 |
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 */ |