2 *****************************************************************************
\r
4 * This file is part of the coreboot project.
\r
6 * Copyright (C) 2010 Advanced Micro Devices, Inc.
\r
8 * This program is free software; you can redistribute it and/or modify
\r
9 * it under the terms of the GNU General Public License as published by
\r
10 * the Free Software Foundation; version 2 of the License.
\r
12 * This program is distributed in the hope that it will be useful,
\r
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
\r
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
\r
15 * GNU General Public License for more details.
\r
17 * You should have received a copy of the GNU General Public License
\r
18 * along with this program; if not, write to the Free Software
\r
19 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
\r
20 * ***************************************************************************
\r
24 #ifndef _AMD_SB_LIB_H_
\r
25 #define _AMD_SB_LIB_H_
\r
27 typedef CHAR8 *va_list;
\r
29 #define _INTSIZEOF (n) ( (sizeof (n) + sizeof (UINTN) - 1) & ~(sizeof (UINTN) - 1) )
\r
32 // Also support coding convention rules for var arg macros
\r
34 #define va_start(ap, v) ( ap = (va_list)&(v) + _INTSIZEOF (v) )
\r
36 #define va_arg(ap, t) ( *(t *) ((ap += _INTSIZEOF (t)) - _INTSIZEOF (t)) )
\r
37 #define va_end(ap) ( ap = (va_list)0 )
\r
40 #pragma pack (push, 1)
\r
42 #define IMAGE_ALIGN 32*1024
\r
43 #define NUM_IMAGE_LOCATION 32
\r
46 typedef void (*CIM_IMAGE_ENTRY) (void* pConfig);
\r
50 typedef struct _CIMFILEHEADER
\r
57 UINT32 ModuleInfoOffset;
\r
60 UINT32 RelocTableOffset;
\r
68 #define BIT0 (1 << 0)
\r
71 #define BIT1 (1 << 1)
\r
74 #define BIT2 (1 << 2)
\r
77 #define BIT3 (1 << 3)
\r
80 #define BIT4 (1 << 4)
\r
83 #define BIT5 (1 << 5)
\r
86 #define BIT6 (1 << 6)
\r
89 #define BIT7 (1 << 7)
\r
92 #define BIT8 (1 << 8)
\r
95 #define BIT9 (1 << 9)
\r
98 #define BIT10 (1 << 10)
\r
101 #define BIT11 (1 << 11)
\r
104 #define BIT12 (1 << 12)
\r
107 #define BIT13 (1 << 13)
\r
110 #define BIT14 (1 << 14)
\r
113 #define BIT15 (1 << 15)
\r
116 #define BIT16 (1 << 16)
\r
119 #define BIT17 (1 << 17)
\r
122 #define BIT18 (1 << 18)
\r
125 #define BIT19 (1 << 19)
\r
128 #define BIT20 (1 << 20)
\r
131 #define BIT21 (1 << 21)
\r
134 #define BIT22 (1 << 22)
\r
137 #define BIT23 (1 << 23)
\r
140 #define BIT24 (1 << 24)
\r
143 #define BIT25 (1 << 25)
\r
146 #define BIT26 (1 << 26)
\r
149 #define BIT27 (1 << 27)
\r
152 #define BIT28 (1 << 28)
\r
155 #define BIT29 (1 << 29)
\r
158 #define BIT30 (1 << 30)
\r
161 #define BIT31 (1 << 31)
\r
173 #define S3_SAVE 0x80
\r