From patchwork Sun Feb 13 21:52:10 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: (no subject) Date: Sun, 13 Feb 2011 21:52:10 -0000 From: Vibrans, Frank X-Patchwork-Id: 2631 Message-Id: <276EC11373289744A112A8FE66755067019CFD642E@SAUSEXMBP01.amd.com> To: "coreboot@coreboot.org" Add support for AMD Agesa wrapper code. Patch 5 of 8. This code fixes a number of build issues related to the AMD Agesa code. The particular issues are global variables existing in romstage and the use of GCC intrinsics in the build. The former issue will be addressed shortly, and the latter issue requires community assistance. This code is dependent on the AMD Family 14h mainboard code. Signed-off-by Frank Vibrans Acked-by: Stefan Reinauer Acked-by: Marc Jones --- Add support for AMD Agesa wrapper code. Patch 5 of 8. This code fixes a number of build issues related to the AMD Agesa code. The particular issues are global variables existing in romstage and the use of GCC intrinsics in the build. The former issue will be addressed shortly, and the latter issue requires community assistance. This code is dependent on the AMD Family 14h mainboard code. Signed-off-by Frank Vibrans Index: Official_coreboot/Makefile =================================================================== --- Official_coreboot.orig/Makefile 2011-02-13 12:15:58.046767872 -0800 +++ Official_coreboot/Makefile 2011-02-13 07:59:44.887087000 -0800 @@ -300,13 +300,16 @@ # abspath is a workaround for romcc INCLUDES += -include $(abspath $(obj)/config.h) -CFLAGS = $(INCLUDES) -Os -nostdinc -pipe -g +CFLAGS = $(INCLUDES) -Os -pipe -g CFLAGS += -nostdlib -Wall -Wundef -Wstrict-prototypes -Wmissing-prototypes CFLAGS += -Wwrite-strings -Wredundant-decls -Wno-trigraphs CFLAGS += -Wstrict-aliasing -Wshadow ifeq ($(CONFIG_WARNINGS_ARE_ERRORS),y) CFLAGS += -Werror endif +ifneq ($(CONFIG_AMD_AGESA),y) +CFLAGS += -nostdinc +endif CFLAGS += -fno-common -ffreestanding -fno-builtin -fomit-frame-pointer CBFS_COMPRESS_FLAG:=l Index: Official_coreboot/src/arch/x86/init/ldscript_fallback_cbfs.lb =================================================================== --- Official_coreboot.orig/src/arch/x86/init/ldscript_fallback_cbfs.lb 2011-02-13 12:15:57.986768686 -0800 +++ Official_coreboot/src/arch/x86/init/ldscript_fallback_cbfs.lb 2011-02-12 17:58:29.266797000 -0800 @@ -49,5 +49,6 @@ *(.comment.*) *(.note.*) } - _bogus = ASSERT((SIZEOF(.bss) + SIZEOF(.data)) == 0, "Do not use global variables in romstage"); +/* _bogus = ASSERT((SIZEOF(.bss) + SIZEOF(.data)) == 0, "Do not use global variables in romstage"); */ + _bogus = ASSERT((SIZEOF(.bss)) == 0, "Do not use global variables in romstage"); }