3 Copyright (c) 2004 - 2016, Intel Corporation. All rights reserved.<BR>
5 This program and the accompanying materials are licensed and made available under
6 the terms and conditions of the BSD License that accompanies this distribution.
7 The full text of the license may be found at
8 http://opensource.org/licenses/bsd-license.php.
10 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
11 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
17 #include <Library/SpiFlash.H>
19 #define FLASH_SIZE 0x400000
22 // Serial Flash device initialization data table provided to the
23 // Intel(R) SPI Host Controller Compatibility Interface.
25 SPI_INIT_TABLE mInitTable
[] = {
27 SF_VENDOR_ID_WINBOND
, // VendorId
28 SF_DEVICE_ID0_W25QXX
, // DeviceId 0
29 SF_DEVICE_ID1_W25Q64
, // DeviceId 1
31 SF_INST_WREN
, // Prefix Opcode 0: Write Enable
32 SF_INST_EWSR
// Prefix Opcode 1: Enable Write Status Register
35 {EnumSpiOpcodeReadNoAddr
, SF_INST_JEDEC_READ_ID
, EnumSpiCycle50MHz
, EnumSpiOperationJedecId
}, // Opcode 0: Read ID
36 {EnumSpiOpcodeRead
, SF_INST_READ
, EnumSpiCycle50MHz
, EnumSpiOperationReadData
}, // Opcode 1: Read
37 {EnumSpiOpcodeReadNoAddr
, SF_INST_RDSR
, EnumSpiCycle50MHz
, EnumSpiOperationReadStatus
}, // Opcode 2: Read Status Register
38 {EnumSpiOpcodeRead
, SF_INST_SFDP
, EnumSpiCycle50MHz
, EnumSpiOperationDiscoveryParameters
}, // Opcode 3: Serial Flash Discovery Parameters
39 {EnumSpiOpcodeWrite
, SF_INST_SERASE
, EnumSpiCycle50MHz
, EnumSpiOperationErase_4K_Byte
}, // Opcode 4: Sector Erase (4KB)
40 {EnumSpiOpcodeWrite
, SF_INST_64KB_ERASE
, EnumSpiCycle50MHz
, EnumSpiOperationErase_64K_Byte
}, // Opcode 5: Block Erase (64KB
41 {EnumSpiOpcodeWrite
, SF_INST_PROG
, EnumSpiCycle50MHz
, EnumSpiOperationProgramData_1_Byte
}, // Opcode 6: Byte Program
42 {EnumSpiOpcodeWriteNoAddr
, SF_INST_WRSR
, EnumSpiCycle50MHz
, EnumSpiOperationWriteStatus
}, // Opcode 7: Write Status Register
46 // The offset of the start of the BIOS image in flash. This value is platform specific
47 // and depends on the system flash map. If BIOS size is bigger than flash return -1.
49 ((WINBOND_W25Q64_SIZE
>= FLASH_SIZE
) ? WINBOND_W25Q64_SIZE
- FLASH_SIZE
: (UINTN
) (-1)),
52 // The size of the BIOS image in flash. This value is platform specific and depends on the system flash map.
57 SF_VENDOR_ID_ATMEL
, // VendorId
58 SF_DEVICE_ID0_AT25DF321A
, // DeviceId 0
59 SF_DEVICE_ID1_AT25DF321A
, // DeviceId 1
61 SF_INST_WREN
, // Prefix Opcode 0: Write Enable
62 SF_INST_WREN
// Prefix Opcode 1: Write Enable (this part doesn't support EWSR).
65 {EnumSpiOpcodeReadNoAddr
, SF_INST_JEDEC_READ_ID
, EnumSpiCycle50MHz
, EnumSpiOperationJedecId
}, // Opcode 0: Read ID
66 {EnumSpiOpcodeRead
, SF_INST_READ
, EnumSpiCycle50MHz
, EnumSpiOperationReadData
}, // Opcode 1: Read
67 {EnumSpiOpcodeReadNoAddr
, SF_INST_RDSR
, EnumSpiCycle50MHz
, EnumSpiOperationReadStatus
}, // Opcode 2: Read Status Register
68 {EnumSpiOpcodeWriteNoAddr
, SF_INST_WRDI
, EnumSpiCycle50MHz
, EnumSpiOperationWriteDisable
}, // Opcode 3: Write Disable
69 {EnumSpiOpcodeWrite
, SF_INST_SERASE
, EnumSpiCycle50MHz
, EnumSpiOperationErase_4K_Byte
}, // Opcode 4: Sector Erase (4KB)
70 {EnumSpiOpcodeWrite
, SF_INST_64KB_ERASE
, EnumSpiCycle50MHz
, EnumSpiOperationErase_64K_Byte
}, // Opcode 5: Block Erase (32KB)
71 {EnumSpiOpcodeWrite
, SF_INST_PROG
, EnumSpiCycle50MHz
, EnumSpiOperationProgramData_1_Byte
}, // Opcode 6: Byte Program
72 {EnumSpiOpcodeWriteNoAddr
, SF_INST_WRSR
, EnumSpiCycle50MHz
, EnumSpiOperationWriteStatus
}, // Opcode 7: Write Status Register
76 // The offset of the start of the BIOS image in flash. This value is platform specific
77 // and depends on the system flash map. If BIOS size is bigger than flash return -1.
79 ((ATMEL_AT25DF321A_SIZE
>= FLASH_SIZE
) ? ATMEL_AT25DF321A_SIZE
- FLASH_SIZE
: (UINTN
) (-1)),
82 // The size of the BIOS image in flash. This value is platform specific and depends on the system flash map.
87 SF_VENDOR_ID_ATMEL
, // VendorId
88 SF_DEVICE_ID0_AT26DF321
, // DeviceId 0
89 SF_DEVICE_ID1_AT26DF321
, // DeviceId 1
91 SF_INST_WREN
, // Prefix Opcode 0: Write Enable
92 SF_INST_WREN
// Prefix Opcode 1: Write Enable (this part doesn't support EWSR).
95 {EnumSpiOpcodeReadNoAddr
, SF_INST_JEDEC_READ_ID
, EnumSpiCycle50MHz
, EnumSpiOperationJedecId
}, // Opcode 0: Read ID
96 {EnumSpiOpcodeRead
, SF_INST_READ
, EnumSpiCycle50MHz
, EnumSpiOperationReadData
}, // Opcode 1: Read
97 {EnumSpiOpcodeReadNoAddr
, SF_INST_RDSR
, EnumSpiCycle50MHz
, EnumSpiOperationReadStatus
}, // Opcode 2: Read Status Register
98 {EnumSpiOpcodeWriteNoAddr
, SF_INST_WRDI
, EnumSpiCycle50MHz
, EnumSpiOperationWriteDisable
}, // Opcode 3: Write Disable
99 {EnumSpiOpcodeWrite
, SF_INST_SERASE
, EnumSpiCycle50MHz
, EnumSpiOperationErase_4K_Byte
}, // Opcode 4: Sector Erase (4KB)
100 {EnumSpiOpcodeWrite
, SF_INST_64KB_ERASE
, EnumSpiCycle50MHz
, EnumSpiOperationErase_64K_Byte
}, // Opcode 5: Block Erase (32KB)
101 {EnumSpiOpcodeWrite
, SF_INST_PROG
, EnumSpiCycle50MHz
, EnumSpiOperationProgramData_1_Byte
}, // Opcode 6: Byte Program
102 {EnumSpiOpcodeWriteNoAddr
, SF_INST_WRSR
, EnumSpiCycle50MHz
, EnumSpiOperationWriteStatus
}, // Opcode 7: Write Status Register
106 // The offset of the start of the BIOS image in flash. This value is platform specific
107 // and depends on the system flash map. If BIOS size is bigger than flash return -1.
109 ((ATMEL_AT26DF321_SIZE
>= FLASH_SIZE
) ? ATMEL_AT26DF321_SIZE
- FLASH_SIZE
: (UINTN
) (-1)),
112 // The size of the BIOS image in flash. This value is platform specific and depends on the system flash map.
117 SF_VENDOR_ID_ATMEL
, // VendorId
118 SF_DEVICE_ID0_AT25DF641
, // DeviceId 0
119 SF_DEVICE_ID1_AT25DF641
, // DeviceId 1
121 SF_INST_WREN
, // Prefix Opcode 0: Write Enable
122 SF_INST_WREN
// Prefix Opcode 1: Write Enable (this part doesn't support EWSR).
125 {EnumSpiOpcodeReadNoAddr
, SF_INST_JEDEC_READ_ID
, EnumSpiCycle50MHz
, EnumSpiOperationJedecId
}, // Opcode 0: Read ID
126 {EnumSpiOpcodeRead
, SF_INST_READ
, EnumSpiCycle50MHz
, EnumSpiOperationReadData
}, // Opcode 1: Read
127 {EnumSpiOpcodeReadNoAddr
, SF_INST_RDSR
, EnumSpiCycle50MHz
, EnumSpiOperationReadStatus
}, // Opcode 2: Read Status Register
128 {EnumSpiOpcodeWriteNoAddr
, SF_INST_WRDI
, EnumSpiCycle50MHz
, EnumSpiOperationWriteDisable
}, // Opcode 3: Write Disable
129 {EnumSpiOpcodeWrite
, SF_INST_SERASE
, EnumSpiCycle50MHz
, EnumSpiOperationErase_4K_Byte
}, // Opcode 4: Sector Erase (4KB)
130 {EnumSpiOpcodeWrite
, SF_INST_64KB_ERASE
, EnumSpiCycle50MHz
, EnumSpiOperationErase_64K_Byte
}, // Opcode 5: Block Erase (32KB)
131 {EnumSpiOpcodeWrite
, SF_INST_PROG
, EnumSpiCycle50MHz
, EnumSpiOperationProgramData_1_Byte
}, // Opcode 6: Byte Program
132 {EnumSpiOpcodeWriteNoAddr
, SF_INST_WRSR
, EnumSpiCycle50MHz
, EnumSpiOperationWriteStatus
}, // Opcode 7: Write Status Register
136 // The offset of the start of the BIOS image in flash. This value is platform specific
137 // and depends on the system flash map. If BIOS size is bigger than flash return -1.
139 ((ATMEL_AT25DF641_SIZE
>= FLASH_SIZE
) ? ATMEL_AT25DF641_SIZE
- FLASH_SIZE
: (UINTN
) (-1)),
142 // The size of the BIOS image in flash. This value is platform specific and depends on the system flash map.
147 SF_VENDOR_ID_WINBOND
, // VendorId
148 SF_DEVICE_ID0_W25QXX
, // DeviceId 0
149 SF_DEVICE_ID1_W25Q16
, // DeviceId 1
151 SF_INST_WREN
, // Prefix Opcode 0: Write Enable
152 SF_INST_EWSR
// Prefix Opcode 1: Enable Write Status Register
155 {EnumSpiOpcodeReadNoAddr
, SF_INST_JEDEC_READ_ID
, EnumSpiCycle50MHz
, EnumSpiOperationJedecId
}, // Opcode 0: Read ID
156 {EnumSpiOpcodeRead
, SF_INST_READ
, EnumSpiCycle50MHz
, EnumSpiOperationReadData
}, // Opcode 1: Read
157 {EnumSpiOpcodeReadNoAddr
, SF_INST_RDSR
, EnumSpiCycle50MHz
, EnumSpiOperationReadStatus
}, // Opcode 2: Read Status Register
158 {EnumSpiOpcodeRead
, SF_INST_SFDP
, EnumSpiCycle50MHz
, EnumSpiOperationDiscoveryParameters
}, // Opcode 3: Serial Flash Discovery Parameters
159 {EnumSpiOpcodeWrite
, SF_INST_SERASE
, EnumSpiCycle50MHz
, EnumSpiOperationErase_4K_Byte
}, // Opcode 4: Sector Erase (4KB)
160 {EnumSpiOpcodeWrite
, SF_INST_64KB_ERASE
, EnumSpiCycle50MHz
, EnumSpiOperationErase_64K_Byte
}, // Opcode 5: Block Erase (64KB
161 {EnumSpiOpcodeWrite
, SF_INST_PROG
, EnumSpiCycle50MHz
, EnumSpiOperationProgramData_1_Byte
}, // Opcode 6: Byte Program
162 {EnumSpiOpcodeWriteNoAddr
, SF_INST_WRSR
, EnumSpiCycle50MHz
, EnumSpiOperationWriteStatus
}, // Opcode 7: Write Status Register
166 // The offset of the start of the BIOS image in flash. This value is platform specific
167 // and depends on the system flash map. If BIOS size is bigger than flash return -1.
169 ((WINBOND_W25Q16_SIZE
>= FLASH_SIZE
) ? WINBOND_W25Q16_SIZE
- FLASH_SIZE
: (UINTN
) (-1)),
172 // The size of the BIOS image in flash. This value is platform specific and depends on the system flash map.
177 SF_VENDOR_ID_WINBOND
, // VendorId
178 SF_DEVICE_ID0_W25QXX
, // DeviceId 0
179 SF_DEVICE_ID1_W25Q32
, // DeviceId 1
181 SF_INST_WREN
, // Prefix Opcode 0: Write Enable
182 SF_INST_EWSR
// Prefix Opcode 1: Enable Write Status Register.
185 {EnumSpiOpcodeReadNoAddr
, SF_INST_JEDEC_READ_ID
, EnumSpiCycle50MHz
, EnumSpiOperationJedecId
}, // Opcode 0: Read ID
186 {EnumSpiOpcodeRead
, SF_INST_READ
, EnumSpiCycle50MHz
, EnumSpiOperationReadData
}, // Opcode 1: Read
187 {EnumSpiOpcodeReadNoAddr
, SF_INST_RDSR
, EnumSpiCycle50MHz
, EnumSpiOperationReadStatus
}, // Opcode 2: Read Status Register
188 {EnumSpiOpcodeRead
, SF_INST_SFDP
, EnumSpiCycle50MHz
, EnumSpiOperationDiscoveryParameters
}, // Opcode 3: Serial Flash Discovery Parameters
189 {EnumSpiOpcodeWrite
, SF_INST_SERASE
, EnumSpiCycle50MHz
, EnumSpiOperationErase_4K_Byte
}, // Opcode 4: Sector Erase (4KB)
190 {EnumSpiOpcodeWrite
, SF_INST_64KB_ERASE
, EnumSpiCycle50MHz
, EnumSpiOperationErase_64K_Byte
}, // Opcode 5: Block Erase (64KB
191 {EnumSpiOpcodeWrite
, SF_INST_PROG
, EnumSpiCycle50MHz
, EnumSpiOperationProgramData_1_Byte
}, // Opcode 6: Byte Program
192 {EnumSpiOpcodeWriteNoAddr
, SF_INST_WRSR
, EnumSpiCycle50MHz
, EnumSpiOperationWriteStatus
}, // Opcode 7: Write Status Register
196 // The offset of the start of the BIOS image in flash. This value is platform specific
197 // and depends on the system flash map. If BIOS size is bigger than flash return -1.
199 ((WINBOND_W25Q32_SIZE
>= FLASH_SIZE
) ? WINBOND_W25Q32_SIZE
- FLASH_SIZE
: (UINTN
) (-1)),
202 // The size of the BIOS image in flash. This value is platform specific and depends on the system flash map.
207 SF_VENDOR_ID_WINBOND
, // VendorId
208 SF_DEVICE_ID0_W25XXX
, // DeviceId 0
209 SF_DEVICE_ID1_W25X32
, // DeviceId 1
211 SF_INST_WREN
, // Prefix Opcode 0: Write Enable
212 SF_INST_EWSR
// Prefix Opcode 1: Enable Write Status Register
215 {EnumSpiOpcodeReadNoAddr
, SF_INST_JEDEC_READ_ID
, EnumSpiCycle50MHz
, EnumSpiOperationJedecId
}, // Opcode 0: Read ID
216 {EnumSpiOpcodeRead
, SF_INST_READ
, EnumSpiCycle50MHz
, EnumSpiOperationReadData
}, // Opcode 1: Read
217 {EnumSpiOpcodeReadNoAddr
, SF_INST_RDSR
, EnumSpiCycle50MHz
, EnumSpiOperationReadStatus
}, // Opcode 2: Read Status Register
218 {EnumSpiOpcodeRead
, SF_INST_SFDP
, EnumSpiCycle50MHz
, EnumSpiOperationDiscoveryParameters
}, // Opcode 3: Serial Flash Discovery Parameters
219 {EnumSpiOpcodeWrite
, SF_INST_SERASE
, EnumSpiCycle50MHz
, EnumSpiOperationErase_4K_Byte
}, // Opcode 4: Sector Erase (4KB)
220 {EnumSpiOpcodeWrite
, SF_INST_64KB_ERASE
, EnumSpiCycle50MHz
, EnumSpiOperationErase_64K_Byte
}, // Opcode 5: Block Erase (64KB
221 {EnumSpiOpcodeWrite
, SF_INST_PROG
, EnumSpiCycle50MHz
, EnumSpiOperationProgramData_1_Byte
}, // Opcode 6: Byte Program
222 {EnumSpiOpcodeWriteNoAddr
, SF_INST_WRSR
, EnumSpiCycle50MHz
, EnumSpiOperationWriteStatus
}, // Opcode 7: Write Status Register
226 // The offset of the start of the BIOS image in flash. This value is platform specific
227 // and depends on the system flash map. If BIOS size is bigger than flash return -1.
229 ((WINBOND_W25X32_SIZE
>= FLASH_SIZE
) ? WINBOND_W25X32_SIZE
- FLASH_SIZE
: (UINTN
) (-1)),
232 // The size of the BIOS image in flash. This value is platform specific and depends on the system flash map.
237 SF_VENDOR_ID_WINBOND
, // VendorId
238 SF_DEVICE_ID0_W25XXX
, // DeviceId 0
239 SF_DEVICE_ID1_W25X64
, // DeviceId 1
241 SF_INST_WREN
, // Prefix Opcode 0: Write Enable
242 SF_INST_EWSR
// Prefix Opcode 1: Enable Write Status Register
245 {EnumSpiOpcodeReadNoAddr
, SF_INST_JEDEC_READ_ID
, EnumSpiCycle50MHz
, EnumSpiOperationJedecId
}, // Opcode 0: Read ID
246 {EnumSpiOpcodeRead
, SF_INST_READ
, EnumSpiCycle50MHz
, EnumSpiOperationReadData
}, // Opcode 1: Read
247 {EnumSpiOpcodeReadNoAddr
, SF_INST_RDSR
, EnumSpiCycle50MHz
, EnumSpiOperationReadStatus
}, // Opcode 2: Read Status Register
248 {EnumSpiOpcodeRead
, SF_INST_SFDP
, EnumSpiCycle50MHz
, EnumSpiOperationDiscoveryParameters
}, // Opcode 3: Serial Flash Discovery Parameters
249 {EnumSpiOpcodeWrite
, SF_INST_SERASE
, EnumSpiCycle50MHz
, EnumSpiOperationErase_4K_Byte
}, // Opcode 4: Sector Erase (4KB)
250 {EnumSpiOpcodeWrite
, SF_INST_64KB_ERASE
, EnumSpiCycle50MHz
, EnumSpiOperationErase_64K_Byte
}, // Opcode 5: Block Erase (64KB
251 {EnumSpiOpcodeWrite
, SF_INST_PROG
, EnumSpiCycle50MHz
, EnumSpiOperationProgramData_1_Byte
}, // Opcode 6: Byte Program
252 {EnumSpiOpcodeWriteNoAddr
, SF_INST_WRSR
, EnumSpiCycle50MHz
, EnumSpiOperationWriteStatus
}, // Opcode 7: Write Status Register
256 // The offset of the start of the BIOS image in flash. This value is platform specific
257 // and depends on the system flash map. If BIOS size is bigger than flash return -1.
259 ((WINBOND_W25X64_SIZE
>= FLASH_SIZE
) ? WINBOND_W25X64_SIZE
- FLASH_SIZE
: (UINTN
) (-1)),
262 // The size of the BIOS image in flash. This value is platform specific and depends on the system flash map.
267 SF_VENDOR_ID_WINBOND
, // VendorId
268 SF_DEVICE_ID0_W25QXX
, // DeviceId 0
269 SF_DEVICE_ID1_W25Q128
, // DeviceId 1
271 SF_INST_WREN
, // Prefix Opcode 0: Write Enable
272 SF_INST_EWSR
// Prefix Opcode 1: Enable Write Status Register
275 {EnumSpiOpcodeReadNoAddr
, SF_INST_JEDEC_READ_ID
, EnumSpiCycle50MHz
, EnumSpiOperationJedecId
}, // Opcode 0: Read ID
276 {EnumSpiOpcodeRead
, SF_INST_READ
, EnumSpiCycle50MHz
, EnumSpiOperationReadData
}, // Opcode 1: Read
277 {EnumSpiOpcodeReadNoAddr
, SF_INST_RDSR
, EnumSpiCycle50MHz
, EnumSpiOperationReadStatus
}, // Opcode 2: Read Status Register
278 {EnumSpiOpcodeRead
, SF_INST_SFDP
, EnumSpiCycle50MHz
, EnumSpiOperationDiscoveryParameters
}, // Opcode 3: Serial Flash Discovery Parameters
279 {EnumSpiOpcodeWrite
, SF_INST_SERASE
, EnumSpiCycle50MHz
, EnumSpiOperationErase_4K_Byte
}, // Opcode 4: Sector Erase (4KB)
280 {EnumSpiOpcodeWrite
, SF_INST_64KB_ERASE
, EnumSpiCycle50MHz
, EnumSpiOperationErase_64K_Byte
}, // Opcode 5: Block Erase (64KB
281 {EnumSpiOpcodeWrite
, SF_INST_PROG
, EnumSpiCycle50MHz
, EnumSpiOperationProgramData_1_Byte
}, // Opcode 6: Byte Program
282 {EnumSpiOpcodeWriteNoAddr
, SF_INST_WRSR
, EnumSpiCycle50MHz
, EnumSpiOperationWriteStatus
}, // Opcode 7: Write Status Register
286 // The offset of the start of the BIOS image in flash. This value is platform specific
287 // and depends on the system flash map. If BIOS size is bigger than flash return -1.
289 ((WINBOND_W25Q128_SIZE
>= FLASH_SIZE
) ? WINBOND_W25Q128_SIZE
- FLASH_SIZE
: (UINTN
) (-1)),
292 // The size of the BIOS image in flash. This value is platform specific and depends on the system flash map.
297 SF_VENDOR_ID_MACRONIX
, // VendorId
298 SF_DEVICE_ID0_MX25LXX
, // DeviceId 0
299 SF_DEVICE_ID1_MX25L16
, // DeviceId 1
301 SF_INST_WREN
, // Prefix Opcode 0: Write Enable
302 SF_INST_EWSR
// Prefix Opcode 1: Write Enable (this part doesn't support EWSR).
305 {EnumSpiOpcodeReadNoAddr
, SF_INST_JEDEC_READ_ID
, EnumSpiCycle50MHz
, EnumSpiOperationJedecId
}, // Opcode 0: Read ID
306 {EnumSpiOpcodeRead
, SF_INST_READ
, EnumSpiCycle33MHz
, EnumSpiOperationReadData
}, // Opcode 1: Read
307 {EnumSpiOpcodeReadNoAddr
, SF_INST_RDSR
, EnumSpiCycle50MHz
, EnumSpiOperationReadStatus
}, // Opcode 2: Read Status Register
308 {EnumSpiOpcodeRead
, SF_INST_SFDP
, EnumSpiCycle50MHz
, EnumSpiOperationDiscoveryParameters
}, // Opcode 3: Serial Flash Discovery Parameters
309 {EnumSpiOpcodeWrite
, SF_INST_SERASE
, EnumSpiCycle50MHz
, EnumSpiOperationErase_4K_Byte
}, // Opcode 4: Sector Erase (4KB)
310 {EnumSpiOpcodeWrite
, SF_INST_64KB_ERASE
, EnumSpiCycle50MHz
, EnumSpiOperationErase_64K_Byte
}, // Opcode 5: Block Erase (64KB
311 {EnumSpiOpcodeWrite
, SF_INST_PROG
, EnumSpiCycle50MHz
, EnumSpiOperationProgramData_1_Byte
}, // Opcode 6: Byte Program
312 {EnumSpiOpcodeWriteNoAddr
, SF_INST_WRSR
, EnumSpiCycle50MHz
, EnumSpiOperationWriteStatus
}, // Opcode 7: Write Status Register
316 // The offset of the start of the BIOS image in flash. This value is platform specific
317 // and depends on the system flash map. If BIOS size is bigger than flash return -1.
319 ((MACRONIX_MX25L16_SIZE
>= FLASH_SIZE
) ? MACRONIX_MX25L16_SIZE
- FLASH_SIZE
: (UINTN
) (-1)),
322 // The size of the BIOS image in flash. This value is platform specific and depends on the system flash map.
327 SF_VENDOR_ID_MACRONIX
, // VendorId
328 SF_DEVICE_ID0_MX25LXX
, // DeviceId 0
329 SF_DEVICE_ID1_MX25L32
, // DeviceId 1
331 SF_INST_WREN
, // Prefix Opcode 0: Write Enable
332 SF_INST_EWSR
// Prefix Opcode 1: Write Enable (this part doesn't support EWSR).
335 {EnumSpiOpcodeReadNoAddr
, SF_INST_JEDEC_READ_ID
, EnumSpiCycle50MHz
, EnumSpiOperationJedecId
}, // Opcode 0: Read ID
336 {EnumSpiOpcodeRead
, SF_INST_READ
, EnumSpiCycle33MHz
, EnumSpiOperationReadData
}, // Opcode 1: Read
337 {EnumSpiOpcodeReadNoAddr
, SF_INST_RDSR
, EnumSpiCycle50MHz
, EnumSpiOperationReadStatus
}, // Opcode 2: Read Status Register
338 {EnumSpiOpcodeRead
, SF_INST_SFDP
, EnumSpiCycle50MHz
, EnumSpiOperationDiscoveryParameters
}, // Opcode 3: Serial Flash Discovery Parameters
339 {EnumSpiOpcodeWrite
, SF_INST_SERASE
, EnumSpiCycle50MHz
, EnumSpiOperationErase_4K_Byte
}, // Opcode 4: Sector Erase (4KB)
340 {EnumSpiOpcodeWrite
, SF_INST_64KB_ERASE
, EnumSpiCycle50MHz
, EnumSpiOperationErase_64K_Byte
}, // Opcode 5: Block Erase (64KB
341 {EnumSpiOpcodeWrite
, SF_INST_PROG
, EnumSpiCycle50MHz
, EnumSpiOperationProgramData_1_Byte
}, // Opcode 6: Byte Program
342 {EnumSpiOpcodeWriteNoAddr
, SF_INST_WRSR
, EnumSpiCycle50MHz
, EnumSpiOperationWriteStatus
}, // Opcode 7: Write Status Register
346 // The offset of the start of the BIOS image in flash. This value is platform specific
347 // and depends on the system flash map. If BIOS size is bigger than flash return -1.
349 ((MACRONIX_MX25L32_SIZE
>= FLASH_SIZE
) ? MACRONIX_MX25L32_SIZE
- FLASH_SIZE
: (UINTN
) (-1)),
352 // The size of the BIOS image in flash. This value is platform specific and depends on the system flash map.
357 SF_VENDOR_ID_MACRONIX
, // VendorId
358 SF_DEVICE_ID0_MX25LXX
, // DeviceId 0
359 SF_DEVICE_ID1_MX25L64
, // DeviceId 1
361 SF_INST_WREN
, // Prefix Opcode 0: Write Enable
362 SF_INST_EWSR
// Prefix Opcode 1: Write Enable (this part doesn't support EWSR)
365 {EnumSpiOpcodeReadNoAddr
, SF_INST_JEDEC_READ_ID
, EnumSpiCycle50MHz
, EnumSpiOperationJedecId
}, // Opcode 0: Read ID
366 {EnumSpiOpcodeRead
, SF_INST_READ
, EnumSpiCycle33MHz
, EnumSpiOperationReadData
}, // Opcode 1: Read
367 {EnumSpiOpcodeReadNoAddr
, SF_INST_RDSR
, EnumSpiCycle50MHz
, EnumSpiOperationReadStatus
}, // Opcode 2: Read Status Register
368 {EnumSpiOpcodeRead
, SF_INST_SFDP
, EnumSpiCycle50MHz
, EnumSpiOperationDiscoveryParameters
}, // Opcode 3: Serial Flash Discovery Parameters
369 {EnumSpiOpcodeWrite
, SF_INST_SERASE
, EnumSpiCycle50MHz
, EnumSpiOperationErase_4K_Byte
}, // Opcode 4: Sector Erase (4KB)
370 {EnumSpiOpcodeWrite
, SF_INST_64KB_ERASE
, EnumSpiCycle50MHz
, EnumSpiOperationErase_64K_Byte
}, // Opcode 5: Block Erase (64KB
371 {EnumSpiOpcodeWrite
, SF_INST_PROG
, EnumSpiCycle50MHz
, EnumSpiOperationProgramData_1_Byte
}, // Opcode 6: Byte Program
372 {EnumSpiOpcodeWriteNoAddr
, SF_INST_WRSR
, EnumSpiCycle50MHz
, EnumSpiOperationWriteStatus
}, // Opcode 7: Write Status Register
376 // The offset of the start of the BIOS image in flash. This value is platform specific
377 // and depends on the system flash map. If BIOS size is bigger than flash return -1.
379 ((MACRONIX_MX25L64_SIZE
>= FLASH_SIZE
) ? MACRONIX_MX25L64_SIZE
- FLASH_SIZE
: (UINTN
) (-1)),
382 // The size of the BIOS image in flash. This value is platform specific and depends on the system flash map.
387 SF_VENDOR_ID_MACRONIX
, // VendorId
388 SF_DEVICE_ID0_MX25LXX
, // DeviceId 0
389 SF_DEVICE_ID1_MX25L128
, // DeviceId 1
391 SF_INST_WREN
, // Prefix Opcode 0: Write Enable
392 SF_INST_EWSR
// Prefix Opcode 1: Write Enable (this part doesn't support EWSR)
395 {EnumSpiOpcodeReadNoAddr
, SF_INST_JEDEC_READ_ID
, EnumSpiCycle50MHz
, EnumSpiOperationJedecId
}, // Opcode 0: Read ID
396 {EnumSpiOpcodeRead
, SF_INST_READ
, EnumSpiCycle33MHz
, EnumSpiOperationReadData
}, // Opcode 1: Read
397 {EnumSpiOpcodeReadNoAddr
, SF_INST_RDSR
, EnumSpiCycle50MHz
, EnumSpiOperationReadStatus
}, // Opcode 2: Read Status Register
398 {EnumSpiOpcodeRead
, SF_INST_SFDP
, EnumSpiCycle50MHz
, EnumSpiOperationDiscoveryParameters
}, // Opcode 3: Serial Flash Discovery Parameters
399 {EnumSpiOpcodeWrite
, SF_INST_SERASE
, EnumSpiCycle50MHz
, EnumSpiOperationErase_4K_Byte
}, // Opcode 4: Sector Erase (4KB)
400 {EnumSpiOpcodeWrite
, SF_INST_64KB_ERASE
, EnumSpiCycle50MHz
, EnumSpiOperationErase_64K_Byte
}, // Opcode 5: Block Erase (64KB
401 {EnumSpiOpcodeWrite
, SF_INST_PROG
, EnumSpiCycle50MHz
, EnumSpiOperationProgramData_1_Byte
}, // Opcode 6: Byte Program
402 {EnumSpiOpcodeWriteNoAddr
, SF_INST_WRSR
, EnumSpiCycle50MHz
, EnumSpiOperationWriteStatus
}, // Opcode 7: Write Status Register
406 // The offset of the start of the BIOS image in flash. This value is platform specific
407 // and depends on the system flash map. If BIOS size is bigger than flash return -1.
409 ((MACRONIX_MX25L128_SIZE
>= FLASH_SIZE
) ? MACRONIX_MX25L128_SIZE
- FLASH_SIZE
: (UINTN
) (-1)),
412 // The size of the BIOS image in flash. This value is platform specific and depends on the system flash map.
417 SF_VENDOR_ID_MACRONIX
, // VendorId
418 SF_DEVICE_ID0_MX25UXX
, // DeviceId 0
419 SF_DEVICE_ID1_MX25U6435F
, // DeviceId 1
421 SF_INST_WREN
, // Prefix Opcode 0: Write Enable
422 SF_INST_EWSR
// Prefix Opcode 1: Write Enable (this part doesn't support EWSR)
425 {EnumSpiOpcodeReadNoAddr
, SF_INST_JEDEC_READ_ID
, EnumSpiCycle50MHz
, EnumSpiOperationJedecId
}, // Opcode 0: Read ID
426 {EnumSpiOpcodeRead
, SF_INST_READ
, EnumSpiCycle33MHz
, EnumSpiOperationReadData
}, // Opcode 1: Read
427 {EnumSpiOpcodeReadNoAddr
, SF_INST_RDSR
, EnumSpiCycle50MHz
, EnumSpiOperationReadStatus
}, // Opcode 2: Read Status Register
428 {EnumSpiOpcodeRead
, SF_INST_SFDP
, EnumSpiCycle50MHz
, EnumSpiOperationDiscoveryParameters
}, // Opcode 3: Serial Flash Discovery Parameters
429 {EnumSpiOpcodeWrite
, SF_INST_SERASE
, EnumSpiCycle50MHz
, EnumSpiOperationErase_4K_Byte
}, // Opcode 4: Sector Erase (4KB)
430 {EnumSpiOpcodeWrite
, SF_INST_64KB_ERASE
, EnumSpiCycle50MHz
, EnumSpiOperationErase_64K_Byte
}, // Opcode 5: Block Erase (64KB
431 {EnumSpiOpcodeWrite
, SF_INST_PROG
, EnumSpiCycle50MHz
, EnumSpiOperationProgramData_1_Byte
}, // Opcode 6: Byte Program
432 {EnumSpiOpcodeWriteNoAddr
, SF_INST_WRSR
, EnumSpiCycle50MHz
, EnumSpiOperationWriteStatus
}, // Opcode 7: Write Status Register
436 // The offset of the start of the BIOS image in flash. This value is platform specific
437 // and depends on the system flash map. If BIOS size is bigger than flash return -1.
439 ((MACRONIX_MX25U64_SIZE
>= FLASH_SIZE
) ? MACRONIX_MX25U64_SIZE
- FLASH_SIZE
: (UINTN
) (-1)),
442 // The size of the BIOS image in flash. This value is platform specific and depends on the system flash map.
447 SF_VENDOR_ID_SST
, // VendorId
448 SF_DEVICE_ID0_SST25VF0XXX
,// DeviceId 0
449 SF_DEVICE_ID1_SST25VF016B
,// DeviceId 1
451 SF_INST_WREN
, // Prefix Opcode 0: Write Enable
452 SF_INST_EWSR
// Prefix Opcode 1: Enable Write Status Register
455 {EnumSpiOpcodeReadNoAddr
, SF_INST_JEDEC_READ_ID
, EnumSpiCycle50MHz
, EnumSpiOperationJedecId
}, // Opcode 0: Read ID
456 {EnumSpiOpcodeRead
, SF_INST_READ
, EnumSpiCycle20MHz
, EnumSpiOperationReadData
}, // Opcode 1: Read
457 {EnumSpiOpcodeReadNoAddr
, SF_INST_RDSR
, EnumSpiCycle50MHz
, EnumSpiOperationReadStatus
}, // Opcode 2: Read Status Register
458 {EnumSpiOpcodeWriteNoAddr
, SF_INST_WRDI
, EnumSpiCycle50MHz
, EnumSpiOperationWriteDisable
}, // Opcode 3: Write Disable
459 {EnumSpiOpcodeWrite
, SF_INST_SERASE
, EnumSpiCycle50MHz
, EnumSpiOperationErase_4K_Byte
}, // Opcode 4: Sector Erase (4KB)
460 {EnumSpiOpcodeWrite
, SF_INST_64KB_ERASE
, EnumSpiCycle50MHz
, EnumSpiOperationErase_64K_Byte
}, // Opcode 5: Block Erase (32KB)
461 {EnumSpiOpcodeWrite
, SF_INST_PROG
, EnumSpiCycle50MHz
, EnumSpiOperationProgramData_1_Byte
}, // Opcode 6: Byte Program
462 {EnumSpiOpcodeWriteNoAddr
, SF_INST_WRSR
, EnumSpiCycle50MHz
, EnumSpiOperationWriteStatus
}, // Opcode 7: Write Status Register
466 // The offset of the start of the BIOS image in flash. This value is platform specific
467 // and depends on the system flash map. If BIOS size is bigger than flash return -1.
469 ((SST_SST25VF016B_SIZE
>= FLASH_SIZE
) ? SST_SST25VF016B_SIZE
- FLASH_SIZE
: (UINTN
) (-1)),
472 // The size of the BIOS image in flash. This value is platform specific and depends on the system flash map.
477 SF_VENDOR_ID_SST
, // VendorId
478 SF_DEVICE_ID0_SST25VF0XXX
,// DeviceId 0
479 SF_DEVICE_ID1_SST25VF064C
,// DeviceId 1
481 SF_INST_WREN
, // Prefix Opcode 0: Write Enable
482 SF_INST_EWSR
// Prefix Opcode 1: Enable Write Status Register
485 {EnumSpiOpcodeReadNoAddr
, SF_INST_JEDEC_READ_ID
, EnumSpiCycle50MHz
, EnumSpiOperationJedecId
}, // Opcode 0: Read ID
486 {EnumSpiOpcodeRead
, SF_INST_READ
, EnumSpiCycle20MHz
, EnumSpiOperationReadData
}, // Opcode 1: Read
487 {EnumSpiOpcodeReadNoAddr
, SF_INST_RDSR
, EnumSpiCycle50MHz
, EnumSpiOperationReadStatus
}, // Opcode 2: Read Status Register
488 {EnumSpiOpcodeWriteNoAddr
, SF_INST_WRDI
, EnumSpiCycle50MHz
, EnumSpiOperationWriteDisable
}, // Opcode 3: Write Disable
489 {EnumSpiOpcodeWrite
, SF_INST_SERASE
, EnumSpiCycle50MHz
, EnumSpiOperationErase_4K_Byte
}, // Opcode 4: Sector Erase (4KB)
490 {EnumSpiOpcodeWrite
, SF_INST_64KB_ERASE
, EnumSpiCycle50MHz
, EnumSpiOperationErase_64K_Byte
}, // Opcode 5: Block Erase (32KB)
491 {EnumSpiOpcodeWrite
, SF_INST_PROG
, EnumSpiCycle50MHz
, EnumSpiOperationProgramData_1_Byte
}, // Opcode 6: Byte Program
492 {EnumSpiOpcodeWriteNoAddr
, SF_INST_WRSR
, EnumSpiCycle50MHz
, EnumSpiOperationWriteStatus
}, // Opcode 7: Write Status Register
496 // The offset of the start of the BIOS image in flash. This value is platform specific
497 // and depends on the system flash map. If BIOS size is bigger than flash return -1.
499 ((SST_SST25VF064C_SIZE
>= FLASH_SIZE
) ? SST_SST25VF064C_SIZE
- FLASH_SIZE
: (UINTN
) (-1)),
502 // The size of the BIOS image in flash. This value is platform specific and depends on the system flash map.
510 SF_VENDOR_ID_NUMONYX
, // VendorId
511 SF_DEVICE_ID0_N25Q064
, // DeviceId 0
512 SF_DEVICE_ID1_N25Q064
, // DeviceId 1
514 SF_INST_WREN
, // Prefix Opcode 0: Write Enable
515 SF_INST_WREN
// Prefix Opcode 1: Write Enable (this part doesn't support EWSR)
518 {EnumSpiOpcodeReadNoAddr
, SF_INST_JEDEC_READ_ID
, EnumSpiCycle20MHz
, EnumSpiOperationJedecId
}, // Opcode 0: Read ID
519 {EnumSpiOpcodeRead
, SF_INST_READ
, EnumSpiCycle20MHz
, EnumSpiOperationReadData
}, // Opcode 1: Read
520 {EnumSpiOpcodeReadNoAddr
, SF_INST_RDSR
, EnumSpiCycle20MHz
, EnumSpiOperationReadStatus
}, // Opcode 2: Read Status Register
521 {EnumSpiOpcodeWriteNoAddr
, SF_INST_WRDI
, EnumSpiCycle20MHz
, EnumSpiOperationWriteDisable
}, // Opcode 3: Write Disable
522 {EnumSpiOpcodeWrite
, SF_INST_SERASE
, EnumSpiCycle20MHz
, EnumSpiOperationErase_4K_Byte
}, // Opcode 4: Sector Erase (4KB)
523 {EnumSpiOpcodeWrite
, SF_INST_64KB_ERASE
, EnumSpiCycle20MHz
, EnumSpiOperationErase_64K_Byte
}, // Opcode 5: Block Erase (64KB
524 {EnumSpiOpcodeWrite
, SF_INST_PROG
, EnumSpiCycle20MHz
, EnumSpiOperationProgramData_1_Byte
}, // Opcode 6: Byte Program
525 {EnumSpiOpcodeWriteNoAddr
, SF_INST_WRSR
, EnumSpiCycle20MHz
, EnumSpiOperationWriteStatus
}, // Opcode 7: Write Status Register
529 // The offset of the start of the BIOS image in flash. This value is platform specific
530 // and depends on the system flash map. If BIOS size is bigger than flash return -1.
532 ((NUMONYX_N25Q064_SIZE
>= FLASH_SIZE
) ? NUMONYX_N25Q064_SIZE
- FLASH_SIZE
: (UINTN
) (-1)),
535 // The size of the BIOS image in flash. This value is platform specific and depends on the system flash map.
540 SF_VENDOR_ID_NUMONYX
, // VendorId
541 SF_DEVICE_ID0_M25PXXX
, // DeviceId 0
542 SF_DEVICE_ID1_M25PX16
, // DeviceId 1
544 SF_INST_WREN
, // Prefix Opcode 0: Write Enable
545 SF_INST_WREN
// Prefix Opcode 1: Write Enable (this part doesn't support EWSR).
548 {EnumSpiOpcodeReadNoAddr
, SF_INST_JEDEC_READ_ID
, EnumSpiCycle50MHz
, EnumSpiOperationJedecId
}, // Opcode 0: Read ID
549 {EnumSpiOpcodeRead
, SF_INST_READ
, EnumSpiCycle33MHz
, EnumSpiOperationReadData
}, // Opcode 1: Read
550 {EnumSpiOpcodeReadNoAddr
, SF_INST_RDSR
, EnumSpiCycle50MHz
, EnumSpiOperationReadStatus
}, // Opcode 2: Read Status Register
551 {EnumSpiOpcodeWriteNoAddr
, SF_INST_WRDI
, EnumSpiCycle50MHz
, EnumSpiOperationWriteDisable
}, // Opcode 3: Write Disable
552 {EnumSpiOpcodeWrite
, SF_INST_SERASE
, EnumSpiCycle50MHz
, EnumSpiOperationErase_4K_Byte
}, // Opcode 4: Sector Erase (4KB)
553 {EnumSpiOpcodeWrite
, SF_INST_64KB_ERASE
, EnumSpiCycle50MHz
, EnumSpiOperationErase_64K_Byte
}, // Opcode 5: Block Erase (64KB
554 {EnumSpiOpcodeWrite
, SF_INST_PROG
, EnumSpiCycle50MHz
, EnumSpiOperationProgramData_1_Byte
}, // Opcode 6: Byte Program
555 {EnumSpiOpcodeWriteNoAddr
, SF_INST_WRSR
, EnumSpiCycle50MHz
, EnumSpiOperationWriteStatus
}, // Opcode 7: Write Status Register
559 // The offset of the start of the BIOS image in flash. This value is platform specific
560 // and depends on the system flash map. If BIOS size is bigger than flash return -1.
562 ((NUMONYX_M25PX16_SIZE
>= FLASH_SIZE
) ? NUMONYX_M25PX16_SIZE
- FLASH_SIZE
: (UINTN
) (-1)),
565 // The size of the BIOS image in flash. This value is platform specific and depends on the system flash map.
570 SF_VENDOR_ID_NUMONYX
, // VendorId
571 SF_DEVICE_ID0_N25QXXX
, // DeviceId 0
572 SF_DEVICE_ID1_N25Q032
, // DeviceId 1
574 SF_INST_WREN
, // Prefix Opcode 0: Write Enable
575 SF_INST_WREN
// Prefix Opcode 1: Write Enable (this part doesn't support EWSR).
578 {EnumSpiOpcodeReadNoAddr
, SF_INST_JEDEC_READ_ID
, EnumSpiCycle50MHz
, EnumSpiOperationJedecId
}, // Opcode 0: Read ID
579 {EnumSpiOpcodeRead
, SF_INST_READ
, EnumSpiCycle33MHz
, EnumSpiOperationReadData
}, // Opcode 1: Read
580 {EnumSpiOpcodeReadNoAddr
, SF_INST_RDSR
, EnumSpiCycle50MHz
, EnumSpiOperationReadStatus
}, // Opcode 2: Read Status Register
581 {EnumSpiOpcodeWriteNoAddr
, SF_INST_WRDI
, EnumSpiCycle50MHz
, EnumSpiOperationWriteDisable
}, // Opcode 3: Write Disable
582 {EnumSpiOpcodeWrite
, SF_INST_SERASE
, EnumSpiCycle50MHz
, EnumSpiOperationErase_4K_Byte
}, // Opcode 4: Sector Erase (4KB)
583 {EnumSpiOpcodeWrite
, SF_INST_64KB_ERASE
, EnumSpiCycle50MHz
, EnumSpiOperationErase_64K_Byte
}, // Opcode 5: Block Erase (64KB
584 {EnumSpiOpcodeWrite
, SF_INST_PROG
, EnumSpiCycle50MHz
, EnumSpiOperationProgramData_1_Byte
}, // Opcode 6: Byte Program
585 {EnumSpiOpcodeWriteNoAddr
, SF_INST_WRSR
, EnumSpiCycle50MHz
, EnumSpiOperationWriteStatus
}, // Opcode 7: Write Status Register
589 // The offset of the start of the BIOS image in flash. This value is platform specific
590 // and depends on the system flash map. If BIOS size is bigger than flash return -1.
592 ((NUMONYX_N25Q032_SIZE
>= FLASH_SIZE
) ? NUMONYX_N25Q032_SIZE
- FLASH_SIZE
: (UINTN
) (-1)),
595 // The size of the BIOS image in flash. This value is platform specific and depends on the system flash map.
600 SF_VENDOR_ID_NUMONYX
, // VendorId
601 SF_DEVICE_ID0_M25PXXX
, // DeviceId 0
602 SF_DEVICE_ID1_M25PX32
, // DeviceId 1
604 SF_INST_WREN
, // Prefix Opcode 0: Write Enable
605 SF_INST_WREN
// Prefix Opcode 1: Write Enable (this part doesn't support EWSR).
608 {EnumSpiOpcodeReadNoAddr
, SF_INST_JEDEC_READ_ID
, EnumSpiCycle50MHz
, EnumSpiOperationJedecId
}, // Opcode 0: Read ID
609 {EnumSpiOpcodeRead
, SF_INST_READ
, EnumSpiCycle33MHz
, EnumSpiOperationReadData
}, // Opcode 1: Read
610 {EnumSpiOpcodeReadNoAddr
, SF_INST_RDSR
, EnumSpiCycle50MHz
, EnumSpiOperationReadStatus
}, // Opcode 2: Read Status Register
611 {EnumSpiOpcodeWriteNoAddr
, SF_INST_WRDI
, EnumSpiCycle50MHz
, EnumSpiOperationWriteDisable
}, // Opcode 3: Write Disable
612 {EnumSpiOpcodeWrite
, SF_INST_SERASE
, EnumSpiCycle50MHz
, EnumSpiOperationErase_4K_Byte
}, // Opcode 4: Sector Erase (4KB)
613 {EnumSpiOpcodeWrite
, SF_INST_64KB_ERASE
, EnumSpiCycle50MHz
, EnumSpiOperationErase_64K_Byte
}, // Opcode 5: Block Erase (64KB
614 {EnumSpiOpcodeWrite
, SF_INST_PROG
, EnumSpiCycle50MHz
, EnumSpiOperationProgramData_1_Byte
}, // Opcode 6: Byte Program
615 {EnumSpiOpcodeWriteNoAddr
, SF_INST_WRSR
, EnumSpiCycle50MHz
, EnumSpiOperationWriteStatus
}, // Opcode 7: Write Status Register
619 // The offset of the start of the BIOS image in flash. This value is platform specific
620 // and depends on the system flash map. If BIOS size is bigger than flash return -1.
622 ((NUMONYX_M25PX32_SIZE
>= FLASH_SIZE
) ? NUMONYX_M25PX32_SIZE
- FLASH_SIZE
: (UINTN
) (-1)),
625 // The size of the BIOS image in flash. This value is platform specific and depends on the system flash map.
630 SF_VENDOR_ID_NUMONYX
, // VendorId
631 SF_DEVICE_ID0_M25PXXX
, // DeviceId 0
632 SF_DEVICE_ID1_M25PX64
, // DeviceId 1
634 SF_INST_WREN
, // Prefix Opcode 0: Write Enable
635 SF_INST_WREN
// Prefix Opcode 1: Write Enable (this part doesn't support EWSR)
638 {EnumSpiOpcodeReadNoAddr
, SF_INST_JEDEC_READ_ID
, EnumSpiCycle50MHz
, EnumSpiOperationJedecId
}, // Opcode 0: Read ID
639 {EnumSpiOpcodeRead
, SF_INST_READ
, EnumSpiCycle33MHz
, EnumSpiOperationReadData
}, // Opcode 1: Read
640 {EnumSpiOpcodeReadNoAddr
, SF_INST_RDSR
, EnumSpiCycle50MHz
, EnumSpiOperationReadStatus
}, // Opcode 2: Read Status Register
641 {EnumSpiOpcodeWriteNoAddr
, SF_INST_WRDI
, EnumSpiCycle50MHz
, EnumSpiOperationWriteDisable
}, // Opcode 3: Write Disable
642 {EnumSpiOpcodeWrite
, SF_INST_SERASE
, EnumSpiCycle50MHz
, EnumSpiOperationErase_4K_Byte
}, // Opcode 4: Sector Erase (4KB)
643 {EnumSpiOpcodeWrite
, SF_INST_64KB_ERASE
, EnumSpiCycle50MHz
, EnumSpiOperationErase_64K_Byte
}, // Opcode 5: Block Erase (64KB
644 {EnumSpiOpcodeWrite
, SF_INST_PROG
, EnumSpiCycle50MHz
, EnumSpiOperationProgramData_1_Byte
}, // Opcode 6: Byte Program
645 {EnumSpiOpcodeWriteNoAddr
, SF_INST_WRSR
, EnumSpiCycle50MHz
, EnumSpiOperationWriteStatus
}, // Opcode 7: Write Status Register
649 // The offset of the start of the BIOS image in flash. This value is platform specific
650 // and depends on the system flash map. If BIOS size is bigger than flash return -1.
652 ((NUMONYX_M25PX64_SIZE
>= FLASH_SIZE
) ? NUMONYX_M25PX64_SIZE
- FLASH_SIZE
: (UINTN
) (-1)),
655 // The size of the BIOS image in flash. This value is platform specific and depends on the system flash map.
660 SF_VENDOR_ID_NUMONYX
, // VendorId
661 SF_DEVICE_ID0_N25QXXX
, // DeviceId 0
662 SF_DEVICE_ID1_N25Q128
, // DeviceId 1
664 SF_INST_WREN
, // Prefix Opcode 0: Write Enable
665 SF_INST_WREN
// Prefix Opcode 1: Write Enable (this part doesn't support EWSR)
668 {EnumSpiOpcodeReadNoAddr
, SF_INST_JEDEC_READ_ID
, EnumSpiCycle50MHz
, EnumSpiOperationJedecId
}, // Opcode 0: Read ID
669 {EnumSpiOpcodeRead
, SF_INST_READ
, EnumSpiCycle33MHz
, EnumSpiOperationReadData
}, // Opcode 1: Read
670 {EnumSpiOpcodeReadNoAddr
, SF_INST_RDSR
, EnumSpiCycle50MHz
, EnumSpiOperationReadStatus
}, // Opcode 2: Read Status Register
671 {EnumSpiOpcodeWriteNoAddr
, SF_INST_WRDI
, EnumSpiCycle50MHz
, EnumSpiOperationWriteDisable
}, // Opcode 3: Write Disable
672 {EnumSpiOpcodeWrite
, SF_INST_SERASE
, EnumSpiCycle50MHz
, EnumSpiOperationErase_4K_Byte
}, // Opcode 4: Sector Erase (4KB)
673 {EnumSpiOpcodeWrite
, SF_INST_64KB_ERASE
, EnumSpiCycle50MHz
, EnumSpiOperationErase_64K_Byte
}, // Opcode 5: Block Erase (64KB
674 {EnumSpiOpcodeWrite
, SF_INST_PROG
, EnumSpiCycle50MHz
, EnumSpiOperationProgramData_1_Byte
}, // Opcode 6: Byte Program
675 {EnumSpiOpcodeWriteNoAddr
, SF_INST_WRSR
, EnumSpiCycle50MHz
, EnumSpiOperationWriteStatus
}, // Opcode 7: Write Status Register
679 // The offset of the start of the BIOS image in flash. This value is platform specific
680 // and depends on the system flash map. If BIOS size is bigger than flash return -1.
682 ((NUMONYX_N25Q128_SIZE
>= FLASH_SIZE
) ? NUMONYX_N25Q128_SIZE
- FLASH_SIZE
: (UINTN
) (-1)),
685 // The size of the BIOS image in flash. This value is platform specific and depends on the system flash map.
690 SF_VENDOR_ID_EON
, // VendorId
691 SF_DEVICE_ID0_EN25QXX
, // DeviceId 0
692 SF_DEVICE_ID1_EN25Q16
, // DeviceId 1
694 SF_INST_WREN
, // Prefix Opcode 0: Write Enable
695 SF_INST_WREN
// Prefix Opcode 1: Write Enable (this part doesn't support EWSR)
698 {EnumSpiOpcodeReadNoAddr
, SF_INST_JEDEC_READ_ID
, EnumSpiCycle50MHz
, EnumSpiOperationJedecId
}, // Opcode 0: Read ID
699 {EnumSpiOpcodeRead
, SF_INST_READ
, EnumSpiCycle50MHz
, EnumSpiOperationReadData
}, // Opcode 1: Read
700 {EnumSpiOpcodeReadNoAddr
, SF_INST_RDSR
, EnumSpiCycle50MHz
, EnumSpiOperationReadStatus
}, // Opcode 2: Read Status Register
701 {EnumSpiOpcodeWriteNoAddr
, SF_INST_WRDI
, EnumSpiCycle50MHz
, EnumSpiOperationWriteDisable
}, // Opcode 3: Write Disable
702 {EnumSpiOpcodeWrite
, SF_INST_SERASE
, EnumSpiCycle50MHz
, EnumSpiOperationErase_4K_Byte
}, // Opcode 4: Sector Erase (4KB)
703 {EnumSpiOpcodeWrite
, SF_INST_64KB_ERASE
, EnumSpiCycle50MHz
, EnumSpiOperationErase_64K_Byte
}, // Opcode 5: Block Erase (64KB
704 {EnumSpiOpcodeWrite
, SF_INST_PROG
, EnumSpiCycle50MHz
, EnumSpiOperationProgramData_1_Byte
}, // Opcode 6: Byte Program
705 {EnumSpiOpcodeWriteNoAddr
, SF_INST_WRSR
, EnumSpiCycle50MHz
, EnumSpiOperationWriteStatus
}, // Opcode 7: Write Status Register
709 // The offset of the start of the BIOS image in flash. This value is platform specific
710 // and depends on the system flash map. If BIOS size is bigger than flash return -1.
712 ((EON_EN25Q16_SIZE
>= FLASH_SIZE
) ? EON_EN25Q16_SIZE
- FLASH_SIZE
: (UINTN
) (-1)),
715 // The size of the BIOS image in flash. This value is platform specific and depends on the system flash map.
720 SF_VENDOR_ID_EON
, // VendorId
721 SF_DEVICE_ID0_EN25QXX
, // DeviceId 0
722 SF_DEVICE_ID1_EN25Q32
, // DeviceId 1
724 SF_INST_WREN
, // Prefix Opcode 0: Write Enable
725 SF_INST_WREN
// Prefix Opcode 1: Write Enable (this part doesn't support EWSR)
728 {EnumSpiOpcodeReadNoAddr
, SF_INST_JEDEC_READ_ID
, EnumSpiCycle50MHz
, EnumSpiOperationJedecId
}, // Opcode 0: Read ID
729 {EnumSpiOpcodeRead
, SF_INST_READ
, EnumSpiCycle33MHz
, EnumSpiOperationReadData
}, // Opcode 1: Read
730 {EnumSpiOpcodeReadNoAddr
, SF_INST_RDSR
, EnumSpiCycle50MHz
, EnumSpiOperationReadStatus
}, // Opcode 2: Read Status Register
731 {EnumSpiOpcodeWriteNoAddr
, SF_INST_WRDI
, EnumSpiCycle50MHz
, EnumSpiOperationWriteDisable
}, // Opcode 3: Write Disable
732 {EnumSpiOpcodeWrite
, SF_INST_SERASE
, EnumSpiCycle50MHz
, EnumSpiOperationErase_4K_Byte
}, // Opcode 4: Sector Erase (4KB)
733 {EnumSpiOpcodeWrite
, SF_INST_64KB_ERASE
, EnumSpiCycle50MHz
, EnumSpiOperationErase_64K_Byte
}, // Opcode 5: Block Erase (64KB
734 {EnumSpiOpcodeWrite
, SF_INST_PROG
, EnumSpiCycle50MHz
, EnumSpiOperationProgramData_1_Byte
}, // Opcode 6: Byte Program
735 {EnumSpiOpcodeWriteNoAddr
, SF_INST_WRSR
, EnumSpiCycle50MHz
, EnumSpiOperationWriteStatus
}, // Opcode 7: Write Status Register
739 // The offset of the start of the BIOS image in flash. This value is platform specific
740 // and depends on the system flash map. If BIOS size is bigger than flash return -1.
742 ((EON_EN25Q32_SIZE
>= FLASH_SIZE
) ? EON_EN25Q32_SIZE
- FLASH_SIZE
: (UINTN
) (-1)),
745 // The size of the BIOS image in flash. This value is platform specific and depends on the system flash map.
750 SF_VENDOR_ID_EON
, // VendorId
751 SF_DEVICE_ID0_EN25QXX
, // DeviceId 0
752 SF_DEVICE_ID1_EN25Q64
, // DeviceId 1
754 SF_INST_WREN
, // Prefix Opcode 0: Write Enable
755 SF_INST_WREN
// Prefix Opcode 1: Write Enable (this part doesn't support EWSR).
758 {EnumSpiOpcodeReadNoAddr
, SF_INST_JEDEC_READ_ID
, EnumSpiCycle50MHz
, EnumSpiOperationJedecId
}, // Opcode 0: Read ID
759 {EnumSpiOpcodeRead
, SF_INST_READ
, EnumSpiCycle50MHz
, EnumSpiOperationReadData
}, // Opcode 1: Read
760 {EnumSpiOpcodeReadNoAddr
, SF_INST_RDSR
, EnumSpiCycle50MHz
, EnumSpiOperationReadStatus
}, // Opcode 2: Read Status Register
761 {EnumSpiOpcodeWriteNoAddr
, SF_INST_WRDI
, EnumSpiCycle50MHz
, EnumSpiOperationWriteDisable
}, // Opcode 3: Write Disable
762 {EnumSpiOpcodeWrite
, SF_INST_SERASE
, EnumSpiCycle50MHz
, EnumSpiOperationErase_4K_Byte
}, // Opcode 4: Sector Erase (4KB)
763 {EnumSpiOpcodeWrite
, SF_INST_64KB_ERASE
, EnumSpiCycle50MHz
, EnumSpiOperationErase_64K_Byte
}, // Opcode 5: Block Erase (64KB
764 {EnumSpiOpcodeWrite
, SF_INST_PROG
, EnumSpiCycle50MHz
, EnumSpiOperationProgramData_1_Byte
}, // Opcode 6: Byte Program
765 {EnumSpiOpcodeWriteNoAddr
, SF_INST_WRSR
, EnumSpiCycle50MHz
, EnumSpiOperationWriteStatus
}, // Opcode 7: Write Status Register
769 // The offset of the start of the BIOS image in flash. This value is platform specific
770 // and depends on the system flash map. If BIOS size is bigger than flash return -1.
772 ((EON_EN25Q64_SIZE
>= FLASH_SIZE
) ? EON_EN25Q64_SIZE
- FLASH_SIZE
: (UINTN
) (-1)),
775 // The size of the BIOS image in flash. This value is platform specific and depends on the system flash map.
780 SF_VENDOR_ID_EON
, // VendorId
781 SF_DEVICE_ID0_EN25QXX
, // DeviceId 0
782 SF_DEVICE_ID1_EN25Q128
, // DeviceId 1
784 SF_INST_WREN
, // Prefix Opcode 0: Write Enable
785 SF_INST_WREN
// Prefix Opcode 1: Write Enable (this part doesn't support EWSR)
788 {EnumSpiOpcodeReadNoAddr
, SF_INST_JEDEC_READ_ID
, EnumSpiCycle50MHz
, EnumSpiOperationJedecId
}, // Opcode 0: Read ID
789 {EnumSpiOpcodeRead
, SF_INST_READ
, EnumSpiCycle50MHz
, EnumSpiOperationReadData
}, // Opcode 1: Read
790 {EnumSpiOpcodeReadNoAddr
, SF_INST_RDSR
, EnumSpiCycle50MHz
, EnumSpiOperationReadStatus
}, // Opcode 2: Read Status Register
791 {EnumSpiOpcodeWriteNoAddr
, SF_INST_WRDI
, EnumSpiCycle50MHz
, EnumSpiOperationWriteDisable
}, // Opcode 3: Write Disable
792 {EnumSpiOpcodeWrite
, SF_INST_SERASE
, EnumSpiCycle50MHz
, EnumSpiOperationErase_4K_Byte
}, // Opcode 4: Sector Erase (4KB)
793 {EnumSpiOpcodeWrite
, SF_INST_64KB_ERASE
, EnumSpiCycle50MHz
, EnumSpiOperationErase_64K_Byte
}, // Opcode 5: Block Erase (64KB
794 {EnumSpiOpcodeWrite
, SF_INST_PROG
, EnumSpiCycle50MHz
, EnumSpiOperationProgramData_1_Byte
}, // Opcode 6: Byte Program
795 {EnumSpiOpcodeWriteNoAddr
, SF_INST_WRSR
, EnumSpiCycle50MHz
, EnumSpiOperationWriteStatus
}, // Opcode 7: Write Status Register
799 // The offset of the start of the BIOS image in flash. This value is platform specific
800 // and depends on the system flash map. If BIOS size is bigger than flash return -1.
802 ((EON_EN25Q128_SIZE
>= FLASH_SIZE
) ? EON_EN25Q128_SIZE
- FLASH_SIZE
: (UINTN
) (-1)),
805 // The size of the BIOS image in flash. This value is platform specific and depends on the system flash map.
810 SF_VENDOR_ID_AMIC
, // VendorId
811 SF_DEVICE_ID0_A25L016
, // DeviceId 0
812 SF_DEVICE_ID1_A25L016
, // DeviceId 1
814 SF_INST_WREN
, // Prefix Opcode 0: Write Enable
815 SF_INST_WREN
// Prefix Opcode 1: Write Enable (this part doesn't support EWSR)
818 {EnumSpiOpcodeReadNoAddr
, SF_INST_JEDEC_READ_ID
, EnumSpiCycle50MHz
, EnumSpiOperationJedecId
}, // Opcode 0: Read ID
819 {EnumSpiOpcodeRead
, SF_INST_READ
, EnumSpiCycle50MHz
, EnumSpiOperationReadData
}, // Opcode 1: Read
820 {EnumSpiOpcodeReadNoAddr
, SF_INST_RDSR
, EnumSpiCycle50MHz
, EnumSpiOperationReadStatus
}, // Opcode 2: Read Status Register
821 {EnumSpiOpcodeWriteNoAddr
, SF_INST_WRDI
, EnumSpiCycle50MHz
, EnumSpiOperationWriteDisable
}, // Opcode 3: Write Disable
822 {EnumSpiOpcodeWrite
, SF_INST_SERASE
, EnumSpiCycle50MHz
, EnumSpiOperationErase_4K_Byte
}, // Opcode 4: Sector Erase (4KB)
823 {EnumSpiOpcodeWrite
, SF_INST_64KB_ERASE
, EnumSpiCycle50MHz
, EnumSpiOperationErase_64K_Byte
}, // Opcode 5: Block Erase (64KB
824 {EnumSpiOpcodeWrite
, SF_INST_PROG
, EnumSpiCycle50MHz
, EnumSpiOperationProgramData_1_Byte
}, // Opcode 6: Byte Program
825 {EnumSpiOpcodeWriteNoAddr
, SF_INST_WRSR
, EnumSpiCycle50MHz
, EnumSpiOperationWriteStatus
}, // Opcode 7: Write Status Register
829 // The offset of the start of the BIOS image in flash. This value is platform specific
830 // and depends on the system flash map. If BIOS size is bigger than flash return -1.
832 ((AMIC_A25L16_SIZE
>= FLASH_SIZE
) ? AMIC_A25L16_SIZE
- FLASH_SIZE
: (UINTN
) (-1)),
835 // The size of the BIOS image in flash. This value is platform specific and depends on the system flash map.