Frank Vibrans | 63e62b0 | 2011-02-14 18:38:14 +0000 | [diff] [blame] | 1 | /* |
| 2 | ***************************************************************************** |
| 3 | * |
| 4 | * This file is part of the coreboot project. |
| 5 | * |
| 6 | * Copyright (C) 2011 Advanced Micro Devices, Inc. |
| 7 | * |
| 8 | * This program is free software; you can redistribute it and/or modify |
| 9 | * it under the terms of the GNU General Public License as published by |
| 10 | * the Free Software Foundation; version 2 of the License. |
| 11 | * |
| 12 | * This program is distributed in the hope that it will be useful, |
| 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 15 | * GNU General Public License for more details. |
Frank Vibrans | 63e62b0 | 2011-02-14 18:38:14 +0000 | [diff] [blame] | 16 | * *************************************************************************** |
| 17 | * |
| 18 | */ |
| 19 | |
| 20 | #ifndef _AMD_SB_LIB_H_ |
| 21 | #define _AMD_SB_LIB_H_ |
| 22 | |
David Hendricks | 6053a9c | 2018-01-28 18:01:10 -0800 | [diff] [blame] | 23 | #include <console/vtxprintf.h> |
Frank Vibrans | 63e62b0 | 2011-02-14 18:38:14 +0000 | [diff] [blame] | 24 | |
| 25 | #pragma pack (push, 1) |
| 26 | |
| 27 | #define IMAGE_ALIGN 32*1024 |
| 28 | #define NUM_IMAGE_LOCATION 32 |
| 29 | |
| 30 | //Entry Point Call |
Elyes HAOUAS | 251279c | 2018-07-08 12:41:56 +0200 | [diff] [blame^] | 31 | typedef void (*CIM_IMAGE_ENTRY) (void *pConfig); |
Frank Vibrans | 63e62b0 | 2011-02-14 18:38:14 +0000 | [diff] [blame] | 32 | |
| 33 | //Hook Call |
| 34 | |
| 35 | typedef struct _CIMFILEHEADER |
| 36 | { |
| 37 | unsigned int AMDLogo; |
| 38 | unsigned long long CreatorID; |
| 39 | unsigned int Version1; |
| 40 | unsigned int Version2; |
| 41 | unsigned int Version3; |
| 42 | unsigned int ModuleInfoOffset; |
| 43 | unsigned int EntryPoint; |
| 44 | unsigned int ImageBase; |
| 45 | unsigned int RelocTableOffset; |
| 46 | unsigned int ImageSize; |
| 47 | unsigned short CheckSum; |
| 48 | unsigned char ImageType; |
| 49 | unsigned char Reserved2; |
| 50 | } CIMFILEHEADER; |
| 51 | |
| 52 | #ifndef BIT0 |
| 53 | #define BIT0 (1 << 0) |
| 54 | #endif |
| 55 | #ifndef BIT1 |
| 56 | #define BIT1 (1 << 1) |
| 57 | #endif |
| 58 | #ifndef BIT2 |
| 59 | #define BIT2 (1 << 2) |
| 60 | #endif |
| 61 | #ifndef BIT3 |
| 62 | #define BIT3 (1 << 3) |
| 63 | #endif |
| 64 | #ifndef BIT4 |
| 65 | #define BIT4 (1 << 4) |
| 66 | #endif |
| 67 | #ifndef BIT5 |
| 68 | #define BIT5 (1 << 5) |
| 69 | #endif |
| 70 | #ifndef BIT6 |
| 71 | #define BIT6 (1 << 6) |
| 72 | #endif |
| 73 | #ifndef BIT7 |
| 74 | #define BIT7 (1 << 7) |
| 75 | #endif |
| 76 | #ifndef BIT8 |
| 77 | #define BIT8 (1 << 8) |
| 78 | #endif |
| 79 | #ifndef BIT9 |
| 80 | #define BIT9 (1 << 9) |
| 81 | #endif |
| 82 | #ifndef BIT10 |
| 83 | #define BIT10 (1 << 10) |
| 84 | #endif |
| 85 | #ifndef BIT11 |
| 86 | #define BIT11 (1 << 11) |
| 87 | #endif |
| 88 | #ifndef BIT12 |
| 89 | #define BIT12 (1 << 12) |
| 90 | #endif |
| 91 | #ifndef BIT13 |
| 92 | #define BIT13 (1 << 13) |
| 93 | #endif |
| 94 | #ifndef BIT14 |
| 95 | #define BIT14 (1 << 14) |
| 96 | #endif |
| 97 | #ifndef BIT15 |
| 98 | #define BIT15 (1 << 15) |
| 99 | #endif |
| 100 | #ifndef BIT16 |
| 101 | #define BIT16 (1 << 16) |
| 102 | #endif |
| 103 | #ifndef BIT17 |
| 104 | #define BIT17 (1 << 17) |
| 105 | #endif |
| 106 | #ifndef BIT18 |
| 107 | #define BIT18 (1 << 18) |
| 108 | #endif |
| 109 | #ifndef BIT19 |
| 110 | #define BIT19 (1 << 19) |
| 111 | #endif |
| 112 | #ifndef BIT20 |
| 113 | #define BIT20 (1 << 20) |
| 114 | #endif |
| 115 | #ifndef BIT21 |
| 116 | #define BIT21 (1 << 21) |
| 117 | #endif |
| 118 | #ifndef BIT22 |
| 119 | #define BIT22 (1 << 22) |
| 120 | #endif |
| 121 | #ifndef BIT23 |
| 122 | #define BIT23 (1 << 23) |
| 123 | #endif |
| 124 | #ifndef BIT24 |
| 125 | #define BIT24 (1 << 24) |
| 126 | #endif |
| 127 | #ifndef BIT25 |
| 128 | #define BIT25 (1 << 25) |
| 129 | #endif |
| 130 | #ifndef BIT26 |
| 131 | #define BIT26 (1 << 26) |
| 132 | #endif |
| 133 | #ifndef BIT27 |
| 134 | #define BIT27 (1 << 27) |
| 135 | #endif |
| 136 | #ifndef BIT28 |
| 137 | #define BIT28 (1 << 28) |
| 138 | #endif |
| 139 | #ifndef BIT29 |
| 140 | #define BIT29 (1 << 29) |
| 141 | #endif |
| 142 | #ifndef BIT30 |
| 143 | #define BIT30 (1 << 30) |
| 144 | #endif |
| 145 | #ifndef BIT31 |
| 146 | #define BIT31 (1 << 31) |
| 147 | #endif |
| 148 | |
| 149 | #pragma pack (pop) |
| 150 | |
| 151 | typedef enum |
| 152 | { |
| 153 | AccWidthUint8 = 0, |
| 154 | AccWidthUint16, |
| 155 | AccWidthUint32, |
| 156 | } ACC_WIDTH; |
| 157 | |
| 158 | #define S3_SAVE 0x80 |
| 159 | |
| 160 | #endif |