Do the previously slightly differently, to avoid confusing the internal

space extent maps.  Pointed out by msaitoh@netbsd.org.  (Someone should
send me an EV6 machine!)
This commit is contained in:
thorpej 2000-06-26 18:19:26 +00:00
parent 0eac4bfcc7
commit cc9dfe871b
4 changed files with 28 additions and 24 deletions

View File

@ -1,4 +1,4 @@
/* $NetBSD: irongate.c,v 1.1 2000/06/01 20:30:30 thorpej Exp $ */
/* $NetBSD: irongate.c,v 1.2 2000/06/26 18:19:26 thorpej Exp $ */
/*-
* Copyright (c) 2000 The NetBSD Foundation, Inc.
@ -40,7 +40,7 @@
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: irongate.c,v 1.1 2000/06/01 20:30:30 thorpej Exp $");
__KERNEL_RCSID(0, "$NetBSD: irongate.c,v 1.2 2000/06/26 18:19:26 thorpej Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@ -198,6 +198,7 @@ irongate_bus_get_window(int type, int window,
{
struct irongate_config *icp = &irongate_configuration;
bus_space_tag_t st;
int error;
switch (type) {
case ALPHA_BUS_TYPE_PCI_IO:
@ -212,5 +213,12 @@ irongate_bus_get_window(int type, int window,
panic("irongate_bus_get_window");
}
return (alpha_bus_space_get_window(st, window, abst));
error = alpha_bus_space_get_window(st, window, abst);
if (error)
return (error);
abst->abst_sys_start = IRONGATE_PHYSADDR(abst->abst_sys_start);
abst->abst_sys_end = IRONGATE_PHYSADDR(abst->abst_sys_end);
return (0);
}

View File

@ -1,4 +1,4 @@
/* $NetBSD: pci_bwx_bus_io_chipdep.c,v 1.10 2000/06/26 02:42:10 thorpej Exp $ */
/* $NetBSD: pci_bwx_bus_io_chipdep.c,v 1.11 2000/06/26 18:19:26 thorpej Exp $ */
/*-
* Copyright (c) 1997, 1998, 2000 The NetBSD Foundation, Inc.
@ -213,10 +213,6 @@ static long
#define CHIP_IO_EX_STORE_SIZE(v) (sizeof __C(CHIP, _io_ex_storage))
#endif
#ifndef CHIP_PHYSADDR
#define CHIP_PHYSADDR(x) (x)
#endif
void
__C(CHIP,_bus_io_init)(t, v)
bus_space_tag_t t;
@ -340,10 +336,8 @@ __C(CHIP,_io_get_window)(v, window, abst)
case 0:
abst->abst_bus_start = 0;
abst->abst_bus_end = 0xffffffffUL;
abst->abst_sys_start =
CHIP_PHYSADDR(CHIP_IO_SYS_START(v));
abst->abst_sys_end =
CHIP_PHYSADDR(CHIP_IO_SYS_START(v) + abst->abst_bus_end);
abst->abst_sys_start = CHIP_IO_SYS_START(v);
abst->abst_sys_end = CHIP_IO_SYS_START(v) + abst->abst_bus_end;
abst->abst_addr_shift = 0;
abst->abst_size_shift = 0;
abst->abst_flags = ABST_DENSE|ABST_BWX;

View File

@ -1,4 +1,4 @@
/* $NetBSD: pci_bwx_bus_mem_chipdep.c,v 1.11 2000/06/26 02:42:10 thorpej Exp $ */
/* $NetBSD: pci_bwx_bus_mem_chipdep.c,v 1.12 2000/06/26 18:19:26 thorpej Exp $ */
/*-
* Copyright (c) 1997, 1998, 2000 The NetBSD Foundation, Inc.
@ -213,10 +213,6 @@ static long
#define CHIP_MEM_EX_STORE_SIZE(v) (sizeof __C(CHIP,_mem_ex_storage))
#endif
#ifndef CHIP_PHYSADDR
#define CHIP_PHYSADDR(x) (x)
#endif
void
__C(CHIP,_bus_mem_init)(t, v)
bus_space_tag_t t;
@ -334,10 +330,8 @@ __C(CHIP,_mem_get_window)(v, window, abst)
case 0:
abst->abst_bus_start = 0;
abst->abst_bus_end = 0xffffffffUL;
abst->abst_sys_start =
CHIP_PHYSADDR(CHIP_MEM_SYS_START(v));
abst->abst_sys_end =
CHIP_PHYSADDR(CHIP_MEM_SYS_START(v) + abst->abst_bus_end);
abst->abst_sys_start = CHIP_MEM_SYS_START(v);
abst->abst_sys_end = CHIP_MEM_SYS_START(v) + abst->abst_bus_end;
abst->abst_addr_shift = 0;
abst->abst_size_shift = 0;
abst->abst_flags = ABST_DENSE|ABST_BWX;

View File

@ -1,4 +1,4 @@
/* $NetBSD: tsc.c,v 1.3 2000/06/25 19:17:40 thorpej Exp $ */
/* $NetBSD: tsc.c,v 1.4 2000/06/26 18:19:27 thorpej Exp $ */
/*-
* Copyright (c) 1999 by Ross Harvey. All rights reserved.
@ -35,7 +35,7 @@
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: tsc.c,v 1.3 2000/06/25 19:17:40 thorpej Exp $");
__KERNEL_RCSID(0, "$NetBSD: tsc.c,v 1.4 2000/06/26 18:19:27 thorpej Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@ -241,6 +241,7 @@ tsp_bus_get_window(type, window, abst)
{
struct tsp_config *tsp = &tsp_configuration[tsp_console_hose];
bus_space_tag_t st;
int error;
switch (type) {
case ALPHA_BUS_TYPE_PCI_IO:
@ -255,5 +256,12 @@ tsp_bus_get_window(type, window, abst)
panic("tsp_bus_get_window");
}
return (alpha_bus_space_get_window(st, window, abst));
error = alpha_bus_space_get_window(st, window, abst);
if (error)
return (error);
abst->abst_sys_start = TS_PHYSADDR(abst->abst_sys_start);
abst->abst_sys_end = TS_PHYSADDR(abst->abst_sys_end);
return (0);
}