Set a proper address for PCI memspace to make bus_space_mmap(9) work correctly.

Reported and confirmed with radeonfb(4) by Naruaki Etomi in PR port-48431.
This commit is contained in:
tsutsui 2014-01-19 03:44:13 +00:00
parent 2141bdc7f5
commit 183c2ca81d

View File

@ -1,4 +1,4 @@
/* $NetBSD: tsp_bus_mem.c,v 1.12 2012/02/06 02:14:15 matt Exp $ */
/* $NetBSD: tsp_bus_mem.c,v 1.13 2014/01/19 03:44:13 tsutsui Exp $ */
/*-
* Copyright (c) 1999 by Ross Harvey. All rights reserved.
@ -32,7 +32,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: tsp_bus_mem.c,v 1.12 2012/02/06 02:14:15 matt Exp $");
__KERNEL_RCSID(0, "$NetBSD: tsp_bus_mem.c,v 1.13 2014/01/19 03:44:13 tsutsui Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@ -57,7 +57,8 @@ __KERNEL_RCSID(0, "$NetBSD: tsp_bus_mem.c,v 1.12 2012/02/06 02:14:15 matt Exp $"
#define CHIP_MEM_EX_STORE_SIZE(v) \
(sizeof (((struct tsp_config *)(v))->pc_mem_exstorage))
#define CHIP_MEM_SYS_START(v) (((struct tsp_config *)(v))->pc_iobase)
#define CHIP_MEM_SYS_START(v) \
(((struct tsp_config *)(v))->pc_iobase | P_PCI_MEM)
/*
* Tsunami core logic appears on EV6. We require at least EV56