raw_acpi/pcct/mod.rs
1pub mod subspace;
2
3use crate::SDTHeader;
4
5#[derive(Copy, Clone)]
6pub struct PCCGlobalFlags(u32);
7impl PCCGlobalFlags {
8 /// If set, the platform is capable of generating an interrupt to indicate completion of a command.
9 pub const fn platform_interrupt(&self) -> bool {
10 self.0 & 0b1 != 0
11 }
12 // JJ here, the rest of the bits are reserved; no need to implement.
13}
14
15#[derive(Copy, Clone)]
16#[repr(C, packed)]
17/// ## Platform Communications Channel (PCC)
18///
19/// The platform communication channel (PCC) is a generic mechanism for OSPM to communicate with an entity in the platform (e.g. a platform controller, or a Baseboard Management Controller (BMC)).
20/// Neither the entity that OSPM communicates with, nor any aspects of the information passed back and forth is defined in this section.
21/// That information is defined by the actual interface that that employs PCC register address space as the communication channel.
22///
23/// PCC defines a new address space type (PCC Space, 0xA), which is implemented as one or more independent communications channels, or subspaces.
24pub struct PlatformCommunicationsChannel {
25 /// - **Signature** - "PCCT"
26 pub header: SDTHeader,
27 /// Platform Communications Channel Global flags.
28 pub flags: PCCGlobalFlags,
29 reserved: u64,
30 /// A list of Platform Communications Channel Subspace structures for this platform. At most 256 subspaces are supported.
31 pub pcc_subspace_structure: [u8; 0],
32}