Makefiles: Remove -D__PRE_RAM__

All cases of testing for __PRE_RAM__ have been converted
to equivalent ENV_xxx definitions from <rules.h>.

Change-Id: Ib6cd598f17109cc1072818cebe4791f7410c3428
Signed-off-by: Kyösti Mälkki <kyosti.malkki@gmail.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/37075
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Arthur Heymans <arthur@aheymans.xyz>
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
diff --git a/Makefile.inc b/Makefile.inc
index fdbbdee..dc5272e 100644
--- a/Makefile.inc
+++ b/Makefile.inc
@@ -182,9 +182,9 @@
 	$(eval $(d)ramstage.a: $(call files-in-dir,$(d),$(filter-out %.ld,$(1))); rm -f $$@ && $(AR_ramstage) rcsT $$@ $$^ ) \
 	$(eval ramstage-objs:=$(d)ramstage.a $(filter-out $(filter-out %.ld, $(call files-in-dir,$(d),$(1))),$(ramstage-objs))))
 
-decompressor-generic-ccopts += -D__PRE_RAM__ -D__DECOMPRESSOR__
-bootblock-generic-ccopts += -D__PRE_RAM__ -D__BOOTBLOCK__
-romstage-generic-ccopts += -D__PRE_RAM__ -D__ROMSTAGE__
+decompressor-generic-ccopts += -D__DECOMPRESSOR__
+bootblock-generic-ccopts += -D__BOOTBLOCK__
+romstage-generic-ccopts += -D__ROMSTAGE__
 ramstage-generic-ccopts += -D__RAMSTAGE__
 ifeq ($(CONFIG_TRACE),y)
 ramstage-c-ccopts += -finstrument-functions
diff --git a/src/arch/x86/Makefile.inc b/src/arch/x86/Makefile.inc
index 737f254..6f47e88 100644
--- a/src/arch/x86/Makefile.inc
+++ b/src/arch/x86/Makefile.inc
@@ -147,9 +147,9 @@
 bootblock-y += bootblock.ld
 $(call src-to-obj,bootblock,$(dir)/bootblock.ld): $(objgenerated)/bootblock.ld
 
-bootblock_romccflags := -mcpu=i386 -O2 -D__PRE_RAM__ -D__BOOTBLOCK__
+bootblock_romccflags := -mcpu=i386 -O2 -D__BOOTBLOCK__
 ifeq ($(CONFIG_SSE),y)
-bootblock_romccflags := -mcpu=k7 -mno-mmx -msse -O2 -D__PRE_RAM__ -D__BOOTBLOCK__
+bootblock_romccflags := -mcpu=k7 -mno-mmx -msse -O2 -D__BOOTBLOCK__
 endif
 
 # This is a hack in case there are no per chipset linker files.
@@ -165,9 +165,9 @@
 $(objgenerated)/bootblock.inc: $(src)/arch/x86/$(subst ",,$(CONFIG_BOOTBLOCK_SOURCE)) $(objutil)/romcc/romcc $(OPTION_TABLE_H) $(KCONFIG_AUTOHEADER)
 # The open quote in the subst messes with syntax highlighting. Fix it - ")
 	@printf "    ROMCC      $(subst $(obj)/,,$(@))\n"
-	$(CC_bootblock) -D__ROMCC__ -D__PRE_RAM__ -D__BOOTBLOCK__ $(CPPFLAGS_bootblock) -MM -MT$(objgenerated)/bootblock.inc \
+	$(CC_bootblock) -D__ROMCC__ -D__BOOTBLOCK__ $(CPPFLAGS_bootblock) -MM -MT$(objgenerated)/bootblock.inc \
 		$< > $(objgenerated)/bootblock.inc.d
-	$(CC_bootblock) -D__ROMCC__ -D__PRE_RAM__ -D__BOOTBLOCK__ $(CPPFLAGS_bootblock) -E \
+	$(CC_bootblock) -D__ROMCC__ -D__BOOTBLOCK__ $(CPPFLAGS_bootblock) -E \
 		$< -o $(objgenerated)/bootblock_romcc.c
 	$(ROMCC) -c -S $(bootblock_romccflags) -I. $(CPPFLAGS_bootblock) $< -o $@
 
diff --git a/src/security/vboot/Makefile.inc b/src/security/vboot/Makefile.inc
index 30c947c..010a06c 100644
--- a/src/security/vboot/Makefile.inc
+++ b/src/security/vboot/Makefile.inc
@@ -22,12 +22,6 @@
 verstage-y += bootmode.c
 postcar-y += bootmode.c
 
-# When VBOOT_STARTS_IN_ROMSTAGE is selected, DRAM is already up by
-# the time verstage runs.
-ifneq ($(CONFIG_VBOOT_STARTS_IN_ROMSTAGE),y)
-verstage-generic-ccopts += -D__PRE_RAM__
-endif
-
 verstage-generic-ccopts += -D__VERSTAGE__
 
 ramstage-y += gbb.c
diff --git a/toolchain.inc b/toolchain.inc
index af085b4..c3aa3e5 100644
--- a/toolchain.inc
+++ b/toolchain.inc
@@ -70,7 +70,7 @@
 # stack use, we use 1.5K as heuristic, assuming that we typically have lots
 # of tiny stack frames and the odd large one.
 #
-# Store larger buffers in BSS, use MAYBE_STATIC_BSS to share code with __PRE_RAM__
+# Store larger buffers in BSS, use MAYBE_STATIC_BSS to share data in cache-as-ram
 # on x86.
 # Since GCCs detection of dynamic array bounds unfortunately seems to be
 # very basic, you'll sometimes have to use a static upper bound for the