Subject: Re:-pmap initlialization
To: None <>
From: Toru Nishimura <>
List: port-arm
Date: 01/08/2005 22:54:21
Kamal R. Prasad said;

>> At this memoment, PC
>> (program counter) may point to physical address
>> (0xa000-0000) or
>> MMU enabled virtual address (0xc000-0000).  Let's
>> assume the latter.
> I actually used the physical address 0xa0200000. 

Make sure to follow the instructions described below.

1. Turn off MMU first jumping carefully to continue CPU using
the next valid paddr (very beginning of 0xa020-xxxx).
2. Modifiy L1 table left by Re* to match NetBSD address space.
The most crital part is SDRAM paddr -> vaddr 0xC000-0000, and
the vaddr where LED or UART registers are populated somewhere
beyond kernend.  They are constant, so there is no good reason in
iniarm() to pretend playing smart bus_space dance.
3. Turn on MMU and jump again to next vaddr.  Re* L1 table is now
replaced with NetBSD kernel space.
4. At the bottom of xxx_machdep.S jumps to vaddr of kernel_start:.
5. initarm() takes controls shortly.  Let's it prepare pmap foundation
as it wants.  Again, there is no need to play smart bus_space dance since
L1 table was made correct.  (Isn't it a SoC, anyway!?)
6. Make MMU re-enabled the newly built L1 table at 0xa01f-c000.  CPU
does continue to go without awaring of the fact.  Your error is mostly
likely here.

Toru Nishimura/ALKYL Technology, we port NetBSD for your new NW.