Francois-Rene Rideau
Sun May 2 18:48:05 CEST 2004

On Sun, May 02, 2004 at 06:03:25PM +0200, Oleg Gusev wrote:
> It's about the reserved memory.
What about it?

> If it is 
> //galmasi way 
> then the kernel works.
> If it is 
> //fare way
> the kernel works.

> If i put 0x100000 instead of 0x200000, the kernel can't boot.
Where would you put that?
Have you also changed the j820 TEXTADDR in arch/arm/Makefile?
The galmasi way makes all memory from 0xc000000 to there unused by linux.
The fare way makes just the page @ 0xc005c000 unused;
but if you disable the USB soon enough,
even this shouldn't be needed, should it?

> Can you write a README, where and what is loaded and
> executed and in what sequence ? IMHO we should make
> this more transparent.

As far as I understand, the boot sequence is as follows:
(1) hpcboot maps everything to where is specified in
 that is, at 8MiB in RAM bank 0
(2) the code in arch/arm/boot/j820/init.S does some initialization
 and chains into arch/arm/boot/j820/compressed/head.S
 which does more initializations, decompressed the kernel into
 the location in arch/arm/Makefile ZRELADDR=0xc0208000
 (with the constraint that ZRELADDR==virt_to_phys(TEXTADDR),
 with trivial mapping in our case)
 (2MiB+128KiB into RAM bank 0 -- notice the required 128KiB alignment)
 Also in arch/arm/boot/Makefile are other parameters:
 ZRELADDR=0xc0208000 where the uncompressor uncompresses the image
 ZTEXTADDR=0xc0800000 where the uncompressor relocates itself
 ZBSSADDR=0xc0600000 where the uncompressor puts temporary stuff
 PARAMS_PHYS=0xc0200100 where the bootloader stores kernel parameter
			(in our case, it's actually j820/init.S that does)
 INITRD_PHYS=0xc0A00000 physical address where to relocate initrd
 INITRD_VIRT=0xc0A00000 virtual address where relocated initrd is seen
(3) the main arch-specific kernel is initialized from
 as now available on TEXTADDR (or actually ZRELADDR until vm is setup).
 somewhere around there, j820 fixup is called,
 some basic kernel parameters are parsed,
 the virtual memory is setup (including our 5c080 trick if any),
 the I/O subsystem is setup,
 j820 initialization is called,
 and a whole slew of low-level initializations are done.
(4) the main arch-undep kernel is initialized from
 which mounts the initrd, rootfs, runs init, etc.

[ François-René ÐVB Rideau | Reflection&Cybernethics | ]
[  TUNES project for a Free Reflective Computing System  |  ]
Having good original ideas is no excuse for not knowing good established ideas.
Your supra-fast turbo engine won't be much good when attached to square wheels.

More information about the Jornada820 mailing list