← Documents Documentation/devicetree/bindings/arm/firmware/sdei.txt GitHub 원문 ↗

Linux 6.18.37 · Devicetree Bindings

Software Delegated Exception Interface

SDEI firmware event notification, register calling convention과 SMC/HVC invocation binding을 설명합니다.

Source pathDocumentation/devicetree/bindings/arm/firmware/sdei.txt
Source versionLinux v6.18.37
TranslationDUJINLABS 전문 번역 + 해설

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

1. 요약·해설

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

요약과 해설

sdei.txt:1-42

SDEI는 firmware-first error와 firmware-assisted NMI event를 kernel callback으로 전달하며 /firmware 아래 node의 method로 SMC 또는 HVC를 선택합니다.

2. 영어 원문 전체

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

원문 전체 펼치기
1 * Software Delegated Exception Interface (SDEI)
2
3 Firmware implementing the SDEI functions described in ARM document number
4 ARM DEN 0054A ("Software Delegated Exception Interface") can be used by
5 Linux to receive notification of events such as those generated by
6 firmware-first error handling, or from an IRQ that has been promoted to
7 a firmware-assisted NMI.
8
9 The interface provides a number of API functions for registering callbacks
10 and enabling/disabling events. Functions are invoked by trapping to the
11 privilege level of the SDEI firmware (specified as part of the binding
12 below) and passing arguments in a manner specified by the "SMC Calling
13 Convention (ARM DEN 0028B):
14
15 r0 => 32-bit Function ID / return value
16 {r1 - r3} => Parameters
17
18 Note that the immediate field of the trapping instruction must be set
19 to #0.
20
21 The SDEI_EVENT_REGISTER function registers a callback in the kernel
22 text to handle the specified event number.
23
24 The sdei node should be a child node of '/firmware' and have required
25 properties:
26
27 - compatible : should contain:
28 * "arm,sdei-1.0" : For implementations complying to SDEI version 1.x.
29
30 - method : The method of calling the SDEI firmware. Permitted
31 values are:
32 * "smc" : SMC #0, with the register assignments specified in this
33 binding.
34 * "hvc" : HVC #0, with the register assignments specified in this
35 binding.
36 Example:
37 firmware {
38 sdei {
39 compatible = "arm,sdei-1.0";
40 method = "smc";
41 };
42 };
43

3. 한국어 전문 번역

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

SDEI event notification과 calling convention

1-23

Software Delegated Exception Interface, 즉 SDEI

ARM DEN 0054A `Software Delegated Exception Interface`에 설명된 SDEI function을 구현하는 firmware를 사용하면 Linux가 firmware-first error handling에서 생성된 event나 firmware-assisted NMI로 승격된 IRQ의 notification을 받을 수 있습니다.

이 interface는 callback 등록과 event enable/disable을 위한 여러 API function을 제공합니다. Function은 binding에 지정된 SDEI firmware privilege level로 trap하고 ARM DEN 0028B `SMC Calling Convention`에 정의된 방식으로 argument를 전달해 호출합니다.

 r0                => 32-bit Function ID / return value
{r1 - r3}        => Parameters

Trapping instruction의 immediate field는 반드시 `#0`이어야 합니다.

`SDEI_EVENT_REGISTER` function은 지정된 event number를 처리할 callback을 kernel text에 등록합니다.

SDEI register calling convention
Register전달 값
r032-bit Function ID 또는 return value
r1-r3Parameters
Trap immediate#0

32-bit SDEI call에서 register가 담당하는 값을 구조화했습니다.

Firmware child node와 invocation method

24-42

`sdei` node는 `/firmware`의 child node여야 하며 아래 property가 필요합니다.

`compatible`은 SDEI version 1.x를 준수하는 구현을 나타내는 `arm,sdei-1.0`을 포함해야 합니다.

`method`는 SDEI firmware를 호출하는 방법입니다. 허용 값 `smc`는 이 binding의 register assignment와 함께 `SMC #0`을 사용하고, `hvc`는 같은 assignment와 함께 `HVC #0`을 사용합니다.

Firmware 아래 SDEI node를 배치한 예

firmware {
        sdei {
                compatible        = "arm,sdei-1.0";
                method                = "smc";
        };
};
SDEI event 처리 흐름
Firmware eventfirmware-first error 또는 promoted IRQ
SMC #0 / HVC #0SDEI privilege level로 trap
SDEI firmwareevent dispatch
SDEI_EVENT_REGISTER callbackKernel text handler 실행

Firmware event notification이 kernel callback으로 이어지는 경로입니다.