[PATCH 4/5] [ARM] Auto calculate ZRELADDR and provide option for exceptions

Eric Miao eric.y.miao at gmail.com
Fri Sep 3 09:33:09 EDT 2010


2010/9/3 Uwe Kleine-König <u.kleine-koenig at pengutronix.de>:
> Hello,
>
> On Thu, Sep 02, 2010 at 10:27:23PM +0100, Russell King - ARM Linux wrote:
>> On Thu, Sep 02, 2010 at 10:21:45PM +0100, Russell King - ARM Linux wrote:
>> > On Thu, Jun 03, 2010 at 03:36:52PM +0800, Eric Miao wrote:
>> > > From: Eric Miao <eric.y.miao at gmail.com>
>> > >
>> > > Original idea and prototype came from Nicolas Pitre.
>> > >
>> > > As long as the zImage is placed within the 256MB range from the
>> > > start of the memory, ZRELADDR (Address where the decompressed
>> > > kernel will be placed, usually  == PHYS_OFFSET + TEXT_OFFSET)
>> > > can be determined at run-time by masking PC with 0xf000_0000.
>> > >
>> > > Running through all the Makefile.boot, all those zreladdr-y
>> > > address == 0x[0-f]000_0000 + TEXT_OFFSET can be determined at
>> > > run-time.
>> > >
>> > > Option CONFIG_AUTO_ZRELADDR and CONFIG_ZRELADDR are introduced,
>> > > CONFIG_ZRELADDR _must_ be explicitly specified if:
>> > >
>> > >  - ((zreladdr-y - TEXT_OFFSET) & ~0xf0000000) != 0, which means
>> > >    a maksing of PC with 0xf000_0000 will result an incorrect
>> > >    address.
>> > >
>> > >  - or the assumption of the zImage being loaded by the boot
>> > >    loader within 256MB from the start address is simply
>> > >    incorrect
>> > >
>> > >  - or when ZBOOT_ROM is used, where the above assumption is
>> > >    normally wrong
>> > >
>> > > List of all Makefile.boot:
>> >
>> > Not so.  What happened to H720x platforms, which are now broken?
>> > Any chance of fixing the regression that this introduced?
>> >
>> > http://armlinux.simtec.co.uk/kautobuild/2.6.36-rc3/h7202_defconfig/zimage.log
>>
>> And while we're here, why hasn't anyone removed the zreladdr
>> definitions in Makefile.boot yet?  Or do we still need them and
>> we now have the same information defined in two different places?
>>
>> This all looks like a half-done job at the moment.  Please clean it up.
> The original series removed all the 'Makefile.boot's IIRC.  Currently
> the params_phys-y value is needed though.  So should I send a patch that
> just removes the zreladdr values?
>

That sounds like a plan. And for those platforms which requires only
zreladdr-y, the whole Makefile.boot can just be removed. e.g.
mach-pxa and mach-mmp.

> Eric, what are your plans regarding the runtime-physoffset stuff?  (I
> currently have none.)
>
> Best regards
> Uwe
>
> --
> Pengutronix e.K.                           | Uwe Kleine-König            |
> Industrial Linux Solutions                 | http://www.pengutronix.de/  |
>



More information about the linux-arm-kernel mailing list