| 287 | |
| 288 | impl 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 | |
| 312 | struct PciDevSlotNotify { |