Crate axdevice_base

Source
Expand description

Basic traits and structures for emulated devices in ArceOS hypervisor.

This crate contains:

  • BaseDeviceOps trait: The trait that all emulated devices must implement.
  • EmuDeviceType enum: Enumeration representing the type of emulator devices. (Already moved to axvmconfig crate.)
  • EmulatedDeviceConfig: Configuration structure for device initialization.

Structs§

EmulatedDeviceConfig
Represents the configuration of an emulated device for a virtual machine.

Enums§

EmuDeviceType
The type of Emulated Device.

Traits§

BaseDeviceOps
BaseDeviceOps is the trait that all emulated devices must implement.

Functions§

map_device_of_type
Determines whether the given device is of type T and calls the provided function f with a reference to the device if it is.

Trait Aliases§

BaseMmioDeviceOps
BaseMmioDeviceOps is the trait that all emulated MMIO devices must implement. It is a trait alias of BaseDeviceOps with GuestPhysAddrRange as the address range.
BasePortDeviceOps
BasePortDeviceOps is the trait that all emulated port devices must implement. It is a trait alias of BaseDeviceOps with PortRange as the address range.
BaseSysRegDeviceOps
BaseSysRegDeviceOps is the trait that all emulated system register devices must implement. It is a trait alias of BaseDeviceOps with SysRegAddrRange as the address range.