Aaron Durbin has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/34929 )
Change subject: arch/x86: Fix spinlocks for cases of __PRE_RAM__ ......................................................................
Patch Set 3:
(1 comment)
https://review.coreboot.org/c/coreboot/+/34929/3/src/arch/x86/include/arch/s... File src/arch/x86/include/arch/smp/spinlock.h:
https://review.coreboot.org/c/coreboot/+/34929/3/src/arch/x86/include/arch/s... PS3, Line 39: ENV_STAGE_HAS_DATA_SECTION Even if a stage has a data section (say we add that ability to CAR stages: bootblock, verstage, romstage), it's not enough to allow locking bus transactions. I suspect we'll need to try things on a case by case basis because performing atomic instructions on CAR-backed variables might not work on every platform. Something to keep in mind. The other thing to think about here is if we would want spinlocks enabled for every stage just because it has a data section. I'm not sure that's necessarily the case. We probably should break out those things.