• Home
  • History
  • Annotate
Name Date Size #Lines LOC

..--

src/03-Aug-2024-6539

CMakeLists.txtD03-Aug-2024187 95

README.rstD03-Aug-20242.8 KiB12184

prj.confD03-Aug-2024139 107

sample.yamlD03-Aug-2024333 1816

README.rst

1.. zephyr:code-sample:: edac
2   :name: EDAC shell
3   :relevant-api: edac
4
5   Test error detection and correction (EDAC) using shell commands.
6
7Overview
8********
9
10This sample demonstrates the :ref:`EDAC driver API <edac_api>` in a simple EDAC shell sample.
11
12Building and Running
13********************
14
15This sample can be found under :zephyr_file:`samples/subsys/edac` in the
16Zephyr tree.
17The sample can be built as follows for the :ref:`intel_ehl_crb` board:
18
19.. zephyr-app-commands::
20   :zephyr-app: samples/subsys/edac
21   :host-os: unix
22   :board: intel_ehl_crb
23   :goals: build
24   :compact:
25
26The Zephyr image that's created can be run on the :ref:`intel_ehl_crb` board
27as per the instructions in the board documentation. Check out the
28:ref:`intel_ehl_crb` for details.
29
30Sample output
31*************
32
33Getting help
34============
35
36After the application has started help can be read with the following
37command:
38
39.. code-block:: console
40
41   uart:~$ edac -h
42   edac - EDAC information
43   Subcommands:
44     info    :Show EDAC information
45              edac info <subcommands>
46     inject  :Inject ECC error commands
47              edac inject <subcommands>
48
49Help for subcommand info can be read with:
50
51.. code-block:: console
52
53   uart:~$ edac info -h
54   info - Show EDAC information
55          edac info <subcommands>
56   Subcommands:
57     ecc_error     :ECC Error Show / Clear commands
58     parity_error  :Parity Error Show / Clear commands
59
60Injection help can be received with:
61
62.. code-block:: console
63
64   uart:~$ edac inject -h
65   inject - Inject ECC error commands
66            edac inject <subcommands>
67   Subcommands:
68     addr          :Get / Set physical address
69     mask          :Get / Set address mask
70     trigger       :Trigger injection
71     error_type    :Get / Set injection error type
72     disable_nmi   :Disable NMI
73     enable_nmi    :Enable NMI
74     test_default  :Test default injection parameters
75
76Testing Error Injection
77=======================
78
79Set Error Injection parameters with:
80
81.. code-block:: console
82
83   uart:~$ edac inject addr 0x1000
84   Set injection address base to: 0x1000
85
86   uart:~$ edac inject mask 0x7fffffffc0
87   Set injection address mask to 7fffffffc0
88
89   uart:~$ edac inject error_type correctable
90   Set injection error type: correctable
91
92Trigger injection with:
93
94.. code-block:: console
95
96   uart:~$ edac inject trigger
97   Triggering injection
98
99Now Read / Write to the injection address to trigger Error Injection with
100following devmem commands:
101
102.. code-block:: console
103
104   uart:~$ devmem 0x1000 32 0xabcd
105   Mapped 0x1000 to 0x2ffcf000
106
107   Using data width 32
108   Writing value 0xabcd
109
110   uart:~$ devmem 0x1000
111   Mapped 0x1000 to 0x2ffce000
112
113   Using data width 32
114   Read value 0xabcd
115
116We should get the following message on screen indicating an IBECC event:
117
118.. code-block:: none
119
120   Got notification about IBECC event
121