diff --git a/sys/arch/alpha/pci/irongate.c b/sys/arch/alpha/pci/irongate.c index 7e65be244540..9a442e31c6f0 100644 --- a/sys/arch/alpha/pci/irongate.c +++ b/sys/arch/alpha/pci/irongate.c @@ -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 -__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 #include @@ -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); } diff --git a/sys/arch/alpha/pci/pci_bwx_bus_io_chipdep.c b/sys/arch/alpha/pci/pci_bwx_bus_io_chipdep.c index 238b9eb4b708..99dcc6addd38 100644 --- a/sys/arch/alpha/pci/pci_bwx_bus_io_chipdep.c +++ b/sys/arch/alpha/pci/pci_bwx_bus_io_chipdep.c @@ -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; diff --git a/sys/arch/alpha/pci/pci_bwx_bus_mem_chipdep.c b/sys/arch/alpha/pci/pci_bwx_bus_mem_chipdep.c index 0853a6ffe23a..8932801a1ffc 100644 --- a/sys/arch/alpha/pci/pci_bwx_bus_mem_chipdep.c +++ b/sys/arch/alpha/pci/pci_bwx_bus_mem_chipdep.c @@ -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; diff --git a/sys/arch/alpha/pci/tsc.c b/sys/arch/alpha/pci/tsc.c index f06e4948cc08..10b607fb25ce 100644 --- a/sys/arch/alpha/pci/tsc.c +++ b/sys/arch/alpha/pci/tsc.c @@ -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 -__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 #include @@ -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); }