Account for the top-most 4 bits of obio addresses being zero on sun 4/100
machines, when inferring zs PROM device numbers from the physical address.
This commit is contained in:
parent
76afe54fae
commit
9d61e4d9a6
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: zs.c,v 1.80 2000/07/09 20:57:48 pk Exp $ */
|
||||
/* $NetBSD: zs.c,v 1.81 2000/10/18 23:55:11 pk Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1996 The NetBSD Foundation, Inc.
|
||||
|
@ -337,6 +337,13 @@ zs_attach_obio(parent, self, aux)
|
|||
zsc->zsc_bustag = oba->oba_bustag;
|
||||
zsc->zsc_dmatag = oba->oba_dmatag;
|
||||
/* Find prom unit by physical address */
|
||||
if (cpuinfo.cpu_type == CPUTYP_4_100)
|
||||
/*
|
||||
* On the sun4/100, the top-most 4 bits are zero
|
||||
* on obio addresses; force them to 1's for the
|
||||
* sake of the comparison here.
|
||||
*/
|
||||
paddr |= 0xf0000000;
|
||||
zsc->zsc_promunit =
|
||||
(paddr == 0xf1000000) ? 0 :
|
||||
(paddr == 0xf0000000) ? 1 :
|
||||
|
|
Loading…
Reference in New Issue