[coreboot] [PATCH] v3: convert fake SPD to struct spd_entry
Carl-Daniel Hailfinger
c-d.hailfinger.devel.2006 at gmx.net
Wed Feb 27 01:09:41 CET 2008
On 26.02.2008 20:11, ron minnich wrote:
> On Tue, Feb 26, 2008 at 11:04 AM, Uwe Hermann <uwe at hermann-uwe.de> wrote:
>
>> On Tue, Feb 26, 2008 at 07:53:16PM +0100, Carl-Daniel Hailfinger wrote:
>> > Convert all boards using fake SPD entries to struct spd_entry, thereby
>> > making sure we return 0xff for nonexisiting entries and shrinking the
>> > data structure by 85%.
>>
>> Can you elaborate? 85% less in RAM or in ROM? How did you measure this?
>>
>
> due to the big sparse struct. It's not a huge deal after compression :-)
>
>>
>> > As a bonus, the various initram.c for boards with fake SPD are now
>> > almost identical.
>>
>> Nice! (next step: generic code in lib/, drop per-board code)
>>
>
>
> yeah but be careful.
>
> There are lots of special cases. I think we could close out most of
> them as follows:
> provide an array called valid_spd_device which contains a 0-terminate
> list of valid SPDs.
>
You mean you want to simulate multiple SPD EEPROMs?
> Then the function above can, first:
> 1. for loop to find out if spd is valid, if not, return 0xff
> 2. for loop that is currently there.
>
> I can provide sample code if this is not clear.
>
I think it is clear if my understanding above is right.
> But this is still cool. I will test on alix1c tonight and report back.
>
Thanks!
Regards,
Carl-Daniel
--
http://www.hailfinger.org/
More information about the coreboot
mailing list