#![no_std]
extern crate alloc;
#[macro_use]
extern crate log;
mod device;
mod error;
mod factory;
mod fw_cfg;
#[cfg(any(target_arch = "loongarch64", test))]
#[cfg_attr(test, allow(dead_code))]
mod loongarch_pch_pic;
mod range_alloc;
mod registration;
mod service;
#[cfg(target_arch = "x86_64")]
mod x86;
pub use axdevice_base::{AccessWidth, Device, Port, SysRegAddr};
pub use axvm_types::GuestPhysAddr;
pub use device::{
DeviceRuntime, RuntimeAccessPorts, StopAccessPort, TimerAccessPort, WakeAccessPort,
};
pub use error::{DeviceManagerError, DeviceManagerResult};
pub use factory::{
DeviceBuildContext, DeviceFactory, DeviceFactoryRegistry, IrqResolver,
register_builtin_factories,
};
pub use fw_cfg::{
FwCfg, FwCfgAcpiBlobs, FwCfgBuildConfig, FwCfgDeviceFactory, FwCfgDmaDevice,
FwCfgPayloadConfig, FwCfgPayloadFactory, FwCfgPlatformConfig, FwCfgRamRegion,
};
#[cfg(target_arch = "loongarch64")]
pub use loongarch_pch_pic::{
LoongArchPchPic, LoongArchPchPicFactory, PchPicOutputEvent, PchPicOutputPort,
PchPicOutputPortKey,
};
pub use range_alloc::{GuestRangeAllocator, GuestRangeAllocatorKey};
pub use registration::{DeviceBundle, DeviceLifecycle, DeviceRegistration, PollableDeviceOps};
pub use service::{DeviceServices, ServiceCardinality, ServiceKey};
#[cfg(target_arch = "x86_64")]
pub use x86::{
X86InterruptDomainKey, X86InterruptDomainOps, X86IoApicDevice, X86IoApicDeviceOps,
X86IoApicServiceKey, X86PitDevice, X86PitDeviceOps, X86PitServiceKey, X86SerialDeviceOps,
X86SerialPortDevice, X86SerialServiceKey,
};
#[cfg(target_arch = "x86_64")]
pub use x86_vlapic::IoApicInterrupt;