-/*\r
- *****************************************************************************\r
- *\r
- * This file is part of the coreboot project.\r
- *\r
- * Copyright (C) 2010 Advanced Micro Devices, Inc.\r
- *\r
- * This program is free software; you can redistribute it and/or modify\r
- * it under the terms of the GNU General Public License as published by\r
- * the Free Software Foundation; version 2 of the License.\r
- *\r
- * This program is distributed in the hope that it will be useful,\r
- * but WITHOUT ANY WARRANTY; without even the implied warranty of\r
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\r
- * GNU General Public License for more details.\r
- *\r
- * You should have received a copy of the GNU General Public License\r
- * along with this program; if not, write to the Free Software\r
- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA\r
- * ***************************************************************************\r
- *\r
- */\r
-\r
-#ifndef _AMD_SB_LIB_H_\r
-#define _AMD_SB_LIB_H_\r
-\r
-typedef CHAR8 *va_list;\r
-#ifndef _INTSIZEOF\r
- #define _INTSIZEOF (n) ( (sizeof (n) + sizeof (UINTN) - 1) & ~(sizeof (UINTN) - 1) )\r
-#endif\r
-\r
-// Also support coding convention rules for var arg macros\r
-#ifndef va_start\r
- #define va_start(ap, v) ( ap = (va_list)&(v) + _INTSIZEOF (v) )\r
-#endif\r
-#define va_arg(ap, t) ( *(t *) ((ap += _INTSIZEOF (t)) - _INTSIZEOF (t)) )\r
-#define va_end(ap) ( ap = (va_list)0 )\r
-\r
-#pragma pack (push, 1)\r
-\r
-#define IMAGE_ALIGN 32*1024\r
-#define NUM_IMAGE_LOCATION 32\r
-\r
-//Entry Point Call\r
-typedef void (*CIM_IMAGE_ENTRY) (void* pConfig);\r
-\r
-//Hook Call\r
-\r
-typedef struct _CIMFILEHEADER\r
-{\r
- UINT32 AMDLogo;\r
- UINT64 CreatorID;\r
- UINT32 Version1;\r
- UINT32 Version2;\r
- UINT32 Version3;\r
- UINT32 ModuleInfoOffset;\r
- UINT32 EntryPoint;\r
- UINT32 ImageBase;\r
- UINT32 RelocTableOffset;\r
- UINT32 ImageSize;\r
- UINT16 CheckSum;\r
- UINT8 ImageType;\r
- UINT8 Reserved2;\r
-} CIMFILEHEADER;\r
-\r
-#ifndef BIT0\r
- #define BIT0 (1 << 0)\r
-#endif\r
-#ifndef BIT1\r
- #define BIT1 (1 << 1)\r
-#endif\r
-#ifndef BIT2\r
- #define BIT2 (1 << 2)\r
-#endif\r
-#ifndef BIT3\r
- #define BIT3 (1 << 3)\r
-#endif\r
-#ifndef BIT4\r
- #define BIT4 (1 << 4)\r
-#endif\r
-#ifndef BIT5\r
- #define BIT5 (1 << 5)\r
-#endif\r
-#ifndef BIT6\r
- #define BIT6 (1 << 6)\r
-#endif\r
-#ifndef BIT7\r
- #define BIT7 (1 << 7)\r
-#endif\r
-#ifndef BIT8\r
- #define BIT8 (1 << 8)\r
-#endif\r
-#ifndef BIT9\r
- #define BIT9 (1 << 9)\r
-#endif\r
-#ifndef BIT10\r
- #define BIT10 (1 << 10)\r
-#endif\r
-#ifndef BIT11\r
- #define BIT11 (1 << 11)\r
-#endif\r
-#ifndef BIT12\r
- #define BIT12 (1 << 12)\r
-#endif\r
-#ifndef BIT13\r
- #define BIT13 (1 << 13)\r
-#endif\r
-#ifndef BIT14\r
- #define BIT14 (1 << 14)\r
-#endif\r
-#ifndef BIT15\r
- #define BIT15 (1 << 15)\r
-#endif\r
-#ifndef BIT16\r
- #define BIT16 (1 << 16)\r
-#endif\r
-#ifndef BIT17\r
- #define BIT17 (1 << 17)\r
-#endif\r
-#ifndef BIT18\r
- #define BIT18 (1 << 18)\r
-#endif\r
-#ifndef BIT19\r
- #define BIT19 (1 << 19)\r
-#endif\r
-#ifndef BIT20\r
- #define BIT20 (1 << 20)\r
-#endif\r
-#ifndef BIT21\r
- #define BIT21 (1 << 21)\r
-#endif\r
-#ifndef BIT22\r
- #define BIT22 (1 << 22)\r
-#endif\r
-#ifndef BIT23\r
- #define BIT23 (1 << 23)\r
-#endif\r
-#ifndef BIT24\r
- #define BIT24 (1 << 24)\r
-#endif\r
-#ifndef BIT25\r
- #define BIT25 (1 << 25)\r
-#endif\r
-#ifndef BIT26\r
- #define BIT26 (1 << 26)\r
-#endif\r
-#ifndef BIT27\r
- #define BIT27 (1 << 27)\r
-#endif\r
-#ifndef BIT28\r
- #define BIT28 (1 << 28)\r
-#endif\r
-#ifndef BIT29\r
- #define BIT29 (1 << 29)\r
-#endif\r
-#ifndef BIT30\r
- #define BIT30 (1 << 30)\r
-#endif\r
-#ifndef BIT31\r
- #define BIT31 (1 << 31)\r
-#endif\r
-\r
-#pragma pack (pop)\r
-\r
-typedef enum\r
-{\r
- AccWidthUint8 = 0,\r
- AccWidthUint16,\r
- AccWidthUint32,\r
-} ACC_WIDTH;\r
-\r
-#define S3_SAVE 0x80\r
-\r
-#endif\r
+/*
+ *****************************************************************************
+ *
+ * This file is part of the coreboot project.
+ *
+ * Copyright (C) 2010 Advanced Micro Devices, Inc.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; version 2 of the License.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+ * ***************************************************************************
+ *
+ */
+
+#ifndef _AMD_SB_LIB_H_
+#define _AMD_SB_LIB_H_
+
+typedef CHAR8 *va_list;
+#ifndef _INTSIZEOF
+ #define _INTSIZEOF (n) ( (sizeof (n) + sizeof (UINTN) - 1) & ~(sizeof (UINTN) - 1) )
+#endif
+
+// Also support coding convention rules for var arg macros
+#ifndef va_start
+ #define va_start(ap, v) ( ap = (va_list)&(v) + _INTSIZEOF (v) )
+#endif
+#define va_arg(ap, t) ( *(t *) ((ap += _INTSIZEOF (t)) - _INTSIZEOF (t)) )
+#define va_end(ap) ( ap = (va_list)0 )
+
+#pragma pack (push, 1)
+
+#define IMAGE_ALIGN 32*1024
+#define NUM_IMAGE_LOCATION 32
+
+//Entry Point Call
+typedef void (*CIM_IMAGE_ENTRY) (void* pConfig);
+
+//Hook Call
+
+typedef struct _CIMFILEHEADER
+{
+ UINT32 AMDLogo;
+ UINT64 CreatorID;
+ UINT32 Version1;
+ UINT32 Version2;
+ UINT32 Version3;
+ UINT32 ModuleInfoOffset;
+ UINT32 EntryPoint;
+ UINT32 ImageBase;
+ UINT32 RelocTableOffset;
+ UINT32 ImageSize;
+ UINT16 CheckSum;
+ UINT8 ImageType;
+ UINT8 Reserved2;
+} CIMFILEHEADER;
+
+#ifndef BIT0
+ #define BIT0 (1 << 0)
+#endif
+#ifndef BIT1
+ #define BIT1 (1 << 1)
+#endif
+#ifndef BIT2
+ #define BIT2 (1 << 2)
+#endif
+#ifndef BIT3
+ #define BIT3 (1 << 3)
+#endif
+#ifndef BIT4
+ #define BIT4 (1 << 4)
+#endif
+#ifndef BIT5
+ #define BIT5 (1 << 5)
+#endif
+#ifndef BIT6
+ #define BIT6 (1 << 6)
+#endif
+#ifndef BIT7
+ #define BIT7 (1 << 7)
+#endif
+#ifndef BIT8
+ #define BIT8 (1 << 8)
+#endif
+#ifndef BIT9
+ #define BIT9 (1 << 9)
+#endif
+#ifndef BIT10
+ #define BIT10 (1 << 10)
+#endif
+#ifndef BIT11
+ #define BIT11 (1 << 11)
+#endif
+#ifndef BIT12
+ #define BIT12 (1 << 12)
+#endif
+#ifndef BIT13
+ #define BIT13 (1 << 13)
+#endif
+#ifndef BIT14
+ #define BIT14 (1 << 14)
+#endif
+#ifndef BIT15
+ #define BIT15 (1 << 15)
+#endif
+#ifndef BIT16
+ #define BIT16 (1 << 16)
+#endif
+#ifndef BIT17
+ #define BIT17 (1 << 17)
+#endif
+#ifndef BIT18
+ #define BIT18 (1 << 18)
+#endif
+#ifndef BIT19
+ #define BIT19 (1 << 19)
+#endif
+#ifndef BIT20
+ #define BIT20 (1 << 20)
+#endif
+#ifndef BIT21
+ #define BIT21 (1 << 21)
+#endif
+#ifndef BIT22
+ #define BIT22 (1 << 22)
+#endif
+#ifndef BIT23
+ #define BIT23 (1 << 23)
+#endif
+#ifndef BIT24
+ #define BIT24 (1 << 24)
+#endif
+#ifndef BIT25
+ #define BIT25 (1 << 25)
+#endif
+#ifndef BIT26
+ #define BIT26 (1 << 26)
+#endif
+#ifndef BIT27
+ #define BIT27 (1 << 27)
+#endif
+#ifndef BIT28
+ #define BIT28 (1 << 28)
+#endif
+#ifndef BIT29
+ #define BIT29 (1 << 29)
+#endif
+#ifndef BIT30
+ #define BIT30 (1 << 30)
+#endif
+#ifndef BIT31
+ #define BIT31 (1 << 31)
+#endif
+
+#pragma pack (pop)
+
+typedef enum
+{
+ AccWidthUint8 = 0,
+ AccWidthUint16,
+ AccWidthUint32,
+} ACC_WIDTH;
+
+#define S3_SAVE 0x80
+
+#endif