diff --git a/src/arch/x86/include/arch/acpi.h b/src/arch/x86/include/arch/acpi.h index 42e45fb32f..6cd4e9fae8 100644 --- a/src/arch/x86/include/arch/acpi.h +++ b/src/arch/x86/include/arch/acpi.h @@ -974,7 +974,7 @@ static inline int acpi_s3_resume_allowed(void) #if CONFIG(HAVE_ACPI_RESUME) -#ifdef __PRE_RAM__ +#if ENV_ROMSTAGE_OR_BEFORE static inline int acpi_is_wakeup_s3(void) { return (acpi_get_sleep_type() == ACPI_S3); diff --git a/src/include/cpu/amd/mtrr.h b/src/include/cpu/amd/mtrr.h index f6b213e69d..edbf7bb2aa 100644 --- a/src/include/cpu/amd/mtrr.h +++ b/src/include/cpu/amd/mtrr.h @@ -38,7 +38,7 @@ #define TOP_MEM_MASK 0x007fffff #define TOP_MEM_MASK_KB (TOP_MEM_MASK >> 10) -#if !defined(__PRE_RAM__) && !defined(__ASSEMBLER__) +#if !defined(__ROMCC__) && !defined(__ASSEMBLER__) #include diff --git a/src/include/cpu/x86/cache.h b/src/include/cpu/x86/cache.h index 7f135e5390..713ca323a8 100644 --- a/src/include/cpu/x86/cache.h +++ b/src/include/cpu/x86/cache.h @@ -84,9 +84,7 @@ static __always_inline void disable_cache(void) wbinvd(); } -#if !defined(__PRE_RAM__) void x86_enable_cache(void); -#endif #endif /* !__ASSEMBLER__ */ #endif /* CPU_X86_CACHE */ diff --git a/src/include/cpu/x86/lapic.h b/src/include/cpu/x86/lapic.h index 2f40742e03..6fd1997e76 100644 --- a/src/include/cpu/x86/lapic.h +++ b/src/include/cpu/x86/lapic.h @@ -58,8 +58,6 @@ static __always_inline void stop_this_cpu(void) void stop_this_cpu(void); #endif -#if !defined(__PRE_RAM__) - #define xchg(ptr, v) ((__typeof__(*(ptr)))__xchg((unsigned long)(v), (ptr), \ sizeof(*(ptr)))) @@ -132,6 +130,4 @@ static inline void setup_lapic(void) struct device; int start_cpu(struct device *cpu); -#endif /* !__PRE_RAM__ */ - #endif /* CPU_X86_LAPIC_H */