<div dir="ltr"><div><br></div><div>FYI: </div><div>I used put spd data in a stand alone C source code so that I can edit with vi directly.</div><div><br></div><div>unsigned char global_spd_data[256]  = __attribute__ ((section("spd_data"))) {</div><div>0x??, 0x??, ...</div><div>};</div><div><br></div><div>Note: I also put spd_data in the spd data section that is the end of my binary xloader code. </div><div>I can easily edit with bvi editor too.</div><div><br></div><div><a href="https://en.wikipedia.org/wiki/Serial_presence_detect">https://en.wikipedia.org/wiki/Serial_presence_detect</a><br></div><br></div><div class="gmail_extra"><br><div class="gmail_quote">On Fri, Oct 23, 2015 at 11:35 AM, Aaron Durbin <span dir="ltr"><<a href="mailto:adurbin@google.com" target="_blank">adurbin@google.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">This one's for Ron.<br>
<div class="HOEnZb"><div class="h5"><br>
On Fri, Oct 23, 2015 at 10:32 AM, ron minnich <<a href="mailto:rminnich@gmail.com">rminnich@gmail.com</a>> wrote:<br>
> Build the tool in go. It's trivial. If you have an idea how it ought to work<br>
> I can set it up in the playground in a few minutes.<br>
><br>
> ron<br>
><br>
> On Fri, Oct 23, 2015 at 8:24 AM Patrick Georgi <<a href="mailto:pgeorgi@google.com">pgeorgi@google.com</a>> wrote:<br>
>><br>
>> Hi,<br>
>><br>
>> Some mainboards come with soldered-on memory without SPD ROM. For<br>
>> these, we carry the SPD data in coreboot.<br>
>><br>
>> Currently, they're stored in a hexdump format that is then converted<br>
>> to binary at build time. The various mechanisms of doing so fail on<br>
>> some platform or another:<br>
>>  - "echo -e -n $stuff" isn't well-liked by some shells (emits "e -n<br>
>> $stuff")<br>
>>  - "printf '\x42'" isn't well-liked by some shells (or /usr/bin/printf<br>
>> tools) that don't support hexadecimal formats<br>
>>  - "printf '\0377'" isn't well-liked by some non-conforming, but existing<br>
>> shells<br>
>>  - xxd -rg1 $file > $file.bin requires xxd, which comes with vim and<br>
>> may just not exist<br>
>><br>
>> I see essentially two ways out of this, before we can start reducing<br>
>> duplication across the tree in that area:<br>
>> We could build our own tool to parse hex files and dump binary, or we<br>
>> could ship SPD data as binary from the start (and only have to<br>
>> concatenate them).<br>
>><br>
>> The second option has the appeal of being much simpler (and there<br>
>> isn't really a "preferred form" for editing SPD data that I'm aware of<br>
>> - is there?), but looks icky at a glance because it's binary (but it's<br>
>> really just as impenetrable as the equivalent hexdump).<br>
>><br>
>> So what do these files contain? Parameters (as in: facts) about the<br>
>> hardware's size, layout, and timing, and a bunch of vendor/model<br>
>> identifier strings.<br>
>><br>
>><br>
>> So, is there a third option that I'm missing? Other opinions?<br>
>> Patrick<br>
>> --<br>
>> Google Germany GmbH, ABC-Str. 19, 20354 Hamburg<br>
>> Registergericht und -nummer: Hamburg, HRB 86891, Sitz der Gesellschaft:<br>
>> Hamburg<br>
>> Geschäftsführer: Matthew Scott Sucherman, Paul Terence Manicle<br>
>><br>
>> --<br>
>> coreboot mailing list: <a href="mailto:coreboot@coreboot.org">coreboot@coreboot.org</a><br>
>> <a href="http://www.coreboot.org/mailman/listinfo/coreboot" rel="noreferrer" target="_blank">http://www.coreboot.org/mailman/listinfo/coreboot</a><br>
><br>
><br>
> --<br>
> coreboot mailing list: <a href="mailto:coreboot@coreboot.org">coreboot@coreboot.org</a><br>
> <a href="http://www.coreboot.org/mailman/listinfo/coreboot" rel="noreferrer" target="_blank">http://www.coreboot.org/mailman/listinfo/coreboot</a><br>
</div></div><br>--<br>
coreboot mailing list: <a href="mailto:coreboot@coreboot.org">coreboot@coreboot.org</a><br>
<a href="http://www.coreboot.org/mailman/listinfo/coreboot" rel="noreferrer" target="_blank">http://www.coreboot.org/mailman/listinfo/coreboot</a><br></blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="gmail_signature"><div dir="ltr"><span style="color:rgb(85,85,85);font-family:sans-serif;font-size:small;line-height:19.5px;border-width:2px 0px 0px;border-style:solid;border-color:rgb(213,15,37);padding-top:2px;margin-top:2px">Sheng-Liang Song |</span><span style="color:rgb(85,85,85);font-family:sans-serif;font-size:small;line-height:19.5px;border-width:2px 0px 0px;border-style:solid;border-color:rgb(51,105,232);padding-top:2px;margin-top:2px"> Software Engineer |</span><span style="color:rgb(85,85,85);font-family:sans-serif;font-size:small;line-height:19.5px;border-width:2px 0px 0px;border-style:solid;border-color:rgb(0,153,57);padding-top:2px;margin-top:2px"> <a href="mailto:ssl@google.com" target="_blank">ssl@google.com</a> |</span><span style="color:rgb(85,85,85);font-family:sans-serif;font-size:small;line-height:19.5px;border-width:2px 0px 0px;border-style:solid;border-color:rgb(238,178,17);padding-top:2px;margin-top:2px"> 650-537-5017</span><br></div></div>
</div>