From eb8430ba7e1f059db949afdc15fed6b026378690 Mon Sep 17 00:00:00 2001 From: Janne Grunau Date: Fri, 25 Oct 2024 17:24:10 +0200 Subject: [PATCH] tools/chainload: Determine boot CPU by cpu[N].state ADT property Signed-off-by: Janne Grunau --- proxyclient/tools/chainload.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/proxyclient/tools/chainload.py b/proxyclient/tools/chainload.py index 12eac1c7..2639e531 100755 --- a/proxyclient/tools/chainload.py +++ b/proxyclient/tools/chainload.py @@ -85,7 +85,9 @@ for name in ("mtp", "aop"): print("Setting secondary CPU RVBARs...") rvbar = entry & ~0xfff -for cpu in u.adt["cpus"][1:]: +for cpu in u.adt["cpus"]: + if cpu.state == "running": + continue addr, size = cpu.cpu_impl_reg print(f" {cpu.name}: [0x{addr:x}] = 0x{rvbar:x}") p.write64(addr, rvbar)