[flashrom] [PATCH] ichspi: fix unused FREG detection

Joshua Roys roysjosh at gmail.com
Thu May 26 14:36:07 CEST 2011


On 05/23/2011 11:52 AM, Stefan Tauner wrote:
> On Mon, 23 May 2011 11:18:30 -0400
> Joshua Roys<roysjosh at gmail.com>  wrote:
>
>> Hello,
>>
>> This patch will fix incorrect output from my original patch:
>> 0x64: 0x00000fff (FREG4: Platform Data)
>> 0x00fff000-0x00000fff is locked
>
>> -	if (base == 0x1fff&&  limit == 0) {
>> +	if ((base&  0x0fff) == 0x0fff&&  limit == 0) {
>
> hey!
>
> i am quoting from the ibex peak spi programming guide:
>
> general description of the freg section:
>> • If a particular region is not using SPI Flash, the particular region should be disabled
>> by setting the Region Base to all 1's, and the Region Limit to all 0's (base is higher
>> than the limit)
>> • For each region except FLREG0, the Flash Controller must have a default Region
>> Base of FFFh and the Region Limit to 000h within the Flash Controller in case the
>> Number of Regions specifies that a region is not used.
>
> FREG1.limit:
>> Must be set to 0000h if BIOS region is unused (on Firmware hub)
> FREG1.base:
>> If the BIOS region is not used, the Region Base must be programmed to 1FFFh
> and equivalent for the GbE and platform data section (ME is required in
> ibex peak...).
>
> is this a contradiction (one time 0xfff, other time 0x1fff)?
> in any case: would checking for limit<  base be the better alternative?

Hello,

Good idea Stefan.  May as well handle all the invalid cases in one fell 
swoop.

New patch attached.

Josh

-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: 0001-ichspi-fix-unused-FREG-detection.patch
URL: <http://www.flashrom.org/pipermail/flashrom/attachments/20110526/44af593d/attachment.ksh>


More information about the flashrom mailing list