building bootstrap

Adam Lackorzynski adam at
Tue Dec 23 17:52:16 CET 2008


On Tue Dec 23, 2008 at 15:51:07 +0800, Tsai, Tung-Chieh wrote:
> I still have another question.  I set the address of kernel in
> mem_layout-xxx.cpp, it successfully get into kernel ( get
> into __main(),  stop in some place I still not checking ), but
> I fill confuse on virtual memory setting.
> On my platform, ram is start at 0x3000,0000, so I set :
>   * RAM_BASE=0x3000,0000


>   * DEFAULT_RELOC_arm=0x0

No, do not change the DEFAULT_RELOC_arm values. Those are offsets,
relative to RAM_BASE! I.e. the real link-address is

>   * MOD_ADDR use default value in modules.list, i.e.,
>   0x0200,0000

That is ok.

>   * Mem_layout::platform_phys_base=0x3000,0000
>   * Mem_layout::Sdram_phys_base =0x3020,0000

Sdram_phys_base is 0x30000000 for you, i.e. it's the start of the RAM in
the physical address space. What is platform_phys_base?

> So fiasco kernel start at 0x3020,0000, sigma0 and roottask
> are under 0x3020,000, which are 0x3006,8000 and
> 0x3007,8000,  respectively.

No, the kernel starts at 0x1000 relative to RAM, i.e. 0x30001000.

> But how does kernel know  the area from 0x3010,0000 to
> 0x3020,0000 ?  I see map_1mb in map_hw will map this
> area( from Mem_layout::platform_map_base to
> Mem_layout::platform_phys_base ), but this only mapping
>  1mb,  where is 0x3010,0000 to 0x3020,0000 setting ?
> Or I'm missing some setting ? And I fill strange in
> Mem_layout::Sdram_phys_base to 0x3020,0000, since
> physical ram is started at 0x3000,0000, is this setting
> really  correct or I misunderstand its meaning ?

Sdram_phys_base must be 0x3000,0000 as this is the location where memory
starts. For a new platform you actually only need to set Sdram_phys_base
and CONFIG_KERNEL_LOAD_ADDR to the same value (for the kernel). For
user-land you need to adapt RAM_BASE and RAM_SIZE_MB, all other values
stay the same as they're relative to RAM_BASE.

Adam                 adam at

More information about the l4-hackers mailing list