pub fn add_goldfish_battery(
    amls: &mut Vec<u8>,
    battery_jail: Option<Minijail>,
    mmio_bus: &Bus,
    irq_chip: &mut dyn IrqChip,
    irq_num: u32,
    resources: &mut SystemAllocator,
    swap_controller: &mut Option<SwapController>
) -> Result<(Tube, u64), DeviceRegistrationError>
Expand description

Adds goldfish battery and returns the platform needed resources including its AML data and mmio base address

§Arguments

  • amls - the vector to put the goldfish battery AML
  • battery_jail - used when sandbox is enabled
  • mmio_bus - bus to add the devices to
  • irq_chip - the IrqChip object for registering irq events
  • irq_num - assigned interrupt to use
  • resources - the SystemAllocator to allocate IO and MMIO for acpi