hpet.rs 410 B

12345678910111213141516171819
  1. use sdt::SdtHeader;
  2. use {AcpiError, GenericAddress, PhysicalMapping};
  3. #[repr(C, packed)]
  4. pub struct Hpet {
  5. header: SdtHeader,
  6. event_timer_block_id: u32,
  7. base_address: GenericAddress,
  8. hpet_number: u8,
  9. clock_tick_unit: u16,
  10. page_protection_oem: u8,
  11. }
  12. pub fn parse_hpet(mapping: &PhysicalMapping<Hpet>) -> Result<(), AcpiError> {
  13. (*mapping).header.validate(b"HPET")?;
  14. Ok(())
  15. }