[coreboot] [PATCH] v3: convert fake SPD to struct spd_entry
c-d.hailfinger.devel.2006 at gmx.net
Sat Mar 1 00:53:33 CET 2008
On 29.02.2008 22:16, Stefan Reinauer wrote:
> * Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006 at gmx.net> [080229 22:04]:
>>> 85% of 128 bytes? Therefore this is O(n) now instead of O(1) in ROM
>>> accesses. Are you sure?
>> Well, since we need the fake SPD in initram, we can't compress it and
>> really lose that space in ROM. That's why I decided to accept higher lookup
>> cost to achieve space savings. However, if anybody can show that the
>> increased code complexity costs us more ROM space than what we save by
>> converting the data structure from a direct access array to an iterated
>> list, I'm all for changing it back.
> Oh I had assumed you had already analyzed the code space savings before
> claiming your method saves 85% by running in a loop instead of once.
Sorry, I forgot that. Statistics for gcc 4.2.1, alix1c initram:
| old | new
spd_read_byte size | 107 | 109
total size | 10000 | 9989
If the SPD array had been populated correctly in the old version
(including checksum bytes), the savings would have been more
substantial. Oh well.
More information about the coreboot