lkml.org 
[lkml]   [2020]   [Nov]   [13]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [SPECIFICATION RFC] The firmware and bootloader log specification
From
Date
On 11/13/20 3:52 PM, Daniel Kiper wrote:
> Hey,
>
>
> Here is the description (pseudocode) of the structures which will be
> used to store the log data.
>
> Anyway, I am aware that this is not specification per se.


Yes, you have caveats here. I'm sure that you either already know
or would learn soon enough that struct struct bf_log has some
padding added to it (for alignment) unless it is packed.
Or you could rearrange the order of some of its fields
and save 8 bytes per struct on x86_64.


> struct bf_log
> {
> uint32_t version;
> char producer[64];
> uint64_t flags;
> uint64_t next_bf_log_addr;
> uint32_t next_msg_off;
> bf_log_msg msgs[];
> }
>
> struct bf_log_msg
> {
> uint32_t size;
> uint64_t ts_nsec;
> uint32_t level;
> uint32_t facility;
> uint32_t msg_off;
> char strings[];
> }


cheers.
--
~Randy

\
 
 \ /
  Last update: 2020-11-14 04:17    [W:0.255 / U:0.216 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site