coreboot_table/
header.rs

1#[derive(Debug)]
2#[repr(packed)]
3pub struct Header {
4    pub signature: [u8; 4],
5    pub header_bytes: u32,
6    pub header_checksum: u32,
7    pub table_bytes: u32,
8    pub table_checksum: u32,
9    pub table_entries: u32,
10}
11
12impl Header {
13    pub fn is_valid(&self) -> bool {
14        //TODO: Check checksums
15        &self.signature == b"LBIO"
16    }
17}