use r_efi::efi;
pub const PROTOCOL_GUID: efi::Guid =
efi::Guid::from_fields(0x26baccb1, 0x6f42, 0x11d4, 0xbc, 0xe7, &[0x00, 0x80, 0xc7, 0x3c, 0x88, 0x81]);
#[repr(C)]
pub enum CpuFlushType {
EfiCpuFlushTypeWriteBackInvalidate,
EfiCpuFlushTypeWriteBack,
EFiCpuFlushTypeInvalidate,
}
pub type FlushDataCache = extern "efiapi" fn(*const Protocol, efi::PhysicalAddress, u64, CpuFlushType) -> efi::Status;
pub type EnableInterrupt = extern "efiapi" fn(*const Protocol) -> efi::Status;
pub type DisableInterrupt = extern "efiapi" fn(*const Protocol) -> efi::Status;
pub type GetInterruptState = extern "efiapi" fn(*const Protocol, *mut bool) -> efi::Status;
#[repr(C)]
pub enum CpuInitType {
EfiCpuInit,
}
pub type Init = extern "efiapi" fn(*const Protocol, CpuInitType) -> efi::Status;
pub type EfiExceptionType = isize;
pub type EfiSystemContext = efi::protocols::debug_support::SystemContext;
pub type InterruptHandler = extern "efiapi" fn(EfiExceptionType, EfiSystemContext);
pub type RegisterInterruptHandler =
extern "efiapi" fn(*const Protocol, EfiExceptionType, InterruptHandler) -> efi::Status;
pub type GetTimerValue = extern "efiapi" fn(*const Protocol, u32, *mut u64, *mut u64) -> efi::Status;
pub type SetMemoryAttributes = extern "efiapi" fn(*const Protocol, efi::PhysicalAddress, u64, u64) -> efi::Status;
#[repr(C)]
pub struct Protocol {
pub flush_data_cache: FlushDataCache,
pub enable_interrupt: EnableInterrupt,
pub disable_interrupt: DisableInterrupt,
pub get_interrupt_state: GetInterruptState,
pub init: Init,
pub register_interrupt_handler: RegisterInterruptHandler,
pub get_timer_value: GetTimerValue,
pub set_memory_attributes: SetMemoryAttributes,
pub number_of_timers: u32,
pub dma_buffer_alignment: u32,
}