Author: stepan Date: Sun Apr 10 06:15:23 2011 New Revision: 6482 URL: https://tracker.coreboot.org/trac/coreboot/changeset/6482
Log: In 2007 Adrian Reber suggested that we drop ASSEMBLY in favor of __ASSEMBLER__. http://www.coreboot.org/pipermail/coreboot/2007-September/024665.html
It's about time we follow this advice.
Also move some manually set __PRE_RAM__ defines (ap_romstage.c) to the Makefile and drop unused CPP define
Signed-off-by: Stefan Reinauer stefan.reinauer@coreboot.org Acked-by: Patrick Georgi patrick@georgi-clan.de
Modified: trunk/Makefile trunk/Makefile.inc trunk/src/arch/x86/Makefile.bigbootblock.inc trunk/src/arch/x86/Makefile.bootblock.inc trunk/src/arch/x86/Makefile.inc trunk/src/include/cpu/amd/gx2def.h trunk/src/include/cpu/amd/lxdef.h trunk/src/include/cpu/amd/mtrr.h trunk/src/include/cpu/x86/mtrr.h trunk/src/include/fallback.h trunk/src/mainboard/amd/serengeti_cheetah/ap_romstage.c trunk/src/mainboard/gigabyte/ga_2761gxdk/ap_romstage.c trunk/src/mainboard/gigabyte/m57sli/ap_romstage.c trunk/src/mainboard/msi/ms7260/ap_romstage.c trunk/src/mainboard/nvidia/l1_2pvv/ap_romstage.c trunk/src/mainboard/supermicro/h8dme/ap_romstage.c trunk/src/mainboard/supermicro/h8dmr/ap_romstage.c trunk/src/mainboard/tyan/s2912/ap_romstage.c trunk/src/southbridge/amd/cs5535/cs5535.h trunk/src/southbridge/amd/cs5536/cs5536.h trunk/src/southbridge/intel/i82371eb/i82371eb.h trunk/src/southbridge/intel/i82801gx/i82801gx.h trunk/util/xcompile/xcompile
Modified: trunk/Makefile ============================================================================== --- trunk/Makefile Tue Apr 5 15:00:33 2011 (r6481) +++ trunk/Makefile Sun Apr 10 06:15:23 2011 (r6482) @@ -64,7 +64,6 @@ endif endif
-CPP:= $(CC) -x assembler-with-cpp -DASSEMBLY -E HOSTCC = gcc HOSTCXX = g++ HOSTCFLAGS := -I$(srck) -I$(objk) -g
Modified: trunk/Makefile.inc ============================================================================== --- trunk/Makefile.inc Tue Apr 5 15:00:33 2011 (r6481) +++ trunk/Makefile.inc Sun Apr 10 06:15:23 2011 (r6482) @@ -50,10 +50,8 @@ # Add source classes and their build options classes-y := ramstage romstage driver smm
-ramstage-S-ccopts:=-DASSEMBLY romstage-c-ccopts:=-D__PRE_RAM__ -romstage-S-ccopts:=-DASSEMBLY -D__PRE_RAM__ -driver-S-ccopts:=-DASSEMBLY +romstage-S-ccopts:=-D__PRE_RAM__
ramstage-c-deps:=$$(OPTION_TABLE_H) romstage-c-deps:=$$(OPTION_TABLE_H) @@ -63,7 +61,7 @@ define ramstage-objs_asl_template $(obj)/$(1).ramstage.o: src/$(1).asl $(obj)/config.h @printf " IASL $$(subst $(top)/,,$$(@))\n" - $(CPP) -MMD -MT $$(@) -D__ACPI__ -P -include $(abspath $(obj)/config.h) -I$(src) -I$(src)/mainboard/$(MAINBOARDDIR) $$< -o $$(basename $$@).asl + $(CC) -x assembler-with-cpp -E -MMD -MT $$(@) -D__ACPI__ -P -include $(abspath $(obj)/config.h) -I$(src) -I$(src)/mainboard/$(MAINBOARDDIR) $$< -o $$(basename $$@).asl iasl -p $$(obj)/$(1) -tc $$(basename $$@).asl mv $$(obj)/$(1).hex $$(basename $$@).c $(CC) $$(CFLAGS) $$(if $$(subst dsdt,,$$(basename $$(notdir $(1)))), -DAmlCode=AmlCode_$$(basename $$(notdir $(1)))) -c -o $$@ $$(basename $$@).c
Modified: trunk/src/arch/x86/Makefile.bigbootblock.inc ============================================================================== --- trunk/src/arch/x86/Makefile.bigbootblock.inc Tue Apr 5 15:00:33 2011 (r6481) +++ trunk/src/arch/x86/Makefile.bigbootblock.inc Sun Apr 10 06:15:23 2011 (r6482) @@ -26,7 +26,7 @@
$(obj)/mainboard/$(MAINBOARDDIR)/crt0.s: $(obj)/crt0.S @printf " CC $(subst $(obj)/,,$(@))\n" - $(CC) -MMD -x assembler-with-cpp -DASSEMBLY -E -I$(src)/include -I$(src)/arch/x86/include -I$(obj) -include $(obj)/config.h -I. -I$(src) $< -o $@ + $(CC) -MMD -x assembler-with-cpp -E -I$(src)/include -I$(src)/arch/x86/include -I$(obj) -include $(obj)/config.h -I. -I$(src) $< -o $@
$(obj)/coreboot: $$(romstage-objs) $(obj)/ldscript.ld @printf " LINK $(subst $(obj)/,,$(@))\n"
Modified: trunk/src/arch/x86/Makefile.bootblock.inc ============================================================================== --- trunk/src/arch/x86/Makefile.bootblock.inc Tue Apr 5 15:00:33 2011 (r6481) +++ trunk/src/arch/x86/Makefile.bootblock.inc Sun Apr 10 06:15:23 2011 (r6482) @@ -55,7 +55,7 @@
$(obj)/mainboard/$(MAINBOARDDIR)/bootblock.s: $(obj)/bootblock/bootblock.S @printf " CC $(subst $(obj)/,,$(@))\n" - $(CC) -MMD -DASSEMBLY -E -I$(src)/include -I$(src)/arch/x86/include -I$(obj) -I$(obj)/bootblock -include $(obj)/config.h -I. -I$(src) $< -o $@ + $(CC) -MMD -x assembler-with-cpp -E -I$(src)/include -I$(src)/arch/x86/include -I$(obj) -I$(obj)/bootblock -include $(obj)/config.h -I. -I$(src) $< -o $@
$(obj)/mainboard/$(MAINBOARDDIR)/bootblock.inc: $(src)/arch/x86/init/$(subst ",,$(CONFIG_BOOTBLOCK_SOURCE)) $(objutil)/romcc/romcc $(OPTION_TABLE_H) @printf " ROMCC $(subst $(obj)/,,$(@))\n" @@ -105,5 +105,5 @@
$(obj)/mainboard/$(MAINBOARDDIR)/crt0.s: $(obj)/romstage/crt0.S @printf " CC $(subst $(obj)/,,$(@))\n" - $(CC) -MMD -x assembler-with-cpp -DASSEMBLY -E -I$(src)/include -I$(src)/arch/x86/include -I$(obj) -I$(obj)/romstage -include $(obj)/config.h -I. -I$(src) $< -o $@ + $(CC) -MMD -x assembler-with-cpp -E -I$(src)/include -I$(src)/arch/x86/include -I$(obj) -I$(obj)/romstage -include $(obj)/config.h -I. -I$(src) $< -o $@
Modified: trunk/src/arch/x86/Makefile.inc ============================================================================== --- trunk/src/arch/x86/Makefile.inc Tue Apr 5 15:00:33 2011 (r6481) +++ trunk/src/arch/x86/Makefile.inc Sun Apr 10 06:15:23 2011 (r6482) @@ -225,7 +225,7 @@
$(obj)/mainboard/$(MAINBOARDDIR)/ap_romstage.o: $(src)/mainboard/$(MAINBOARDDIR)/ap_romstage.c $(OPTION_TABLE_H) @printf " CC $(subst $(obj)/,,$(@))\n" - $(CC) -MMD $(CFLAGS) -I$(src) -I. -I$(obj) -c $(src)/mainboard/$(MAINBOARDDIR)/ap_romstage.c -o $@ + $(CC) -MMD $(CFLAGS) -I$(src) -D__PRE_RAM__ -I. -I$(obj) -c $< -o $@
$(obj)/mainboard/$(MAINBOARDDIR)/romstage.pre.inc: $(src)/mainboard/$(MAINBOARDDIR)/romstage.c $(OPTION_TABLE_H) $(obj)/build.h $(obj)/config.h @printf " CC romstage.inc\n"
Modified: trunk/src/include/cpu/amd/gx2def.h ============================================================================== --- trunk/src/include/cpu/amd/gx2def.h Tue Apr 5 15:00:33 2011 (r6481) +++ trunk/src/include/cpu/amd/gx2def.h Sun Apr 10 06:15:23 2011 (r6482) @@ -511,7 +511,7 @@ #define PMLogic_BASE (0x9D00)
-#if !defined(__ROMCC__) && !defined(ASSEMBLY) +#if !defined(__ROMCC__) && !defined(__ASSEMBLER__) #if defined(__PRE_RAM__) void cpuRegInit(void); void SystemPreInit(void);
Modified: trunk/src/include/cpu/amd/lxdef.h ============================================================================== --- trunk/src/include/cpu/amd/lxdef.h Tue Apr 5 15:00:33 2011 (r6481) +++ trunk/src/include/cpu/amd/lxdef.h Sun Apr 10 06:15:23 2011 (r6482) @@ -630,7 +630,7 @@ #define DELAY_UPPER_DISABLE_CLK135 (1 << 23) #define DELAY_LOWER_STATUS_MASK 0x7C0
-#if !defined(__ROMCC__) && !defined(ASSEMBLY) +#if !defined(__ROMCC__) && !defined(__ASSEMBLER__) #if defined(__PRE_RAM__) void cpuRegInit(int debug_clock_disable, u8 dimm0, u8 dimm1, int terminated); void SystemPreInit(void);
Modified: trunk/src/include/cpu/amd/mtrr.h ============================================================================== --- trunk/src/include/cpu/amd/mtrr.h Tue Apr 5 15:00:33 2011 (r6481) +++ trunk/src/include/cpu/amd/mtrr.h Sun Apr 10 06:15:23 2011 (r6482) @@ -33,7 +33,7 @@ #define TOP_MEM_MASK 0x007fffff #define TOP_MEM_MASK_KB (TOP_MEM_MASK >> 10)
-#if !defined(__PRE_RAM__) && !defined(ASSEMBLY) +#if !defined(__PRE_RAM__) && !defined(__ASSEMBLER__) void amd_setup_mtrrs(void); #endif
Modified: trunk/src/include/cpu/x86/mtrr.h ============================================================================== --- trunk/src/include/cpu/x86/mtrr.h Tue Apr 5 15:00:33 2011 (r6481) +++ trunk/src/include/cpu/x86/mtrr.h Sun Apr 10 06:15:23 2011 (r6482) @@ -36,7 +36,7 @@ #define MTRRfix4K_F0000_MSR 0x26e #define MTRRfix4K_F8000_MSR 0x26f
-#if !defined (ASSEMBLY) && !defined(__PRE_RAM__) +#if !defined (__ASSEMBLER__) && !defined(__PRE_RAM__) #include <device/device.h> void enable_fixed_mtrr(void); void x86_setup_var_mtrrs(unsigned int address_bits, unsigned int above4gb); @@ -69,7 +69,7 @@ #endif
-#if !defined (ASSEMBLY) +#if !defined (__ASSEMBLER__) #if defined(CONFIG_XIP_ROM_SIZE) # if defined(CONFIG_TINY_BOOTBLOCK) && CONFIG_TINY_BOOTBLOCK extern unsigned long AUTO_XIP_ROM_BASE;
Modified: trunk/src/include/fallback.h ============================================================================== --- trunk/src/include/fallback.h Tue Apr 5 15:00:33 2011 (r6481) +++ trunk/src/include/fallback.h Sun Apr 10 06:15:23 2011 (r6482) @@ -1,12 +1,12 @@ #ifndef FALLBACK_H #define FALLBACK_H
-#if !defined(ASSEMBLY) && !defined(__PRE_RAM__) +#if !defined(__ASSEMBLER__) && !defined(__PRE_RAM__)
void set_boot_successful(void); void boot_successful(void);
-#endif /* ASSEMBLY */ +#endif /* __ASSEMBLER__ */
#define RTC_BOOT_BYTE 48
Modified: trunk/src/mainboard/amd/serengeti_cheetah/ap_romstage.c ============================================================================== --- trunk/src/mainboard/amd/serengeti_cheetah/ap_romstage.c Tue Apr 5 15:00:33 2011 (r6481) +++ trunk/src/mainboard/amd/serengeti_cheetah/ap_romstage.c Sun Apr 10 06:15:23 2011 (r6482) @@ -1,6 +1,3 @@ -#define ASSEMBLY 1 -#define __PRE_RAM__ - #define K8_REV_F_SUPPORT_F0_F1_WORKAROUND 0
#include <stdint.h>
Modified: trunk/src/mainboard/gigabyte/ga_2761gxdk/ap_romstage.c ============================================================================== --- trunk/src/mainboard/gigabyte/ga_2761gxdk/ap_romstage.c Tue Apr 5 15:00:33 2011 (r6481) +++ trunk/src/mainboard/gigabyte/ga_2761gxdk/ap_romstage.c Sun Apr 10 06:15:23 2011 (r6482) @@ -21,9 +21,6 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */
-#define ASSEMBLY 1 -#define __PRE_RAM__ - #define K8_REV_F_SUPPORT_F0_F1_WORKAROUND 0
#include <stdint.h>
Modified: trunk/src/mainboard/gigabyte/m57sli/ap_romstage.c ============================================================================== --- trunk/src/mainboard/gigabyte/m57sli/ap_romstage.c Tue Apr 5 15:00:33 2011 (r6481) +++ trunk/src/mainboard/gigabyte/m57sli/ap_romstage.c Sun Apr 10 06:15:23 2011 (r6482) @@ -19,9 +19,6 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */
-#define ASSEMBLY 1 -#define __PRE_RAM__ - #define K8_REV_F_SUPPORT_F0_F1_WORKAROUND 0
#include <stdint.h>
Modified: trunk/src/mainboard/msi/ms7260/ap_romstage.c ============================================================================== --- trunk/src/mainboard/msi/ms7260/ap_romstage.c Tue Apr 5 15:00:33 2011 (r6481) +++ trunk/src/mainboard/msi/ms7260/ap_romstage.c Sun Apr 10 06:15:23 2011 (r6482) @@ -19,10 +19,6 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */
-#define ASSEMBLY 1 - -#define __PRE_RAM__ - #define K8_REV_F_SUPPORT_F0_F1_WORKAROUND 0
#include <stdint.h>
Modified: trunk/src/mainboard/nvidia/l1_2pvv/ap_romstage.c ============================================================================== --- trunk/src/mainboard/nvidia/l1_2pvv/ap_romstage.c Tue Apr 5 15:00:33 2011 (r6481) +++ trunk/src/mainboard/nvidia/l1_2pvv/ap_romstage.c Sun Apr 10 06:15:23 2011 (r6482) @@ -19,9 +19,6 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */
-#define ASSEMBLY 1 -#define __PRE_RAM__ - #define K8_REV_F_SUPPORT_F0_F1_WORKAROUND 0
#include <stdint.h>
Modified: trunk/src/mainboard/supermicro/h8dme/ap_romstage.c ============================================================================== --- trunk/src/mainboard/supermicro/h8dme/ap_romstage.c Tue Apr 5 15:00:33 2011 (r6481) +++ trunk/src/mainboard/supermicro/h8dme/ap_romstage.c Sun Apr 10 06:15:23 2011 (r6482) @@ -19,9 +19,6 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */
-#define ASSEMBLY 1 -#define __PRE_RAM__ - #define K8_REV_F_SUPPORT_F0_F1_WORKAROUND 0
#include <stdint.h>
Modified: trunk/src/mainboard/supermicro/h8dmr/ap_romstage.c ============================================================================== --- trunk/src/mainboard/supermicro/h8dmr/ap_romstage.c Tue Apr 5 15:00:33 2011 (r6481) +++ trunk/src/mainboard/supermicro/h8dmr/ap_romstage.c Sun Apr 10 06:15:23 2011 (r6482) @@ -19,9 +19,6 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */
-#define ASSEMBLY 1 -#define __PRE_RAM__ - #define K8_REV_F_SUPPORT_F0_F1_WORKAROUND 0
#include <stdint.h>
Modified: trunk/src/mainboard/tyan/s2912/ap_romstage.c ============================================================================== --- trunk/src/mainboard/tyan/s2912/ap_romstage.c Tue Apr 5 15:00:33 2011 (r6481) +++ trunk/src/mainboard/tyan/s2912/ap_romstage.c Sun Apr 10 06:15:23 2011 (r6482) @@ -19,9 +19,6 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */
-#define ASSEMBLY 1 -#define __PRE_RAM__ - #define K8_REV_F_SUPPORT_F0_F1_WORKAROUND 0
#include <stdint.h>
Modified: trunk/src/southbridge/amd/cs5535/cs5535.h ============================================================================== --- trunk/src/southbridge/amd/cs5535/cs5535.h Tue Apr 5 15:00:33 2011 (r6481) +++ trunk/src/southbridge/amd/cs5535/cs5535.h Sun Apr 10 06:15:23 2011 (r6482) @@ -115,7 +115,7 @@ /* Flash Memory Mask values */ #define FLASH_MEM_4K 0xFFFFF000
-#if !defined(ASSEMBLY) && !defined(__ROMCC__) +#if !defined(__ASSEMBLER__) && !defined(__ROMCC__) #if defined(__PRE_RAM__) void cs5535_disable_internal_uart(void); #else
Modified: trunk/src/southbridge/amd/cs5536/cs5536.h ============================================================================== --- trunk/src/southbridge/amd/cs5536/cs5536.h Tue Apr 5 15:00:33 2011 (r6481) +++ trunk/src/southbridge/amd/cs5536/cs5536.h Sun Apr 10 06:15:23 2011 (r6482) @@ -442,7 +442,7 @@ #define FLASH_IO_128B 0x0000FF80 #define FLASH_IO_256B 0x0000FF00
-#if !defined(ASSEMBLY) && !defined(__ROMCC__) +#if !defined(__ASSEMBLER__) && !defined(__ROMCC__) #if defined(__PRE_RAM__) void cs5536_setup_onchipuart(int uart); void cs5536_disable_internal_uart(void);
Modified: trunk/src/southbridge/intel/i82371eb/i82371eb.h ============================================================================== --- trunk/src/southbridge/intel/i82371eb/i82371eb.h Tue Apr 5 15:00:33 2011 (r6481) +++ trunk/src/southbridge/intel/i82371eb/i82371eb.h Sun Apr 10 06:15:23 2011 (r6482) @@ -21,7 +21,7 @@ #ifndef SOUTHBRIDGE_INTEL_I82371EB_I82371EB_H #define SOUTHBRIDGE_INTEL_I82371EB_I82371EB_H
-#if !defined(ASSEMBLY) +#if !defined(__ASSEMBLER__) #if !defined(__PRE_RAM__) #if !defined(__ACPI__) /* dsdt include */
Modified: trunk/src/southbridge/intel/i82801gx/i82801gx.h ============================================================================== --- trunk/src/southbridge/intel/i82801gx/i82801gx.h Tue Apr 5 15:00:33 2011 (r6481) +++ trunk/src/southbridge/intel/i82801gx/i82801gx.h Sun Apr 10 06:15:23 2011 (r6482) @@ -38,7 +38,7 @@ #ifndef __ACPI__ #define DEBUG_PERIODIC_SMIS 0
-#if !defined(ASSEMBLY) && !defined(__ROMCC__) +#if !defined(__ASSEMBLER__) && !defined(__ROMCC__) #if !defined(__PRE_RAM__) #include "chip.h" extern void i82801gx_enable(device_t dev);
Modified: trunk/util/xcompile/xcompile ============================================================================== --- trunk/util/xcompile/xcompile Tue Apr 5 15:00:33 2011 (r6481) +++ trunk/util/xcompile/xcompile Sun Apr 10 06:15:23 2011 (r6482) @@ -89,7 +89,6 @@ # elf${TWIDTH}-${TARCH} toolchain AS:=${GCCPREFIX}as ${ASFLAGS} CC:=${GCCPREFIX}gcc ${CFLAGS} -CPP:=${GCCPREFIX}cpp AR:=${GCCPREFIX}ar LD:=${GCCPREFIX}ld ${LDFLAGS} STRIP:=${GCCPREFIX}strip