From patchwork Fri May 6 02:43:51 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [2/4] compile sb800 code without agesav5 Date: Fri, 06 May 2011 02:43:51 -0000 From: She, Kerry X-Patchwork-Id: 2950 Message-Id: To: "She, Kerry" , Marc Jones , Stefan Reinauer Cc: coreboot@coreboot.org > Hello, > > > > -----Original Message----- > > From: Marc Jones [mailto:marcj303@gmail.com] > > Sent: Friday, May 06, 2011 8:52 AM > > To: Stefan Reinauer > > Cc: She, Kerry; coreboot@coreboot.org > > Subject: Re: [coreboot] [Patch 2/4] compile sb800 code without agesav5 > > > > On Fri, Apr 22, 2011 at 1:58 PM, Stefan Reinauer > > wrote: > > > * She, Kerry [110422 05:12]: > > >> Signed-off-by: Kerry She > > >> > > >> SB800 CIMX code can share the AGESA V5 lib code, some platform only > > >> use sb800 cimx code, not use AGESA v5 code, compile the sb800 cimx > > >> and AGESA v5 lib code. > > >> > > >> Signed-off-by: Kerry She > > >> > > >> Index: Makefile.inc > > >> =================================================================== > > >> --- Makefile.inc        (revision 6481) > > >> +++ Makefile.inc        (working copy) > > >> @@ -110,7 +110,9 @@ > > >>  CFLAGS += -Werror > > >>  endif > > >>  ifneq ($(CONFIG_AMD_AGESA),y) > > >> -CFLAGS += -nostdinc > > >> + ifneq ($(CONFIG_AMD_CIMX_SB800),y) > > >> +  CFLAGS += -nostdinc > > >> + endif > > >>  endif > > >>  CFLAGS += -fno-common -ffreestanding -fno-builtin -fomit-frame- > > pointer > > >> > > > > > > Why is that needed. Can we instead fix the code, please? > > > > Kerry, > > > > I think that this is fixed with the last patch from Frank. Can you > update this patch and resend. > > I have update the patch, sb800 code not use stdinc and sse option. > Thanks > -- > Kerry Another small patch to make sb800 code works without compile agesav5 thanks put the amdlib and agesa constant to .rodata segment. so amdlib.c would not complain "Do not use global variables in romstage" Signed-off-by Kerry.She Acked-by: Marc Jones Index: src/vendorcode/amd/agesa/Porting.h =================================================================== --- src/vendorcode/amd/agesa/Porting.h (revision 6556) +++ src/vendorcode/amd/agesa/Porting.h (working copy) @@ -226,9 +226,7 @@ #define VOLATILE volatile #define TRUE 1 #define FALSE 0 - //#define CONST const - avoid const until the large job of making agesa use it consistently is complete -#undef CONST - #define CONST + #define CONST const #define ROMDATA #define CALLCONV #define _16BYTE_ALIGN __attribute__ ((aligned (16)))