Part 1
요약·해설
주소·mask·error type 설정부터 trigger와 notification까지 exact output을 보존합니다.
intel_ehl_crb
Correctable ECC
IBECC notification
Part 2
접을 수 있는 영어 원문 전체
영어 원문 전체 펼치기
033EE780A1FC24AB8A7D150660E9C9520DCD3724FCCFD2F736D1F583328F60FD
.. zephyr:code-sample:: edac
:name: EDAC shell
:relevant-api: edac
Test error detection and correction (EDAC) using shell commands.
Overview
********
This sample demonstrates the :ref:`EDAC driver API <edac_api>` in a simple EDAC shell sample.
Building and Running
********************
This sample can be found under :zephyr_file:`samples/subsys/edac` in the
Zephyr tree.
The sample can be built as follows for the :ref:`intel_ehl_crb` board:
.. zephyr-app-commands::
:zephyr-app: samples/subsys/edac
:host-os: unix
:board: intel_ehl_crb
:goals: build
:compact:
The Zephyr image that's created can be run on the :ref:`intel_ehl_crb` board
as per the instructions in the board documentation. Check out the
:ref:`intel_ehl_crb` for details.
Sample output
*************
Getting help
============
After the application has started help can be read with the following
command:
.. code-block:: console
uart:~$ edac -h
edac - EDAC information
Subcommands:
info :Show EDAC information
edac info <subcommands>
inject :Inject ECC error commands
edac inject <subcommands>
Help for subcommand info can be read with:
.. code-block:: console
uart:~$ edac info -h
info - Show EDAC information
edac info <subcommands>
Subcommands:
ecc_error :ECC Error Show / Clear commands
parity_error :Parity Error Show / Clear commands
Injection help can be received with:
.. code-block:: console
uart:~$ edac inject -h
inject - Inject ECC error commands
edac inject <subcommands>
Subcommands:
addr :Get / Set physical address
mask :Get / Set address mask
trigger :Trigger injection
error_type :Get / Set injection error type
disable_nmi :Disable NMI
enable_nmi :Enable NMI
test_default :Test default injection parameters
Testing Error Injection
=======================
Set Error Injection parameters with:
.. code-block:: console
uart:~$ edac inject addr 0x1000
Set injection address base to: 0x1000
uart:~$ edac inject mask 0x7fffffffc0
Set injection address mask to 7fffffffc0
uart:~$ edac inject error_type correctable
Set injection error type: correctable
Trigger injection with:
.. code-block:: console
uart:~$ edac inject trigger
Triggering injection
Now Read / Write to the injection address to trigger Error Injection with
following devmem commands:
.. code-block:: console
uart:~$ devmem 0x1000 32 0xabcd
Mapped 0x1000 to 0x2ffcf000
Using data width 32
Writing value 0xabcd
uart:~$ devmem 0x1000
Mapped 0x1000 to 0x2ffce000
Using data width 32
Read value 0xabcd
We should get the following message on screen indicating an IBECC event:
.. code-block:: none
Got notification about IBECC event
Part 3
한국어 전문 번역
개요
간단한 EDAC shell sample에서 EDAC(Error Detection And Correction) driver API, 즉 EDAC driver API를 시험합니다. Shell command로 ECC·parity 상태를 조회하고, 지정한 physical address에 correctable error를 주입해 hardware notification까지 확인합니다.
빌드 및 실행
Sample은 Zephyr tree의 samples/subsys/edac에 있습니다. Elkhart Lake CRB(intel_ehl_crb)용 image는 다음과 같이 build합니다.
west build -b intel_ehl_crb samples/subsys/edac
생성된 Zephyr image는 intel_ehl_crb board 문서의 절차에 따라 실제 board에서 실행합니다.
Sample 출력
도움말 보기
Application이 시작되면 다음 command로 최상위 EDAC 도움말을 읽을 수 있습니다. info는 EDAC 정보를 표시하고 inject는 ECC error injection을 제어합니다.
uart:~$ edac -h
edac - EDAC information
Subcommands:
info :Show EDAC information
edac info <subcommands>
inject :Inject ECC error commands
edac inject <subcommands>
info의 하위 command 도움말에는 ECC error와 parity error를 표시하거나 지우는 작업이 나옵니다.
uart:~$ edac info -h
info - Show EDAC information
edac info <subcommands>
Subcommands:
ecc_error :ECC Error Show / Clear commands
parity_error :Parity Error Show / Clear commands
Injection 도움말은 physical address·address mask·error type의 조회/설정, injection trigger, NMI enable/disable, 기본 parameter test를 제공합니다.
uart:~$ edac inject -h
inject - Inject ECC error commands
edac inject <subcommands>
Subcommands:
addr :Get / Set physical address
mask :Get / Set address mask
trigger :Trigger injection
error_type :Get / Set injection error type
disable_nmi :Disable NMI
enable_nmi :Enable NMI
test_default :Test default injection parameters
Error injection 시험
먼저 injection base address를 0x1000, address mask를 0x7fffffffc0, error type을 correctable로 설정합니다.
uart:~$ edac inject addr 0x1000
Set injection address base to: 0x1000
uart:~$ edac inject mask 0x7fffffffc0
Set injection address mask to 7fffffffc0
uart:~$ edac inject error_type correctable
Set injection error type: correctable
설정이 끝나면 injection을 trigger합니다.
uart:~$ edac inject trigger
Triggering injection
그다음 devmem으로 injection address 0x1000에 32-bit 값 0xabcd를 쓰고 다시 읽습니다. 표시되는 mapped virtual address는 이 예제 실행의 값입니다.
uart:~$ devmem 0x1000 32 0xabcd
Mapped 0x1000 to 0x2ffcf000
Using data width 32
Writing value 0xabcd
uart:~$ devmem 0x1000
Mapped 0x1000 to 0x2ffce000
Using data width 32
Read value 0xabcd
Error injection이 발생하면 화면에 다음 IBECC event notification이 표시되어야 합니다.
Got notification about IBECC event
Source
출처
영어 원문에는 문단, 문서 지시문, 표, 코드, 코드 심벌, 경로를 그대로 보존했습니다.