1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21
const std = @import("std");
const SDTHeader = packed struct {
// All tables (other than RSDP) have 4-byte signature indicating table type
signature: u32,
// Total size of table INCLUDING HEADER
length: u32,
revision: u8,
checksum: u8,
OEMID: u48,
OEMTableID: u64,
OEMRevision: u32,
CreatorID: u32,
CreatorRevision: u32
};
test "Struct size" {
std.debug.warn("{}\n", u8(@sizeOf(SDTHeader)));
std.debug.assert(@sizeOf(SDTHeader) == 36);
}