MCPcopy Create free account
hub / github.com/cloud-hypervisor/cloud-hypervisor / to_aml_bytes

Method to_aml_bytes

vmm/src/pci_segment.rs:289–309  ·  view source on GitHub ↗
(&self, sink: &mut dyn acpi_tables::AmlSink)

Source from the content-addressed store, hash-verified

287
288impl Aml for PciDevSlot {
289 fn to_aml_bytes(&self, sink: &mut dyn acpi_tables::AmlSink) {
290 let sun = self.device_id;
291 let adr: u32 = (self.device_id as u32) << 16;
292 aml::Device::new(
293 format!("S{:03}", self.device_id).as_str().into(),
294 vec![
295 &aml::Name::new("_SUN".into(), &sun),
296 &aml::Name::new("_ADR".into(), &adr),
297 &aml::Method::new(
298 "_EJ0".into(),
299 1,
300 true,
301 vec![&aml::MethodCall::new(
302 "\\_SB_.PHPR.PCEJ".into(),
303 vec![&aml::Path::new("_SUN"), &aml::Path::new("_SEG")],
304 )],
305 ),
306 ],
307 )
308 .to_aml_bytes(sink);
309 }
310}
311
312struct PciDevSlotNotify {

Callers

nothing calls this directly

Calls 5

newFunction · 0.85
iterMethod · 0.80
pushMethod · 0.45
extendMethod · 0.45
mapMethod · 0.45

Tested by

no test coverage detected