Subject: Re: how to determine loader address when porting NetBSD using u-boot
To: Toru Nishimura <locore64@alkyltechnology.com>
From: David Laight <david@l8s.co.uk>
List: port-arm
Date: 04/07/2006 07:27:00
On Fri, Apr 07, 2006 at 10:25:29AM +0900, Toru Nishimura wrote:
> 
> You need to grasp ARM address space layout.  I ring a bell loudly.
> It's very common mishap to trap badly the ARM new comers.
> Do careful research kernel code path from entry point to the last line
> of initarm().
> 
> - ARM needs to start paddr 0 instruction.
> - but these days right after power on NOR is commonly mapped there
> to allow XIP.  It's handy but...
> - SDRAM is located high; sometimes 0x8000'0000, 0xA000'0000 or
> 0xC000'0000, very strange arrangement.
> - Most of ARM NetBSD kernel is located vaddr 0xC000'0000.

Not as bad as booting a certain OS which needs all its DRAM contiguous
at address zero.  One trick there is to link the ROM code for one
of its aliased addresses (eg 64MB) and start with an absolute jump
to that address.  The MMU can then be enabled with the ROM mapped
physical==virtual and the SDRAM at zero - saves a lot of faffing
about with all the different page tabes that the 'dance of death' needs.

	David

-- 
David Laight: david@l8s.co.uk