tools/chainload: Determine boot CPU by cpu[N].state ADT property

Signed-off-by: Janne Grunau <j@jannau.net>
This commit is contained in:
Janne Grunau 2024-10-25 17:24:10 +02:00 committed by Hector Martin
parent a603b86e6b
commit eb8430ba7e

View file

@ -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)