arch/x86: add ENV_CACHE_AS_RAM
Add ENV_CACHE_AS_RAM to indicate to compilation units if cache-as-ram is employed for that particular stage. BUG=b:72728953 Change-Id: I06dfa7afe2d967229549090d5aa95455687b0bb9 Signed-off-by: Aaron Durbin <adurbin@chromium.org> Reviewed-on: https://review.coreboot.org/25716 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Justin TerAvest <teravest@chromium.org>
This commit is contained in:
parent
3b16e78a9e
commit
1705d6546d
|
@ -20,7 +20,7 @@
|
|||
#include <stdlib.h>
|
||||
#include <rules.h>
|
||||
|
||||
#if defined(__PRE_RAM__) && IS_ENABLED(CONFIG_CACHE_AS_RAM)
|
||||
#if ENV_CACHE_AS_RAM
|
||||
asm(".section .car.global_data,\"w\",@nobits");
|
||||
asm(".previous");
|
||||
#ifdef __clang__
|
||||
|
|
|
@ -253,4 +253,12 @@
|
|||
#define __SIMPLE_DEVICE__
|
||||
#endif
|
||||
|
||||
/* x86 specific. Indicates that the current stage is running with cache-as-ram
|
||||
* enabled from the beginning of the stage in C code. */
|
||||
#if defined(__PRE_RAM__)
|
||||
#define ENV_CACHE_AS_RAM IS_ENABLED(CONFIG_CACHE_AS_RAM)
|
||||
#else
|
||||
#define ENV_CACHE_AS_RAM 0
|
||||
#endif
|
||||
|
||||
#endif /* _RULES_H */
|
||||
|
|
Loading…
Reference in New Issue