Skip to main content

raw_acpi/madt/
lpc_pic.rs

1#[derive(Copy, Clone)]
2#[repr(C, packed)]
3/// ## LPC Programmable Interrupt Controller (LPC PIC) Structure
4///
5/// LPC PIC (Low Pin Count Programmable Interrupt Controller) is responsible for handling ISA IRQs of old legacy devices
6/// such as PS/2 mouse, keyboard and UARTs for Loongarch machines.
7pub struct LPCProgrammableInterruptController {
8    /// 23 - LPC Programmable Interrupt Controller Structure
9    pub r#type: u8,
10    /// Length of the LPC Programmable Interrupt Controller Structure in bytes.
11    ///
12    /// **JJ's Note: There doesn't seem to be any variable-sized fields in this struct.  The size is 15 bytes...**
13    pub length: u8,
14    /// - **0x00** - Invalid
15    /// - **0x01** - LPC PIC v1
16    ///
17    /// Other values are reserved.
18    pub version: u8,
19    /// The base address of LPC PIC registers.
20    pub base_address: u64,
21    /// The register space size of LPC PIC.
22    pub size: u16,
23    /// This field described routed vector on BIO PIC from LPC PIC vectors.
24    pub cascade_vector: u16,
25}