summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormsmith <msmith@FreeBSD.org>1998-09-23 21:23:51 +0000
committermsmith <msmith@FreeBSD.org>1998-09-23 21:23:51 +0000
commit6140797f7fb56c38bca78ae9c99135890b7ecbf3 (patch)
tree1ab6eab1f983b78cefe123b36bdfbc88577d6a5d
parent8207edf60d9cbc34ddcb2ebb2bfc9f776b7022f2 (diff)
downloadFreeBSD-src-6140797f7fb56c38bca78ae9c99135890b7ecbf3.zip
FreeBSD-src-6140797f7fb56c38bca78ae9c99135890b7ecbf3.tar.gz
Fix type 0 configuration accesses, and use a virtual rather than physical
address for the LCA PCI configuration register address. FreeBSD/Alpha now boots on the NoName (aka AXPpci 33, Alpha PC), and probably also on the Multia (mine hasn't arrived yet, so I can't tell for sure). Submitted by: Doug Rabson <dfr@freebsd.org>
-rw-r--r--sys/alpha/pci/lca.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/sys/alpha/pci/lca.c b/sys/alpha/pci/lca.c
index 739d3f0..75b5ffc 100644
--- a/sys/alpha/pci/lca.c
+++ b/sys/alpha/pci/lca.c
@@ -23,7 +23,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $Id$
+ * $Id: lca.c,v 1.1 1998/08/10 07:53:59 dfr Exp $
*/
#include <sys/param.h>
@@ -219,7 +219,8 @@ lca_maxdevs(u_int b)
}
#define LCA_CFGOFF(b, s, f, r) \
- (((b) << 16) | ((s) << 11) | ((f) << 8) | (r))
+ ((b) ? (((b) << 16) | ((s) << 11) | ((f) << 8) | (r)) \
+ : ((1 << ((s) + 11)) | ((f) << 8) | (r)))
#define LCA_TYPE1_SETUP(b,s) if ((b)) { \
do { \
@@ -243,7 +244,7 @@ lca_maxdevs(u_int b)
type val = ~0; \
int ipl = 0; \
vm_offset_t off = LCA_CFGOFF(b, s, f, r); \
- vm_offset_t kv = SPARSE_##width##_ADDRESS(LCA_PCI_CONF, off); \
+ vm_offset_t kv = SPARSE_##width##_ADDRESS(KV(LCA_PCI_CONF), off); \
alpha_mb(); \
LCA_TYPE1_SETUP(b,ipl); \
if (!badaddr((caddr_t)kv, sizeof(type))) { \
@@ -255,7 +256,7 @@ lca_maxdevs(u_int b)
#define CFGWRITE(b, s, f, r, data, width, type) \
int ipl = 0; \
vm_offset_t off = LCA_CFGOFF(b, s, f, r); \
- vm_offset_t kv = SPARSE_##width##_ADDRESS(LCA_PCI_CONF, off); \
+ vm_offset_t kv = SPARSE_##width##_ADDRESS(KV(LCA_PCI_CONF), off); \
alpha_mb(); \
LCA_TYPE1_SETUP(b,ipl); \
if (!badaddr((caddr_t)kv, sizeof(type))) { \
OpenPOWER on IntegriCloud