pci: aml: support up to 256 PCI segments

Originally the AML only accepted one hex number for PCI segment
numbering. Change it to accept two numbers. That makes it possible to
add up to 256 PCI segments.

Signed-off-by: Wei Liu <liuwe@microsoft.com>
This commit is contained in:
Wei Liu 2023-04-27 17:07:09 +00:00 committed by Rob Bradford
parent 21d40d7489
commit ba1e89139a
2 changed files with 2 additions and 2 deletions

View File

@ -4278,7 +4278,7 @@ impl Aml for DeviceManager {
let mut pci_scan_methods = Vec::new();
for i in 0..self.pci_segments.len() {
pci_scan_methods.push(aml::MethodCall::new(
format!("\\_SB_.PCI{i:X}.PCNT").as_str().into(),
format!("\\_SB_.PC{i:02X}.PCNT").as_str().into(),
vec![],
));
}

View File

@ -418,7 +418,7 @@ impl Aml for PciSegment {
pci_dsdt_inner_data.push(&prt);
aml::Device::new(
format!("_SB_.PCI{:X}", self.id).as_str().into(),
format!("_SB_.PC{:02X}", self.id).as_str().into(),
pci_dsdt_inner_data,
)
.to_aml_bytes(sink)