1use super::Table;
5use crate::packed_nums::*;
6use zerocopy::FromBytes;
7use zerocopy::Immutable;
8use zerocopy::IntoBytes;
9use zerocopy::KnownLayout;
10use zerocopy::Unaligned;
11
12#[repr(C)]
16#[derive(Copy, Clone, Debug, IntoBytes, Immutable, KnownLayout, FromBytes, Unaligned)]
17pub struct SlitHeader {
18 pub number_of_system_localities: u64_ne,
19}
20
21impl SlitHeader {
22 pub fn new(num_localities: u64) -> Self {
23 Self {
24 number_of_system_localities: num_localities.into(),
25 }
26 }
27}
28
29impl Table for SlitHeader {
30 const SIGNATURE: [u8; 4] = *b"SLIT";
31}
32
33pub const SLIT_REVISION: u8 = 1;