[PATCH] Move the flash size probe into bankValidate() - averts potential fatal exception

Gedare Bloom gedare at rtems.org
Wed Feb 12 15:15:05 UTC 2014


Can someone with powerpc / flash knowledge please review these patches
and suggest the proper course of action?

On Wed, Jan 29, 2014 at 9:15 PM, Nick Withers <nick.withers at anu.edu.au> wrote:
> Hi all,
>
> The attached patch "flash_probe.patch" moves the invocation of a flash
> device size probe[1] in the powerpc flash driver framework from
> argcheck() to bankValidate(). Previously, the latter was called by the
> former before the probe had happened and bankValidate()s subsequent call
> of BSP_flashCheckId() caused it to access memory that is potentially
> unmapped.
>
> On my MVME3100, this previous behaviour caused a machine check
> exception.
>
> [1] In my ever-humble opinion, this whole probe business is a bad idea
> from the get-go... The attached diff "flash_don't_probe.patch" - which
> I'm not suggesting be committed, but *is* what I'm using - reworks it on
> the MVME3100 so that the board's configuration is read from the "Vital
> Product Data" EEPROM, giving the flash address and size. I've had
> trouble with the VPD routines, however (and haven't fully debugged
> that)... The attached "vpd.patch" seems to have sorted that or me in the
> interim. I'd be interested in hearing others' thoughts on this :-)
> --
> Nick Withers
>
> Embedded Systems Programmer
> Department of Nuclear Physics, Research School of Physics and Engineering
> The Australian National University (CRICOS: 00120C)
>
> _______________________________________________
> rtems-devel mailing list
> rtems-devel at rtems.org
> http://www.rtems.org/mailman/listinfo/rtems-devel
>



More information about the devel mailing list