ACPI几个关键概念汇总整理(英文)

ACPI几个关键概念整理,未翻译为中文,供需。

SLIT

ACPI System Locality Distance Information Table (SLIT): The relative distance between nodes on a system.

DSDT

DSDT stands for Differentiated System Description Table. It Is a major ACPI table and is used to describe what peripherals the machine has. Also holds information on PCI IRQ mappings and power management.

_PXM (Proximity)

This optional object is used to describe proximity domain associations within a machine in the ACPI namespace (DSDT). _PXM evaluates to an integer that identifies a device as belonging to a Proximity Domain defined in the System Resource Affinity Table (SRAT).

Scope (\_SB) {
  // ...
  Device (PCI0) { // Root PCI Bus (Host-Bridge)
    Name (_HID, EISAID("PNP0A08"))
    Name (_CID, EISAID("PNP0A03"))
    Name (_BBN, 0)
    Method (_CRS,0) {
      // Return current resources for host bridge 0
    }
    Name (_PRT, Package() {
     // Package with PCI IRQ routing table information
    })
    Method (_PXM, 0, NotSerialized) {
      Return (0)
    }
  }
  // ...
}

Proximity domain

Proximity domain: A proximity domain identifier is an index to a NUMA node on a NUMA system. Proximity domain identifiers are found in the ACPI System Resource Affinity Table (SRAT), where they are used to associate processors and memory regions with a particular NUMA node.  Proximity domain identifiers are also found in the ACPI namespace, where they are used to associate a device with a particular NUMA node. Proximity domain identifiers are typically used only by management applications provided by system manufacturers. 

Heterogeneous Memory Attribute Table (HMAT)

The ACPI HMAT describes the memory attributes, such as memory side cache attributes and bandwidth and latency details, related to the Memory Proximity Domain.

The HMAT table, in concert with the existing System Resource Affinity Table (SRAT), provides users with information about memory initiators and memory targets in the system.

A "memory initiator" in this case is any device such as a CPU or a separate memory I/O device that can initiate a memory request.  A "memory target" is a CPU-accessible physical address range.

The HMAT provides performance information (expected latency and bandwidth, etc.) for various (initiator,target) pairs.  This is mostly motivated by the need to optimally use performance-differentiated DRAM, but it also allows us to describe the performance characteristics of persistent memory.

One major conceptual change in ACPI 6.2 related to this work is that
proximity domains no longer need to contain a processor.  We can now have
memory-only proximity domains, which means that we can now have memory-only
Linux NUMA nodes.

Here is an example configuration where we have a single processor, one
range of regular memory and one range of High Bandwidth Memory (HBM):

  +---------------+   +----------------+
  | Processor     |   | Memory         |
  | prox domain 0 +---+ prox domain 1  |
  | NUMA node 1   |   | NUMA node 2    |
  +-------+-------+   +----------------+
          |
  +-------+----------+
  | HBM              |
  | prox domain 2    |
  | NUMA node 0      |
  +------------------+
This gives us one initiator (the processor) and two targets (the two memory
ranges).  Each of these three has its own ACPI proximity domain and
associated Linux NUMA node.  Note also that while there is a 1:1 mapping
from each proximity domain to each NUMA node, the numbers don't necessarily
match up.  Additionally we can have extra NUMA nodes that don't map back to
ACPI proximity domains.

SRAT

The SRAT table is described by the ACPI Specification 5.0a in p 5.2.16 as a table providing information that allows an OSPM (Operating System Power Management [System]) "to associate processors and memory ranges, including ranges of memory provided by hot-added memory devices, with system localities proximity domains and clock domains." Basically, the SRAT provides information on relationships of resources in the system - namely the processor(s) and memory. The SRAT table associates each processor and blocks of memory to a plain ol' integer, called proximity domains in ACPI jargon.

struct SRAT_proc_lapic_struct
{
    uint8_t type;      // 0x0 for this type of structure
    uint8_t length;    // 16
    uint8_t lo_DM;     // Bits [0:7] of the proximity domain
    uint8_t APIC_ID;   // Processor's APIC ID
    uint32_t flags;    // Haha the most useless thing ever
    uint8_t SAPIC_EID; // The processor's local SAPIC EID. Don't even bother.
    uint8_t hi_DM[3];  // Bits [8:31] of the proximity domain
    uint32_t _CDM;     // The clock domain which the processor belongs to (more jargon)
} __attribute__((packed));
struct SRAT_mem_struct
{
    uint8_t type;         // 0x1 for this type of structure
    uint8_t length;       // 40
    uint32_t domain;      // The domain to which this memory region belongs to
    uint8_t reserved1[2]; // Reserved
    uint32_t lo_base;     // Low 32 bits of the base address of the memory range
    uint32_t hi_base;     // High 32 bits of the base address of the memory range
    uint32_t lo_length;   // Low 32 bits of the length of the range
    uint32_t hi_length;   // High 32 bits of the length
    uint8_t reserved2[4]; // Reserved
    uint32_t flags;       // Flags
    uint8_t reserved3[8]; // Reserved
} __attribute__ ((packed));

(END)

Linux阅码场原创精华文章汇总

更多精彩,尽在"Linux阅码场",扫描下方二维码关注

别忘了点个在看哦

你可能感兴趣的:(ACPI几个关键概念汇总整理(英文))