summaryrefslogtreecommitdiff
path: root/src/vendorcode
diff options
context:
space:
mode:
Diffstat (limited to 'src/vendorcode')
-rw-r--r--src/vendorcode/amd/agesa/f10/Porting.h53
-rw-r--r--src/vendorcode/amd/agesa/f12/Porting.h32
-rw-r--r--src/vendorcode/amd/agesa/f14/Porting.h27
-rw-r--r--src/vendorcode/amd/agesa/f15/Porting.h35
-rw-r--r--src/vendorcode/amd/agesa/f16kb/Porting.h2
5 files changed, 63 insertions, 86 deletions
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