summaryrefslogtreecommitdiff
path: root/util/kconfig/toada.c
diff options
context:
space:
mode:
authorArthur Heymans <arthur@aheymans.xyz>2023-05-17 17:37:17 +0200
committerFelix Held <felix-coreboot@felixheld.de>2023-05-25 13:08:43 +0000
commit67d95185865651aecb7ef3d8d343ec3cb9e60f77 (patch)
tree29916786c3824fe935a5bf52c5fd481e4008f922 /util/kconfig/toada.c
parent7dab99856d22ced1075471e4747d93c2dc6eec86 (diff)
arch/x86: Don't allow hw floating point operations
Even though coreboot does not allow floating point operations some compilers like clang generate code using hw floating point registers, e.g. SSE %XMMx registers on 64bit code by default. Floating point operations need to be enabled in hardware for this to work (CR4). Also in SMM we explicitly need to save and restore floating point registers for this reason. If we instruct the compiler to not generate code with FPU ops, this simplifies our code as we can skip that step. With clang this reduces the binary size a bit. For instance ramstage for qemu/Q35 drops from 216600 bytes decompressed to 212768. TEST: See that with x86_64 bit and clang coreboot reaches the payload without setting the CR4_OSFXSR bit in CR4. Without this change it would bootloop very early in the bootblock on Qemu Q35. Signed-off-by: Arthur Heymans <arthur@aheymans.xyz> Change-Id: Ib8590c55e7aed1ece2aa23b8ea99463396435e11 Reviewed-on: https://review.coreboot.org/c/coreboot/+/75316 Reviewed-by: Julius Werner <jwerner@chromium.org> Reviewed-by: Kyösti Mälkki <kyosti.malkki@gmail.com> Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Diffstat (limited to 'util/kconfig/toada.c')
0 files changed, 0 insertions, 0 deletions