[coreboot] cbmem in ELOG

Aaron Durbin adurbin at google.com
Mon Aug 24 14:02:32 CET 2015


On Mon, Aug 24, 2015 at 8:56 AM, John Lewis <jlewis at johnlewis.ie> wrote:
>>>
>>> This may be a daft question technically, but is there some way event
>>> logging
>>> could be subverted to store cbmem output?
>>
>>
>>
>> Yes. Just add a type to the OEM section and call elog_add_event_raw()
>> with the console pointer and size. Keep it mind that would be
>> snapshotted then so it matters when you make that call as to what
>> would show up in elog. Also, depending on the size you could fill up
>> you elog sections pretty quickly.
>
>
> Thanks for that, Aaron. I don't know C but I'll try to figure out how to do
> that, and then maybe ask about increasing ELOG size beyond 4 digits once I
> have something working.
>
>>
>> Also, I assume you mean cbmem console when referring to cbmem above?
>>
>
> Yes. Me and terminology don't get on though I try. ;)
>
> What I would be thinking of doing is using this as a poor-man's debug -
> reading the ROM containing ELOG using an external programmer and using a hex
> editor to view it (if that's possible).

OK. It's very much possible then. However, one thing to not is that
the spi driver (write support) normally doesn't come up until pretty
late in ramstage. That means you have to boot far enough to get
something saved. There might be ways around that limitation, but it's
the current behavior at the moment.

If you want to throw some patches together I'll be happy to comment on
them and point you in a better direction if you're off in the weeds.
Just add me as a reviewer.

-Aaron



More information about the coreboot mailing list