Documentation/driver-api/cxl/platform/acpi.rst GitHub 원문 ↗

Linux 6.18.37 · Driver API / CXL / Platform

ACPI Tables

CXL을 정적으로 구성하는 ACPI table의 역할, Linux가 만드는 resource, dump 방법과 흔한 firmware 오류를 설명합니다.

Source pathDocumentation/driver-api/cxl/platform/acpi.rst
Source versionLinux v6.18.37
TranslationDUJINLABS 전문 번역 + 해설

요약·해설과 원문, 전문 번역을 서로 분리했습니다. API 이름, symbol, source path는 원문 표기를 사용합니다.

1. 요약·해설

원문의 핵심 논리와 kernel programming 관점의 보충 설명입니다. 아래의 전문 번역과는 별도로 작성했습니다.

요약과 해설

acpi.rst:1-76

CXL memory가 DAX 또는 kmem으로 나타나지 않을 때는 driver만 볼 것이 아니라 CEDT·DSDT UID, CFMWS range와 restriction, SRAT·HMAT·SLIT의 일관성을 먼저 확인해야 합니다. Linux는 이 firmware table들을 신뢰해 NUMA node, memory tier, abstract distance와 SystemRAM region을 구성합니다.

2. 영어 원문 전체

번역 기준이 된 Linux v6.18.37 원문입니다. 줄 번호는 이 버전의 파일 좌표입니다.

원문 전체 펼치기
1 .. SPDX-License-Identifier: GPL-2.0
2
3 ===========
4 ACPI Tables
5 ===========
6
7 ACPI is the "Advanced Configuration and Power Interface", which is a standard
8 that defines how platforms and OS manage power and configure computer hardware.
9 For the purpose of this theory of operation, when referring to "ACPI" we will
10 usually refer to "ACPI Tables" - which are the way a platform (BIOS/EFI)
11 communicates static configuration information to the operation system.
12
13 The Following ACPI tables contain *static* configuration and performance data
14 about CXL devices.
15
16 .. toctree::
17 :maxdepth: 1
18
19 acpi/cedt.rst
20 acpi/srat.rst
21 acpi/hmat.rst
22 acpi/slit.rst
23 acpi/dsdt.rst
24
25 The SRAT table may also contain generic port/initiator content that is intended
26 to describe the generic port, but not information about the rest of the path to
27 the endpoint.
28
29 Linux uses these tables to configure kernel resources for statically configured
30 (by BIOS/EFI) CXL devices, such as:
31
32 - NUMA nodes
33 - Memory Tiers
34 - NUMA Abstract Distances
35 - SystemRAM Memory Regions
36 - Weighted Interleave Node Weights
37
38 ACPI Debugging
39 ==============
40
41 The :code:`acpidump -b` command dumps the ACPI tables into binary format.
42
43 The :code:`iasl -d` command disassembles the files into human readable format.
44
45 Example :code:`acpidump -b && iasl -d cedt.dat` ::
46
47 [000h 0000 4] Signature : "CEDT" [CXL Early Discovery Table]
48
49 Common Issues
50 -------------
51 Most failures described here result in a failure of the driver to surface
52 memory as a DAX device and/or kmem.
53
54 * CEDT CFMWS targets list UIDs do not match CEDT CHBS UIDs.
55 * CEDT CFMWS targets list UIDs do not match DSDT CXL Host Bridge UIDs.
56 * CEDT CFMWS Restriction Bits are not correct.
57 * CEDT CFMWS Memory regions are poorly aligned.
58 * CEDT CFMWS Memory regions spans a platform memory hole.
59 * CEDT CHBS UIDs do not match DSDT CXL Host Bridge UIDs.
60 * CEDT CHBS Specification version is incorrect.
61 * SRAT is missing regions described in CEDT CFMWS.
62
63 * Result: failure to create a NUMA node for the region, or
64 region is placed in wrong node.
65
66 * HMAT is missing data for regions described in CEDT CFMWS.
67
68 * Result: NUMA node being placed in the wrong memory tier.
69
70 * SLIT has bad data.
71
72 * Result: Lots of performance mechanisms in the kernel will be very unhappy.
73
74 All of these issues will appear to users as if the driver is failing to
75 support CXL - when in reality they are all the failure of a platform to
76 configure the ACPI tables correctly.
77

3. 한국어 전문 번역

영어 원문의 문단 순서와 의미를 유지한 전체 번역입니다. 코드, 함수명, symbol과 URL은 원문 표기를 유지합니다.

ACPI table의 역할

1-15
.. SPDX-License-Identifier: GPL-2.0

ACPI는 `Advanced Configuration and Power Interface`의 약자로, platform과 OS가 전원을 관리하고 computer hardware를 구성하는 방법을 정의하는 표준입니다. 이 동작 원리 문서에서 `ACPI`라고 할 때는 대개 platform(BIOS/EFI)이 정적 구성 정보를 operating system에 전달하는 수단인 `ACPI Tables`를 뜻합니다.

다음 ACPI table에는 CXL device에 관한 정적 구성 및 성능 데이터가 들어 있습니다.

CXL 관련 table과 Linux resource

16-37
  • CEDT: CXL Early Discovery Table
  • SRAT: Static Resource Affinity Table
  • HMAT: Heterogeneous Memory Attribute Table
  • SLIT: System Locality Information Table
  • DSDT: Differentiated System Description Table

SRAT table에는 generic port/initiator를 설명하려는 generic port 내용도 들어갈 수 있지만, endpoint까지 이어지는 나머지 path의 정보는 포함하지 않습니다.

Linux는 이 table들을 사용해 BIOS/EFI가 정적으로 구성한 CXL device의 kernel resource를 다음과 같이 설정합니다.

  • NUMA node
  • Memory Tier
  • NUMA Abstract Distance
  • SystemRAM Memory Region
  • Weighted Interleave Node Weight

ACPI 디버깅

38-48

`acpidump -b` command는 ACPI table을 binary format으로 dump합니다.

`iasl -d` command는 그 file을 사람이 읽을 수 있는 형식으로 disassemble합니다.

`acpidump -b && iasl -d cedt.dat` 실행 예시는 다음과 같습니다.

[000h 0000   4]   Signature : "CEDT"    [CXL Early Discovery Table]

일반적인 문제

49-76

여기서 설명하는 실패는 대부분 driver가 memory를 DAX device 및/또는 kmem으로 노출하지 못하는 결과로 이어집니다.

  • CEDT CFMWS target list의 UID가 CEDT CHBS UID와 일치하지 않습니다.
  • CEDT CFMWS target list의 UID가 DSDT CXL Host Bridge UID와 일치하지 않습니다.
  • CEDT CFMWS Restriction Bit가 올바르지 않습니다.
  • CEDT CFMWS Memory region의 alignment가 좋지 않습니다.
  • CEDT CFMWS Memory region이 platform memory hole을 가로지릅니다.
  • CEDT CHBS UID가 DSDT CXL Host Bridge UID와 일치하지 않습니다.
  • CEDT CHBS Specification version이 올바르지 않습니다.
  • SRAT에 CEDT CFMWS가 설명한 region이 없습니다. 결과적으로 해당 region의 NUMA node를 만들지 못하거나 잘못된 node에 배치합니다.
  • HMAT에 CEDT CFMWS가 설명한 region의 데이터가 없습니다. 결과적으로 NUMA node가 잘못된 memory tier에 배치됩니다.
  • SLIT 데이터가 잘못되었습니다. 결과적으로 kernel의 많은 성능 mechanism이 정상적으로 동작하지 못합니다.

이 문제들은 모두 사용자에게 CXL을 지원하지 못하는 driver 문제처럼 보입니다. 하지만 실제 원인은 platform이 ACPI table을 올바르게 구성하지 못한 것입니다.