rules.h, thread.h, lib/cbfs: Add ENV_STAGE_SUPPORTS_COOP

This change consolidates the COOP rules. Co-op in theory works in all
x86 stages now, but it hasn't been enabled yet.

BUG=b:179699789
TEST=Boot guybrush to OS and verify preloads still work

Signed-off-by: Raul E Rangel <rrangel@chromium.org>
Change-Id: I1197406d1d36391998b08e3076146bb2fff59d00
Reviewed-on: https://review.coreboot.org/c/coreboot/+/59550
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Julius Werner <jwerner@chromium.org>
This commit is contained in:
Raul E Rangel
2021-11-22 13:43:49 -07:00
committed by Felix Held
parent af54d7d0dd
commit d8f07c1f35
3 changed files with 9 additions and 2 deletions

View File

@ -303,6 +303,13 @@
/* When set <arch/smp/spinlock.h> is included for the spinlock implementation. */
#define ENV_STAGE_SUPPORTS_SMP (CONFIG(SMP) && STAGE_HAS_SPINLOCKS)
#if ENV_X86 && CONFIG(COOP_MULTITASKING) && (ENV_RAMSTAGE || ENV_ROMSTAGE)
/* TODO: Enable in all x86 stages */
#define ENV_STAGE_SUPPORTS_COOP 1
#else
#define ENV_STAGE_SUPPORTS_COOP 0
#endif
/**
* For pre-DRAM stages and post-CAR always build with simple device model, ie.
* PCI, PNP and CPU functions operate without use of devicetree. The reason