Subject: bus_space.h
To: NetBSD tech-kern <tech-kern@netbsd.org>
From: Anand Lalgondar <solarflares@fastmail.fm>
List: tech-kern
Date: 02/02/2004 14:07:13
Hello,

What is the significance of the following structure:

struct mips_bus_space_translation {
	bus_addr_t	mbst_bus_start;	/* start of bus window */
	bus_addr_t	mbst_bus_end;	/* end of bus window */
	paddr_t		mbst_sys_start;	/* start of sysBus window */
	paddr_t		mbst_sys_end;	/* end of sysBus window */
	int		mbst_align_stride;/* alignment stride */
	int		mbst_flags;	/* flags; see below */
};



I have gone through a file 'sys/arch/evbmips/rbtx4927/xxx.c' that
contains the following code:
----------------------------------------------------------------------------------------------
/*
 * Platform-specific local bus memory support for the Toshiba RBTX4927.
 */

#include <sys/param.h>

#include <machine/bus.h>
#include <evbmips/rbtx4927/rbtx4927var.h>

#define CHIP            rbtx4927_loc
#define CHIP_MEM        /* defined */

/* IO region 1 */
#define CHIP_W1_BUS_START(v)    0x00000000UL
#define CHIP_W1_BUS_END(v)      0xffffffffUL
#define CHIP_W1_SYS_START(v)    0
#define CHIP_W1_SYS_END(v)      CHIP_W1_BUS_END(v)

#include <mips/mips/bus_space_alignstride_chipdep.c>
----------------------------------------------------------------------------------------------

How is CHIP_W1_BUS different from CHIP_W1_SYS? Both are pointing to same
address! Is it something like physical and virtual address if so which
one contains physical and which virtual, OR is it something else.

If someone could provided information with small example that would be
great.

Thanks anyways.

 - Anand

-- 
http://www.fastmail.fm - I mean, what is it about a decent email service?