Subject: Re: need advice regarding Au 1550 (MIPS) memory mapping
To: None <garrett_damore@tadpole.com>
From: M. Warner Losh <imp@bsdimp.com>
List: port-mips
Date: 09/30/2005 10:26:36
In message: <433CB6D4.1050406@tadpole.com>
            "Garrett D'Amore" <garrett_damore@tadpole.com> writes:
: The manual is also pretty clear in stating that the only way to get at 
: this area of address space is thru the TLB, using a 32-bit virtual 
: address to map to a 36-bit physical address.

The Deskstation Tyne had similar contraints.  Its ISA bus was located
at 0x0900000000LL, for example.  sys/arch/arc/arc/wired_map.c has some
sample code.  Look at arc_enter_wired() there.  Then, in
arc/arc/p_dti_tyne.c you can find something like the following to map
this stuff in:

	/*
	 * Initialize wired TLB for I/O space which is used on early stage
	 */
	arc_enter_wired(TYNE_V_BOUNCE, TYNE_P_BOUNCE, 0, MIPS3_PG_SIZE_256K);
	arc_enter_wired(TYNE_V_ISA_IO, TYNE_P_ISA_IO, 0, MIPS3_PG_SIZE_1M);
	arc_enter_wired(TYNE_V_ISA_MEM, TYNE_P_ISA_MEM, 0, MIPS3_PG_SIZE_1M);
	arc_enter_wired(0xe3000000, 0xfff00000, 0, MIPS3_PG_SIZE_4K);


TYNE_V_BOUNCE, etc were arbitrarily assigned to high addresses in the
virtual space.

You'll likely need to do something similar for your board.  Other
posters are right that you may also need to do some bus space hackery
as well.  I've not done that myself, so I'll leave it to others to
comment upon.

Warner