diff options
-rw-r--r-- | src/mainboard/amd/dinar/agesawrapper.c | 6 | ||||
-rw-r--r-- | src/mainboard/supermicro/h8qgi/agesawrapper.c | 4 | ||||
-rw-r--r-- | src/mainboard/supermicro/h8scm/agesawrapper.c | 2 | ||||
-rw-r--r-- | src/mainboard/tyan/s8226/agesawrapper.c | 4 | ||||
-rw-r--r-- | src/vendorcode/amd/agesa/f10/Porting.h | 53 | ||||
-rw-r--r-- | src/vendorcode/amd/agesa/f12/Porting.h | 32 | ||||
-rw-r--r-- | src/vendorcode/amd/agesa/f14/Porting.h | 27 | ||||
-rw-r--r-- | src/vendorcode/amd/agesa/f15/Porting.h | 35 | ||||
-rw-r--r-- | src/vendorcode/amd/agesa/f16kb/Porting.h | 2 |
9 files changed, 71 insertions, 94 deletions
diff --git a/src/mainboard/amd/dinar/agesawrapper.c b/src/mainboard/amd/dinar/agesawrapper.c index f802bbef53..c86e430168 100644 --- a/src/mainboard/amd/dinar/agesawrapper.c +++ b/src/mainboard/amd/dinar/agesawrapper.c @@ -552,9 +552,9 @@ AGESA_STATUS agesawrapper_amdreadeventlog(void) AmdEventParams.StdHeader.ImageBasePtr = 0; Status = AmdReadEventLog (&AmdEventParams); while (AmdEventParams.EventClass != 0) { - printk(BIOS_DEBUG,"\nEventLog: EventClass = %x, EventInfo = %x.\n",AmdEventParams.EventClass,AmdEventParams.EventInfo); - printk(BIOS_DEBUG," Param1 = %x, Param2 = %x.\n",AmdEventParams.DataParam1,AmdEventParams.DataParam2); - printk(BIOS_DEBUG," Param3 = %x, Param4 = %x.\n",AmdEventParams.DataParam3,AmdEventParams.DataParam4); + printk(BIOS_DEBUG,"\nEventLog: EventClass = %lx, EventInfo = %lx.\n",AmdEventParams.EventClass, AmdEventParams.EventInfo); + printk(BIOS_DEBUG," Param1 = %lx, Param2 = %lx.\n",AmdEventParams.DataParam1, AmdEventParams.DataParam2); + printk(BIOS_DEBUG," Param3 = %lx, Param4 = %lx.\n",AmdEventParams.DataParam3, AmdEventParams.DataParam4); Status = AmdReadEventLog (&AmdEventParams); } diff --git a/src/mainboard/supermicro/h8qgi/agesawrapper.c b/src/mainboard/supermicro/h8qgi/agesawrapper.c index a8ea827b2f..c4629c6308 100644 --- a/src/mainboard/supermicro/h8qgi/agesawrapper.c +++ b/src/mainboard/supermicro/h8qgi/agesawrapper.c @@ -202,7 +202,7 @@ AGESA_STATUS agesawrapper_amdinitmmio(void) return Status; } -UINT32 agesawrapper_amdinitreset(void) +AGESA_STATUS agesawrapper_amdinitreset(void) { AGESA_STATUS status = AGESA_SUCCESS; AMD_INTERFACE_PARAMS AmdParamStruct; @@ -725,7 +725,7 @@ static void agesa_warning(EVENT_PARAMS *event) */ case HT_EVENT_OPT_REQUIRED_CAP_RETRY: - printk(BIOS_DEBUG, "HT_EVENT_OPT_REQUIRED_CAP_RETRY, Socket %x Link %x Depth %x\n", + printk(BIOS_DEBUG, "HT_EVENT_OPT_REQUIRED_CAP_RETRY, Socket %lx Link %lx Depth %lx\n", event->DataParam1, event->DataParam2, event->DataParam3); diff --git a/src/mainboard/supermicro/h8scm/agesawrapper.c b/src/mainboard/supermicro/h8scm/agesawrapper.c index 3201a756bb..bbf19adeea 100644 --- a/src/mainboard/supermicro/h8scm/agesawrapper.c +++ b/src/mainboard/supermicro/h8scm/agesawrapper.c @@ -202,7 +202,7 @@ AGESA_STATUS agesawrapper_amdinitmmio(void) return Status; } -UINT32 agesawrapper_amdinitreset(void) +AGESA_STATUS agesawrapper_amdinitreset(void) { AGESA_STATUS status = AGESA_SUCCESS; AMD_INTERFACE_PARAMS AmdParamStruct; diff --git a/src/mainboard/tyan/s8226/agesawrapper.c b/src/mainboard/tyan/s8226/agesawrapper.c index 979508ceb6..597aa59ab5 100644 --- a/src/mainboard/tyan/s8226/agesawrapper.c +++ b/src/mainboard/tyan/s8226/agesawrapper.c @@ -209,7 +209,7 @@ AGESA_STATUS agesawrapper_amdinitmmio(void) return Status; } -UINT32 agesawrapper_amdinitreset(void) +AGESA_STATUS agesawrapper_amdinitreset(void) { AGESA_STATUS status = AGESA_SUCCESS; AMD_INTERFACE_PARAMS AmdParamStruct; @@ -732,7 +732,7 @@ static void agesa_warning(EVENT_PARAMS *event) */ case HT_EVENT_OPT_REQUIRED_CAP_RETRY: - printk(BIOS_DEBUG, "HT_EVENT_OPT_REQUIRED_CAP_RETRY, Socket %x Link %x Depth %x\n", + printk(BIOS_DEBUG, "HT_EVENT_OPT_REQUIRED_CAP_RETRY, Socket %lx Link %lx Depth %lx\n", event->DataParam1, event->DataParam2, event->DataParam3); diff --git a/src/vendorcode/amd/agesa/f10/Porting.h b/src/vendorcode/amd/agesa/f10/Porting.h index 6a958a551f..fc65cfc613 100644 --- a/src/vendorcode/amd/agesa/f10/Porting.h +++ b/src/vendorcode/amd/agesa/f10/Porting.h @@ -1,3 +1,4 @@ +/* $NoKeywords:$ */ /** * @file * @@ -8,11 +9,11 @@ * @xrefitem bom "File Content Label" "Release Content" * @e project: AGESA * @e sub-project: Includes - * @e \$Revision: 44323 $ @e \$Date: 2010-12-22 01:24:58 -0700 (Wed, 22 Dec 2010) $ + * @e \$Revision: 44324 $ @e \$Date: 2010-12-22 03:16:51 -0600 (Wed, 22 Dec 2010) $ */ /***************************************************************************** * - * Copyright (c) 2011, Advanced Micro Devices, Inc. + * Copyright (c) 2008 - 2012, Advanced Micro Devices, Inc. * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -37,15 +38,29 @@ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * - * *************************************************************************** - */ + ***************************************************************************/ #ifndef _PORTING_H_ #define _PORTING_H_ #if defined (_MSC_VER) - #pragma warning(disable: 4103 4001) + #include <intrin.h> + void _disable (void); + void _enable (void); + #pragma warning(disable: 4103 4001 4733) + #pragma intrinsic (_disable, _enable) #pragma warning(push) + // ----------------------------------------------------------------------- + // Define a code_seg MACRO + // + #define MAKE_AS_A_STRING(arg) #arg + + #define CODE_GROUP(arg) __pragma (code_seg (MAKE_AS_A_STRING (.t##arg))) + + #define RDATA_GROUP(arg) __pragma (const_seg (MAKE_AS_A_STRING (.d##arg))) + #define FUNC_ATTRIBUTE(arg) __declspec(arg) + //#include <intrin.h> // MS has built-in functions + #if _MSC_VER < 900 // ----------------------------------------------------------------------- // Assume MSVC 1.52C (16-bit) @@ -197,7 +212,7 @@ #endif #endif // ----------------------------------------------------------------------- - // End of Microsoft compiler versions + // End of MS compiler versions #elif defined __GNUC__ @@ -207,6 +222,7 @@ #define VOLATILE volatile #define TRUE 1 #define FALSE 0 +// #undef CONST #define CONST const #define ROMDATA #define CALLCONV @@ -216,17 +232,17 @@ typedef signed char INT8; typedef signed short INT16; typedef signed long INT32; - typedef unsigned char CHAR8; + typedef char CHAR8; typedef unsigned char UINT8; typedef unsigned short UINT16; typedef unsigned long UINT32; typedef unsigned long UINTN; typedef unsigned long long UINT64; + typedef long long INT64; typedef void VOID; //typedef unsigned long size_t; -//typedef unsigned int uintptr_t; -// Force tight packing of structures -// Note: Entire AGESA (Project / Solution) will be using pragma pack 1 + + //#include <intrin.h> // MingW-w64 library header #pragma pack(1) #define CODE_GROUP(arg) @@ -234,10 +250,6 @@ #define FUNC_ATTRIBUTE(arg) __attribute__((arg)) #define MAKE_AS_A_STRING(arg) #arg - -// ----------------------------------------------------------------------- -// Common definitions for all compilers -// #include <stddef.h> #include "gcc-intrin.h" @@ -248,10 +260,6 @@ #ifndef NULL #define NULL (void *)0 #endif -#ifdef ROMDATA -//#undef ROMDATA -#endif -//#define ROMDATA __attribute__ ((section("rom.data")) #else // ----------------------------------------------------------------------- @@ -260,16 +268,13 @@ #error "Unknown compiler in use" #endif - - - // ----------------------------------------------------------------------- - // Common definitions for all compilers - // +// ----------------------------------------------------------------------- +// Common definitions for all compilers +// //Support forward reference construct #define AGESA_FORWARD_DECLARATION(x) typedef struct _##x x - // The following are use in conformance to the UEFI style guide #define IN #define OUT diff --git a/src/vendorcode/amd/agesa/f12/Porting.h b/src/vendorcode/amd/agesa/f12/Porting.h index 2eba9f499a..fc65cfc613 100644 --- a/src/vendorcode/amd/agesa/f12/Porting.h +++ b/src/vendorcode/amd/agesa/f12/Porting.h @@ -9,12 +9,11 @@ * @xrefitem bom "File Content Label" "Release Content" * @e project: AGESA * @e sub-project: Includes - * @e \$Revision: 44324 $ @e \$Date: 2010-12-22 17:16:51 +0800 (Wed, 22 Dec 2010) $ + * @e \$Revision: 44324 $ @e \$Date: 2010-12-22 03:16:51 -0600 (Wed, 22 Dec 2010) $ */ -/* - ***************************************************************************** +/***************************************************************************** * - * Copyright (c) 2011, Advanced Micro Devices, Inc. + * Copyright (c) 2008 - 2012, Advanced Micro Devices, Inc. * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -39,9 +38,7 @@ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * - * *************************************************************************** - * - */ + ***************************************************************************/ #ifndef _PORTING_H_ #define _PORTING_H_ @@ -217,7 +214,6 @@ // ----------------------------------------------------------------------- // End of MS compiler versions - #elif defined __GNUC__ #define IN @@ -226,9 +222,9 @@ #define VOLATILE volatile #define TRUE 1 #define FALSE 0 +// #undef CONST #define CONST const #define ROMDATA -// #define ROMDATA __attribute__ ((section ("text"))) #define CALLCONV #define _16BYTE_ALIGN __attribute__ ((aligned (16))) @@ -236,17 +232,17 @@ typedef signed char INT8; typedef signed short INT16; typedef signed long INT32; - typedef unsigned char CHAR8; + typedef char CHAR8; typedef unsigned char UINT8; typedef unsigned short UINT16; typedef unsigned long UINT32; typedef unsigned long UINTN; - typedef unsigned long long UINT64; + typedef unsigned long long UINT64; + typedef long long INT64; typedef void VOID; //typedef unsigned long size_t; -//typedef unsigned int uintptr_t; -// Force tight packing of structures -// Note: Entire AGESA (Project / Solution) will be using pragma pack 1 + + //#include <intrin.h> // MingW-w64 library header #pragma pack(1) #define CODE_GROUP(arg) @@ -254,16 +250,13 @@ #define FUNC_ATTRIBUTE(arg) __attribute__((arg)) #define MAKE_AS_A_STRING(arg) #arg - -// ----------------------------------------------------------------------- -// Common definitions for all compilers -// #include <stddef.h> #include "gcc-intrin.h" #include <assert.h> #include <console/console.h> #include <console/loglevel.h> + #ifndef NULL #define NULL (void *)0 #endif @@ -275,8 +268,6 @@ #error "Unknown compiler in use" #endif - - // ----------------------------------------------------------------------- // Common definitions for all compilers // @@ -284,7 +275,6 @@ //Support forward reference construct #define AGESA_FORWARD_DECLARATION(x) typedef struct _##x x - // The following are use in conformance to the UEFI style guide #define IN #define OUT diff --git a/src/vendorcode/amd/agesa/f14/Porting.h b/src/vendorcode/amd/agesa/f14/Porting.h index 786ec6665e..fc65cfc613 100644 --- a/src/vendorcode/amd/agesa/f14/Porting.h +++ b/src/vendorcode/amd/agesa/f14/Porting.h @@ -9,12 +9,11 @@ * @xrefitem bom "File Content Label" "Release Content" * @e project: AGESA * @e sub-project: Includes - * @e \$Revision: 36567 $ @e \$Date: 2010-08-21 02:35:15 +0800 (Sat, 21 Aug 2010) $ + * @e \$Revision: 44324 $ @e \$Date: 2010-12-22 03:16:51 -0600 (Wed, 22 Dec 2010) $ */ -/* - ***************************************************************************** +/***************************************************************************** * - * Copyright (c) 2011, Advanced Micro Devices, Inc. + * Copyright (c) 2008 - 2012, Advanced Micro Devices, Inc. * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -39,9 +38,7 @@ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * - * *************************************************************************** - * - */ + ***************************************************************************/ #ifndef _PORTING_H_ #define _PORTING_H_ @@ -217,7 +214,6 @@ // ----------------------------------------------------------------------- // End of MS compiler versions - #elif defined __GNUC__ #define IN @@ -236,17 +232,17 @@ typedef signed char INT8; typedef signed short INT16; typedef signed long INT32; - typedef unsigned char CHAR8; + typedef char CHAR8; typedef unsigned char UINT8; typedef unsigned short UINT16; typedef unsigned long UINT32; typedef unsigned long UINTN; typedef unsigned long long UINT64; + typedef long long INT64; typedef void VOID; //typedef unsigned long size_t; -//typedef unsigned int uintptr_t; -// Force tight packing of structures -// Note: Entire AGESA (Project / Solution) will be using pragma pack 1 + + //#include <intrin.h> // MingW-w64 library header #pragma pack(1) #define CODE_GROUP(arg) @@ -254,10 +250,6 @@ #define FUNC_ATTRIBUTE(arg) __attribute__((arg)) #define MAKE_AS_A_STRING(arg) #arg - -// ----------------------------------------------------------------------- -// Common definitions for all compilers -// #include <stddef.h> #include "gcc-intrin.h" @@ -276,8 +268,6 @@ #error "Unknown compiler in use" #endif - - // ----------------------------------------------------------------------- // Common definitions for all compilers // @@ -285,7 +275,6 @@ //Support forward reference construct #define AGESA_FORWARD_DECLARATION(x) typedef struct _##x x - // The following are use in conformance to the UEFI style guide #define IN #define OUT diff --git a/src/vendorcode/amd/agesa/f15/Porting.h b/src/vendorcode/amd/agesa/f15/Porting.h index 776cddced7..fc65cfc613 100644 --- a/src/vendorcode/amd/agesa/f15/Porting.h +++ b/src/vendorcode/amd/agesa/f15/Porting.h @@ -9,11 +9,11 @@ * @xrefitem bom "File Content Label" "Release Content" * @e project: AGESA * @e sub-project: Includes - * @e \$Revision: 44324 $ @e \$Date: 2010-12-22 02:16:51 -0700 (Wed, 22 Dec 2010) $ + * @e \$Revision: 44324 $ @e \$Date: 2010-12-22 03:16:51 -0600 (Wed, 22 Dec 2010) $ */ /***************************************************************************** * - * Copyright (C) 2012 Advanced Micro Devices, Inc. + * Copyright (c) 2008 - 2012, Advanced Micro Devices, Inc. * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -38,7 +38,6 @@ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * - * ***************************************************************************/ #ifndef _PORTING_H_ @@ -50,7 +49,7 @@ void _enable (void); #pragma warning(disable: 4103 4001 4733) #pragma intrinsic (_disable, _enable) -#pragma warning(push) + #pragma warning(push) // ----------------------------------------------------------------------- // Define a code_seg MACRO // @@ -59,7 +58,7 @@ #define CODE_GROUP(arg) __pragma (code_seg (MAKE_AS_A_STRING (.t##arg))) #define RDATA_GROUP(arg) __pragma (const_seg (MAKE_AS_A_STRING (.d##arg))) - + #define FUNC_ATTRIBUTE(arg) __declspec(arg) //#include <intrin.h> // MS has built-in functions #if _MSC_VER < 900 @@ -215,7 +214,6 @@ // ----------------------------------------------------------------------- // End of MS compiler versions - #elif defined __GNUC__ #define IN @@ -224,6 +222,7 @@ #define VOLATILE volatile #define TRUE 1 #define FALSE 0 +// #undef CONST #define CONST const #define ROMDATA #define CALLCONV @@ -232,35 +231,32 @@ typedef unsigned char BOOLEAN; typedef signed char INT8; typedef signed short INT16; - typedef signed int INT32; + typedef signed long INT32; typedef char CHAR8; typedef unsigned char UINT8; typedef unsigned short UINT16; - typedef unsigned int UINT32; - typedef unsigned int UINTN; + typedef unsigned long UINT32; + typedef unsigned long UINTN; typedef unsigned long long UINT64; + typedef long long INT64; typedef void VOID; //typedef unsigned long size_t; -//typedef unsigned int uintptr_t; -// Force tight packing of structures -// Note: Entire AGESA (Project / Solution) will be using pragma pack 1 + + //#include <intrin.h> // MingW-w64 library header #pragma pack(1) - #define CODE_GROUP(arg) - #define RDATA_GROUP(arg) +#define CODE_GROUP(arg) +#define RDATA_GROUP(arg) #define FUNC_ATTRIBUTE(arg) __attribute__((arg)) #define MAKE_AS_A_STRING(arg) #arg - -// ----------------------------------------------------------------------- -// Common definitions for all compilers -// #include <stddef.h> #include "gcc-intrin.h" #include <assert.h> #include <console/console.h> #include <console/loglevel.h> + #ifndef NULL #define NULL (void *)0 #endif @@ -272,8 +268,6 @@ #error "Unknown compiler in use" #endif - - // ----------------------------------------------------------------------- // Common definitions for all compilers // @@ -281,7 +275,6 @@ //Support forward reference construct #define AGESA_FORWARD_DECLARATION(x) typedef struct _##x x - // The following are use in conformance to the UEFI style guide #define IN #define OUT diff --git a/src/vendorcode/amd/agesa/f16kb/Porting.h b/src/vendorcode/amd/agesa/f16kb/Porting.h index da78fb8cec..fc65cfc613 100644 --- a/src/vendorcode/amd/agesa/f16kb/Porting.h +++ b/src/vendorcode/amd/agesa/f16kb/Porting.h @@ -13,7 +13,7 @@ */ /***************************************************************************** * - * Copyright (c) 2008 - 2013, Advanced Micro Devices, Inc. + * Copyright (c) 2008 - 2012, Advanced Micro Devices, Inc. * All rights reserved. * * Redistribution and use in source and binary forms, with or without |