|
| 1 | +.. _samples_edac: |
| 2 | + |
| 3 | +EDAC Shell Sample |
| 4 | +################# |
| 5 | + |
| 6 | +Overview |
| 7 | +******** |
| 8 | + |
| 9 | +This sample demonstrates the EDAC driver API in a simple EDAC shell sample. |
| 10 | + |
| 11 | +Building and Running |
| 12 | +******************** |
| 13 | + |
| 14 | +This project can be built and executed on as following example for the |
| 15 | +:ref:`ehl_crb` board: |
| 16 | + |
| 17 | +.. zephyr-app-commands:: |
| 18 | + :zephyr-app: samples/subsys/edac |
| 19 | + :host-os: unix |
| 20 | + :board: ehl_crb |
| 21 | + :goals: run |
| 22 | + :compact: |
| 23 | + |
| 24 | +Sample output |
| 25 | +************* |
| 26 | + |
| 27 | +Getting help |
| 28 | +============ |
| 29 | + |
| 30 | +After the application has started help can be read with the following |
| 31 | +command:: |
| 32 | + |
| 33 | + uart:~$ edac -h |
| 34 | + edac - EDAC information |
| 35 | + Subcommands: |
| 36 | + info :Show EDAC information |
| 37 | + edac info <subcommands> |
| 38 | + inject :Inject ECC error commands |
| 39 | + edac inject <subcommands> |
| 40 | + |
| 41 | +Help for subcommand info can be read with:: |
| 42 | + |
| 43 | + uart:~$ edac info -h |
| 44 | + info - Show EDAC information |
| 45 | + edac info <subcommands> |
| 46 | + Subcommands: |
| 47 | + ecc_error :ECC Error Show / Clear commands |
| 48 | + parity_error :Parity Error Show / Clear commands |
| 49 | + |
| 50 | +Injection help can be received with:: |
| 51 | + |
| 52 | + uart:~$ edac inject -h |
| 53 | + inject - Inject ECC error commands |
| 54 | + edac inject <subcommands> |
| 55 | + Subcommands: |
| 56 | + addr :Get / Set physical address |
| 57 | + mask :Get / Set address mask |
| 58 | + trigger :Trigger injection |
| 59 | + error_type :Get / Set injection error type |
| 60 | + disable_nmi :Disable NMI |
| 61 | + enable_nmi :Enable NMI |
| 62 | + test_default :Test default injection parameters |
| 63 | + |
| 64 | +Testing Error Injection |
| 65 | +======================= |
| 66 | + |
| 67 | +Set Error Injection parameters with:: |
| 68 | + |
| 69 | + uart:~$ edac inject addr 0x1000 |
| 70 | + Set injection address base to: 0x1000 |
| 71 | + |
| 72 | + uart:~$ edac inject mask 0x7fffffffc0 |
| 73 | + Set injection address mask to 7fffffffc0 |
| 74 | + |
| 75 | + uart:~$ edac inject error_type correctable |
| 76 | + Set injection error type: correctable |
| 77 | + |
| 78 | +Trigger injection with:: |
| 79 | + |
| 80 | + uart:~$ edac inject trigger |
| 81 | + Triggering injection |
| 82 | + |
| 83 | +Now Read / Write to the injection address to trigger Error Injection with |
| 84 | +following devmem commands:: |
| 85 | + |
| 86 | + uart:~$ devmem 0x1000 32 0xabcd |
| 87 | + Mapped 0x1000 to 0x2ffcf000 |
| 88 | + |
| 89 | + Using data width 32 |
| 90 | + Writing value 0xabcd |
| 91 | + |
| 92 | + uart:~$ devmem 0x1000 |
| 93 | + Mapped 0x1000 to 0x2ffce000 |
| 94 | + |
| 95 | + Using data width 32 |
| 96 | + Read value 0xabcd |
| 97 | + |
| 98 | +We should get the following message on screen indicating an IBECC event:: |
| 99 | + |
| 100 | + Got notification about IBECC event |
0 commit comments