定位RSDP后如何找到MCFG table?

How to find MCFG table after located RSDP?

我通过搜索有效字符串找到了 RSDP。

我知道 table 包含一个指向 XSDT 的指针。

然而,我比较了"Length"和XSDT中的条目,只有FACP、APIC、SSDT table被找到了。

这是否意味着系统不包含 MCFG table?

因此我无法使用内存映射访问 PCIe 配置space?

非常感谢!

MCFG 不是 ACPI 规范的一部分。 table 在 PCI 固件规范 文档中进行了描述。

第 2.7.2 节指出

The ACPI MCFG table describes the location of the PCI Express configuration space, and this table will be present in a firmware implementation compliant to this specification version 3.0 (or later).

所以,这意味着您的固件不符合 PCI 固件规范 v3.0 或更高版本。

进一步阅读有关 ECAM 的第 4.1 节

On PC-compatible systems, the enhanced configuration access mechanism allows PCI configuration space to be accessed using memory primitives rather than I/O-based primitives (CF8/CFC mechanism).

因此,这意味着在您的情况下,如果您谈论的是与 PC 兼容的系统,则只能使用类型 1 (CF8/CFC) 访问 PCI 配置 space(您可能无法使用达到 space 超过 256 字节)。

当然这可能只是固件中的一个错误,出于某种原因忘记描述它。在 x86 上,您可以尝试访问传统的 ECAM window(从 0xE0000000 开始)并检查它是否有效(确保内存区域在 OS).