make PHYS_OFFSET determined at run time (unfinished)

Uwe Kleine-König u.kleine-koenig at pengutronix.de
Fri Jan 22 06:58:31 EST 2010


Hello,

just a short status report:  The code seems to work OK if PHYS_OFFSET is
determined correctly.

The problem is when it does not.  Currently I place arch/arm/boot/Image
at 0xa1008000[1] with PHYS_OFFSET being 0xa0000000.  Then
arch/arm/boot/head.S guesses PHYS_OFFSET to be 0xa1000000 resulting
__va(bank->start) of my only bank to be 0xbf000000.  And so this bank is
discarded by sanity_check_meminfo as 0xbf000000 overlaps the vmalloc
region.

So how to proceed?  These possiblities come to (my) mind:

 - parse the atag list to better guess phys_offset
   (both zImage and Image would need to do that)
 - require that zImage and Image are placed such that the guess is done
   right (which is stupid for zImage as then the decompressor needs to
   move the decompressed image)
 - require the bootloader to pass phys_offset (r3?)
 - make the ram mapping non-linear
 - don't discard the whole bank, only the addresses overlaping the
   vmalloc region

Anything else?  Preferences?  Thoughts?

Best regards
Uwe

[1] I think the same happens with zImage placed at 0xa1008000

-- 
Pengutronix e.K.                              | Uwe Kleine-König            |
Industrial Linux Solutions                    | http://www.pengutronix.de/  |



More information about the linux-arm-kernel mailing list