Skip to content

Commit db52630

Browse files
Neha Malcom Francisuditkumarti
authored andcommitted
feat(linux): Add guide on triggering BIST
Add a How-To Guide for triggering BIST on a core from A72 SPL. Signed-off-by: Neha Malcom Francis <[email protected]>
1 parent e2b6392 commit db52630

File tree

3 files changed

+142
-0
lines changed

3 files changed

+142
-0
lines changed

configs/J784S4/J784S4_linux_toc.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -133,4 +133,5 @@ linux/How_to_Guides/Host/How_to_Build_a_Ubuntu_Linux_host_under_VMware
133133
linux/How_to_Guides_Hardware_Setup_with_CCS
134134
linux/How_to_Guides/Hardware_Setup_with_CCS/J784S4_EVM_Hardware_Setup
135135
linux/How_to_Guides/Hardware_Setup_with_CCS/AM69_SK_EVM_Hardware_Setup
136+
linux/How_to_Guides/FAQ/How_to_run_BIST_on_a_core
136137
linux/Documentation_Tarball
Lines changed: 140 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,140 @@
1+
##############################
2+
How to trigger BIST on a core?
3+
##############################
4+
5+
Built-in Self-test (BIST) is a feature that allows self testing of the memory
6+
areas and logic circuitry in an Integrated Circuit (IC) without any external
7+
test equipment. In an embedded system, these tests are typically used during
8+
boot time or shutdown of the system to check the health of an SoC.
9+
PBIST is used to test the memory regions in the SoC and provides detection for
10+
permanent faults. The primary use case for PBIST is when it is invoked at
11+
start-up providing valuable information on any stuck-at bits in the memory.
12+
LBIST is used to test the logic circuitry in an SoC associated with the CPU
13+
cores. There are multiple LBIST instances in the SoC, and each has a different
14+
processor core associated with it. There are LBIST tests that can be
15+
software-initiated.
16+
17+
- Current implementation triggers the BIST tests on the MAIN_R5_2_x cores.
18+
19+
- LBIST/PBIST checks of the WKUP_DMSC0 and MCU_R5FSS0 cores and memories are
20+
run in the WKUP/MCU domain; this check is part of HW POST. HW POST runs in
21+
hardware, before the ROM code starts and can be selected by MCU_BOOTMODE[09:08]
22+
pins.
23+
24+
*********************************
25+
Steps to trigger BIST from U-Boot
26+
*********************************
27+
28+
- Enable the BIST config at A72 SPL stage:
29+
30+
.. code-block:: diff
31+
32+
diff --git a/configs/j784s4_evm_a72_defconfig b/configs/j784s4_evm_a72_defconfig
33+
index 52d12b6206b..1d2b4c3262f 100644
34+
--- a/configs/j784s4_evm_a72_defconfig
35+
+++ b/configs/j784s4_evm_a72_defconfig
36+
@@ -1,3 +1,4 @@
37+
+CONFIG_K3_BIST=y
38+
CONFIG_ARM=y
39+
CONFIG_ARCH_K3=y
40+
CONFIG_SYS_MALLOC_LEN=0x2000000
41+
42+
- Debug logs may be enabled if needed:
43+
44+
.. code-block:: diff
45+
46+
diff --git a/drivers/misc/k3_bist.c b/drivers/misc/k3_bist.c
47+
index fd3140add68..6668de93ab2 100644
48+
--- a/drivers/misc/k3_bist.c
49+
+++ b/drivers/misc/k3_bist.c
50+
@@ -6,7 +6,7 @@
51+
* Neha Malcom Francis <[email protected]>
52+
*
53+
*/
54+
-
55+
+#define LOG_DEBUG
56+
#include <dm.h>
57+
#include <errno.h>
58+
#include <clk.h>
59+
60+
- Rebuild A72 SPL image (tispl.bin) with the above changes to enable BIST tests
61+
to run on a particular core.
62+
63+
- While booting to the U-Boot prompt, your prints should be similar to the log
64+
below:
65+
66+
.. code-block:: console
67+
68+
U-Boot SPL 2025.01-00253-g9a3137c5c11a-dirty (Feb 28 2025 - 09:48:36 +0530)
69+
SYSFW ABI: 4.0 (firmware rev 0x000a '10.1.6--v10.01.06 (Fiery Fox)')
70+
Initialized 4 DRAM controllers
71+
SPL initial stack usage: 13440 bytes
72+
Trying to boot from MMC2
73+
Skipping authentication on GP device
74+
Skipping authentication on GP device
75+
Skipping authentication on GP device
76+
Skipping authentication on GP device
77+
Skipping authentication on GP device
78+
Loading Environment from nowhere... OK
79+
Starting ATF on ARM64 core...
80+
81+
NOTICE: BL31: v2.12.0(release):5227171c0-dirty
82+
NOTICE: BL31: Built : 13:45:40, Feb 3 2025
83+
I/TC:
84+
I/TC: OP-TEE version: 4.5.0-73-gef1ebdc23-dev (gcc version 13.3.0 (GCC)) #1 Tue Feb 4 11:33:18 UTC 2025 aarch64
85+
I/TC: WARNING: This OP-TEE configuration might be insecure!
86+
I/TC: WARNING: Please check https://optee.readthedocs.io/en/latest/architecture/porting_guidelines.html
87+
I/TC: Primary CPU initializing
88+
I/TC: GIC redistributor base address not provided
89+
I/TC: Assuming default GIC group status and modifier
90+
I/TC: SYSFW ABI: 4.0 (firmware rev 0x000a '10.1.6--v10.01.06 (Fiery Fox)')
91+
I/TC: Activated SA2UL device
92+
I/TC: Fixing SA2UL firewall owner for GP device
93+
I/TC: Enabled firewalls for SA2UL TRNG device
94+
I/TC: SA2UL TRNG initialized
95+
I/TC: SA2UL Drivers initialized
96+
I/TC: HUK Initialized
97+
I/TC: Primary CPU switching to normal world boot
98+
99+
U-Boot SPL 2025.01-00253-g9a3137c5c11a-dirty (Feb 28 2025 - 09:48:54 +0530)
100+
SYSFW ABI: 4.0 (firmware rev 0x000a '10.1.6--v10.01.06 (Fiery Fox)')
101+
k3_bist_probe(dev=8047a548)
102+
check_post_pbist_result: HW POST PBIST completed, test passed
103+
check_post_lbist_result: HW POST LBIST completed, test passed
104+
lbist_start(dev=8047a548): LBIST is running
105+
Trying to boot from MMC2
106+
Skipping authentication on GP device
107+
Skipping authentication on GP device
108+
109+
110+
U-Boot 2025.01-00253-g9a3137c5c11a-dirty (Feb 28 2025 - 09:48:54 +0530)
111+
112+
SoC: J784S4 SR1.0 GP
113+
Model: Texas Instruments J784S4 EVM
114+
DRAM: 2 GiB (effective 32 GiB)
115+
Core: 143 devices, 35 uclasses, devicetree: separate
116+
Flash: 0 Bytes
117+
MMC: mmc@4f80000: 0, mmc@4fb0000: 1
118+
Loading Environment from nowhere... OK
119+
In: serial@2880000
120+
Out: serial@2880000
121+
Err: serial@2880000
122+
am65_cpsw_nuss ethernet@46000000: K3 CPSW: nuss_ver: 0x6BA02102 cpsw_ver: 0x6BA82102 ale_ver: 0x00293904 Ports:1
123+
Net: eth0: ethernet@46000000port@1
124+
Hit any key to stop autoboot: 0
125+
=>
126+
127+
128+
- Run and load firmware on the core as usual:
129+
130+
.. code-block:: console
131+
132+
=> rproc init
133+
k3_r5f_rproc r5f@41000000: Core 1 is already in use. No rproc commands work
134+
k3_r5f_rproc r5f@41400000: Core 2 is already in use. No rproc commands work
135+
=> load mmc 1:2 0x90000000 /lib/firmware/j784s4-main-r5f2_0-fw
136+
80600 bytes read in 37 ms (2.1 MiB/s)
137+
=> rproc load 6 0x90000000 0x${filesize}
138+
Load Remote Processor 6 with data@addr=0x90000000 80600 bytes: Success!
139+
=> rproc start 6
140+
=>

source/linux/How_to_Guides_Developer_Notes.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,3 +48,4 @@ Developer Notes
4848
How_to_Guides/Host/Minimal_Platform_Development
4949
How_to_Guides/Host/Program_MMC_boot_media
5050
How_to_Guides/FAQ/Tda4_Latest_FAQs
51+
How_to_Guides/FAQ/How_to_run_BIST_on_a_core

0 commit comments

Comments
 (0)