1f08c3bdfSopenharmony_ciTo verify the result of MCE testing, the MCE record from kernel (via
2f08c3bdfSopenharmony_ci/dev/mcelog or panic information) should be compared with reference
3f08c3bdfSopenharmony_ciMCE record (for software inject error: the input MCE record). To
4f08c3bdfSopenharmony_cicompare MCE record, the following scheme is proposed:
5f08c3bdfSopenharmony_ci
6f08c3bdfSopenharmony_ci- Define a standard MCE record representation format. It should be
7f08c3bdfSopenharmony_ci  human readable, compatible with MCE parser in mce-inject, easy to
8f08c3bdfSopenharmony_ci  manipulate in shell (such as remove a field), easy to compare
9f08c3bdfSopenharmony_ci  (literally).
10f08c3bdfSopenharmony_ci
11f08c3bdfSopenharmony_ci  One MCE record is as follow:
12f08c3bdfSopenharmony_ci
13f08c3bdfSopenharmony_ci  CPU NUMBER
14f08c3bdfSopenharmony_ci  BANK NUMBER
15f08c3bdfSopenharmony_ci  TSC NUMBER
16f08c3bdfSopenharmony_ci  RIP NUMBER
17f08c3bdfSopenharmony_ci  ADDR NUMBER
18f08c3bdfSopenharmony_ci  MISC NUMBER
19f08c3bdfSopenharmony_ci  STATUS NUMBER
20f08c3bdfSopenharmony_ci  MCGSTATUS NUMBER
21f08c3bdfSopenharmony_ci
22f08c3bdfSopenharmony_ci  Multiple MCE records are separated by one empty line.
23f08c3bdfSopenharmony_ci
24f08c3bdfSopenharmony_ci- Enhance mce-inject or develop a new tool to convert from other
25f08c3bdfSopenharmony_ci  format to standard format.
26f08c3bdfSopenharmony_ci
27f08c3bdfSopenharmony_ci- Develop a new tool based on /usr/sbin/mcelog to output mce-inject
28f08c3bdfSopenharmony_ci  compatible MCE record. Because there may be different (uncompatible
29f08c3bdfSopenharmony_ci  version) /usr/sbin/mcelog on different machine.
30f08c3bdfSopenharmony_ci
31f08c3bdfSopenharmony_ci- During verifying, firstly convert various MCE recoards from kernel
32f08c3bdfSopenharmony_ci  and reference MCE records to standard format, then compare the
33f08c3bdfSopenharmony_ci  standard format MCE records in shell.
34