x86: qemu: Avoid accessing BSS too early
authorSimon Glass <sjg@chromium.org>
Sat, 15 Mar 2025 14:25:26 +0000 (14:25 +0000)
committerTom Rini <trini@konsulko.com>
Thu, 3 Apr 2025 17:41:55 +0000 (11:41 -0600)
commit6f18c59315ac3eed41a9a120546e2f93bcc38f94
tree09c94ccfc478f3f371c7cce779e3d3ee272d2921
parent6f30ae6cd6eb8f297a975daa82c9aa6292b56e8f
x86: qemu: Avoid accessing BSS too early

BSS is placed in DRAM which is actually available early with QEMU. But
it is cleared by the init sequence, so values stored there are lost.

Move the system-type flag into a function, instead.

Signed-off-by: Simon Glass <sjg@chromium.org>
arch/x86/cpu/qemu/qemu.c