Angel Pons | 182dbde | 2020-04-02 23:49:05 +0200 | [diff] [blame] | 1 | /* SPDX-License-Identifier: GPL-2.0-only */ |
Frank Vibrans | 63e62b0 | 2011-02-14 18:38:14 +0000 | [diff] [blame] | 2 | |
| 3 | #ifndef _AMD_SB_LIB_H_ |
| 4 | #define _AMD_SB_LIB_H_ |
| 5 | |
David Hendricks | 6053a9c | 2018-01-28 18:01:10 -0800 | [diff] [blame] | 6 | #include <console/vtxprintf.h> |
Frank Vibrans | 63e62b0 | 2011-02-14 18:38:14 +0000 | [diff] [blame] | 7 | |
Elyes Haouas | 616be8c | 2022-07-16 09:50:29 +0200 | [diff] [blame] | 8 | #pragma pack(push, 1) |
Frank Vibrans | 63e62b0 | 2011-02-14 18:38:14 +0000 | [diff] [blame] | 9 | |
Frank Vibrans | 63e62b0 | 2011-02-14 18:38:14 +0000 | [diff] [blame] | 10 | #define NUM_IMAGE_LOCATION 32 |
| 11 | |
| 12 | //Entry Point Call |
Elyes HAOUAS | 251279c | 2018-07-08 12:41:56 +0200 | [diff] [blame] | 13 | typedef void (*CIM_IMAGE_ENTRY) (void *pConfig); |
Frank Vibrans | 63e62b0 | 2011-02-14 18:38:14 +0000 | [diff] [blame] | 14 | |
| 15 | //Hook Call |
| 16 | |
| 17 | typedef struct _CIMFILEHEADER |
| 18 | { |
| 19 | unsigned int AMDLogo; |
| 20 | unsigned long long CreatorID; |
| 21 | unsigned int Version1; |
| 22 | unsigned int Version2; |
| 23 | unsigned int Version3; |
| 24 | unsigned int ModuleInfoOffset; |
| 25 | unsigned int EntryPoint; |
| 26 | unsigned int ImageBase; |
| 27 | unsigned int RelocTableOffset; |
| 28 | unsigned int ImageSize; |
| 29 | unsigned short CheckSum; |
| 30 | unsigned char ImageType; |
| 31 | unsigned char Reserved2; |
| 32 | } CIMFILEHEADER; |
| 33 | |
| 34 | #ifndef BIT0 |
| 35 | #define BIT0 (1 << 0) |
| 36 | #endif |
| 37 | #ifndef BIT1 |
| 38 | #define BIT1 (1 << 1) |
| 39 | #endif |
| 40 | #ifndef BIT2 |
| 41 | #define BIT2 (1 << 2) |
| 42 | #endif |
| 43 | #ifndef BIT3 |
| 44 | #define BIT3 (1 << 3) |
| 45 | #endif |
| 46 | #ifndef BIT4 |
| 47 | #define BIT4 (1 << 4) |
| 48 | #endif |
| 49 | #ifndef BIT5 |
| 50 | #define BIT5 (1 << 5) |
| 51 | #endif |
| 52 | #ifndef BIT6 |
| 53 | #define BIT6 (1 << 6) |
| 54 | #endif |
| 55 | #ifndef BIT7 |
| 56 | #define BIT7 (1 << 7) |
| 57 | #endif |
| 58 | #ifndef BIT8 |
| 59 | #define BIT8 (1 << 8) |
| 60 | #endif |
| 61 | #ifndef BIT9 |
| 62 | #define BIT9 (1 << 9) |
| 63 | #endif |
| 64 | #ifndef BIT10 |
| 65 | #define BIT10 (1 << 10) |
| 66 | #endif |
| 67 | #ifndef BIT11 |
| 68 | #define BIT11 (1 << 11) |
| 69 | #endif |
| 70 | #ifndef BIT12 |
| 71 | #define BIT12 (1 << 12) |
| 72 | #endif |
| 73 | #ifndef BIT13 |
| 74 | #define BIT13 (1 << 13) |
| 75 | #endif |
| 76 | #ifndef BIT14 |
| 77 | #define BIT14 (1 << 14) |
| 78 | #endif |
| 79 | #ifndef BIT15 |
| 80 | #define BIT15 (1 << 15) |
| 81 | #endif |
| 82 | #ifndef BIT16 |
| 83 | #define BIT16 (1 << 16) |
| 84 | #endif |
| 85 | #ifndef BIT17 |
| 86 | #define BIT17 (1 << 17) |
| 87 | #endif |
| 88 | #ifndef BIT18 |
| 89 | #define BIT18 (1 << 18) |
| 90 | #endif |
| 91 | #ifndef BIT19 |
| 92 | #define BIT19 (1 << 19) |
| 93 | #endif |
| 94 | #ifndef BIT20 |
| 95 | #define BIT20 (1 << 20) |
| 96 | #endif |
| 97 | #ifndef BIT21 |
| 98 | #define BIT21 (1 << 21) |
| 99 | #endif |
| 100 | #ifndef BIT22 |
| 101 | #define BIT22 (1 << 22) |
| 102 | #endif |
| 103 | #ifndef BIT23 |
| 104 | #define BIT23 (1 << 23) |
| 105 | #endif |
Elyes Haouas | 616be8c | 2022-07-16 09:50:29 +0200 | [diff] [blame] | 106 | #ifndef BIT24 |
Frank Vibrans | 63e62b0 | 2011-02-14 18:38:14 +0000 | [diff] [blame] | 107 | #define BIT24 (1 << 24) |
| 108 | #endif |
| 109 | #ifndef BIT25 |
| 110 | #define BIT25 (1 << 25) |
| 111 | #endif |
| 112 | #ifndef BIT26 |
| 113 | #define BIT26 (1 << 26) |
| 114 | #endif |
| 115 | #ifndef BIT27 |
| 116 | #define BIT27 (1 << 27) |
| 117 | #endif |
| 118 | #ifndef BIT28 |
| 119 | #define BIT28 (1 << 28) |
| 120 | #endif |
| 121 | #ifndef BIT29 |
| 122 | #define BIT29 (1 << 29) |
| 123 | #endif |
| 124 | #ifndef BIT30 |
| 125 | #define BIT30 (1 << 30) |
| 126 | #endif |
| 127 | #ifndef BIT31 |
| 128 | #define BIT31 (1 << 31) |
| 129 | #endif |
| 130 | |
Elyes Haouas | 616be8c | 2022-07-16 09:50:29 +0200 | [diff] [blame] | 131 | #pragma pack(pop) |
Frank Vibrans | 63e62b0 | 2011-02-14 18:38:14 +0000 | [diff] [blame] | 132 | |
| 133 | typedef enum |
| 134 | { |
| 135 | AccWidthUint8 = 0, |
| 136 | AccWidthUint16, |
| 137 | AccWidthUint32, |
| 138 | } ACC_WIDTH; |
| 139 | |
| 140 | #define S3_SAVE 0x80 |
| 141 | |
| 142 | #endif |