3 Copyright (c) 2004 - 2016, Intel Corporation. All rights reserved.<BR>
5 SPDX-License-Identifier: BSD-2-Clause-Patent
11 #include <Library/SpiFlash.H>
13 #define FLASH_SIZE 0x400000
14 #define FLASH_DEVICE_BASE_ADDRESS (0xFFFFFFFF-FLASH_SIZE+1)
17 // Serial Flash device initialization data table provided to the
18 // Intel(R) SPI Host Controller Compatibility Interface.
20 SPI_INIT_TABLE mInitTable
[] = {
22 SF_VENDOR_ID_WINBOND
, // VendorId
23 SF_DEVICE_ID0_W25QXX
, // DeviceId 0
24 SF_DEVICE_ID1_W25Q64
, // DeviceId 1
26 SF_INST_WREN
, // Prefix Opcode 0: Write Enable
27 SF_INST_EWSR
// Prefix Opcode 1: Enable Write Status Register
30 {EnumSpiOpcodeReadNoAddr
, SF_INST_JEDEC_READ_ID
, EnumSpiCycle50MHz
, EnumSpiOperationJedecId
}, // Opcode 0: Read ID
31 {EnumSpiOpcodeRead
, SF_INST_READ
, EnumSpiCycle50MHz
, EnumSpiOperationReadData
}, // Opcode 1: Read
32 {EnumSpiOpcodeReadNoAddr
, SF_INST_RDSR
, EnumSpiCycle50MHz
, EnumSpiOperationReadStatus
}, // Opcode 2: Read Status Register
33 {EnumSpiOpcodeRead
, SF_INST_SFDP
, EnumSpiCycle50MHz
, EnumSpiOperationDiscoveryParameters
}, // Opcode 3: Serial Flash Discovery Parameters
34 {EnumSpiOpcodeWrite
, SF_INST_SERASE
, EnumSpiCycle50MHz
, EnumSpiOperationErase_4K_Byte
}, // Opcode 4: Sector Erase (4KB)
35 {EnumSpiOpcodeWrite
, SF_INST_64KB_ERASE
, EnumSpiCycle50MHz
, EnumSpiOperationErase_64K_Byte
}, // Opcode 5: Block Erase (64KB
36 {EnumSpiOpcodeWrite
, SF_INST_PROG
, EnumSpiCycle50MHz
, EnumSpiOperationProgramData_1_Byte
}, // Opcode 6: Byte Program
37 {EnumSpiOpcodeWriteNoAddr
, SF_INST_WRSR
, EnumSpiCycle50MHz
, EnumSpiOperationWriteStatus
}, // Opcode 7: Write Status Register
41 // The offset of the start of the BIOS image in flash. This value is platform specific
42 // and depends on the system flash map. If BIOS size is bigger than flash return -1.
44 ((WINBOND_W25Q64_SIZE
>= FLASH_SIZE
) ? WINBOND_W25Q64_SIZE
- FLASH_SIZE
: (UINTN
) (-1)),
47 // The size of the BIOS image in flash. This value is platform specific and depends on the system flash map.
52 SF_VENDOR_ID_ATMEL
, // VendorId
53 SF_DEVICE_ID0_AT25DF321A
, // DeviceId 0
54 SF_DEVICE_ID1_AT25DF321A
, // DeviceId 1
56 SF_INST_WREN
, // Prefix Opcode 0: Write Enable
57 SF_INST_WREN
// Prefix Opcode 1: Write Enable (this part doesn't support EWSR).
60 {EnumSpiOpcodeReadNoAddr
, SF_INST_JEDEC_READ_ID
, EnumSpiCycle50MHz
, EnumSpiOperationJedecId
}, // Opcode 0: Read ID
61 {EnumSpiOpcodeRead
, SF_INST_READ
, EnumSpiCycle50MHz
, EnumSpiOperationReadData
}, // Opcode 1: Read
62 {EnumSpiOpcodeReadNoAddr
, SF_INST_RDSR
, EnumSpiCycle50MHz
, EnumSpiOperationReadStatus
}, // Opcode 2: Read Status Register
63 {EnumSpiOpcodeWriteNoAddr
, SF_INST_WRDI
, EnumSpiCycle50MHz
, EnumSpiOperationWriteDisable
}, // Opcode 3: Write Disable
64 {EnumSpiOpcodeWrite
, SF_INST_SERASE
, EnumSpiCycle50MHz
, EnumSpiOperationErase_4K_Byte
}, // Opcode 4: Sector Erase (4KB)
65 {EnumSpiOpcodeWrite
, SF_INST_64KB_ERASE
, EnumSpiCycle50MHz
, EnumSpiOperationErase_64K_Byte
}, // Opcode 5: Block Erase (32KB)
66 {EnumSpiOpcodeWrite
, SF_INST_PROG
, EnumSpiCycle50MHz
, EnumSpiOperationProgramData_1_Byte
}, // Opcode 6: Byte Program
67 {EnumSpiOpcodeWriteNoAddr
, SF_INST_WRSR
, EnumSpiCycle50MHz
, EnumSpiOperationWriteStatus
}, // Opcode 7: Write Status Register
71 // The offset of the start of the BIOS image in flash. This value is platform specific
72 // and depends on the system flash map. If BIOS size is bigger than flash return -1.
74 ((ATMEL_AT25DF321A_SIZE
>= FLASH_SIZE
) ? ATMEL_AT25DF321A_SIZE
- FLASH_SIZE
: (UINTN
) (-1)),
77 // The size of the BIOS image in flash. This value is platform specific and depends on the system flash map.
82 SF_VENDOR_ID_ATMEL
, // VendorId
83 SF_DEVICE_ID0_AT26DF321
, // DeviceId 0
84 SF_DEVICE_ID1_AT26DF321
, // DeviceId 1
86 SF_INST_WREN
, // Prefix Opcode 0: Write Enable
87 SF_INST_WREN
// Prefix Opcode 1: Write Enable (this part doesn't support EWSR).
90 {EnumSpiOpcodeReadNoAddr
, SF_INST_JEDEC_READ_ID
, EnumSpiCycle50MHz
, EnumSpiOperationJedecId
}, // Opcode 0: Read ID
91 {EnumSpiOpcodeRead
, SF_INST_READ
, EnumSpiCycle50MHz
, EnumSpiOperationReadData
}, // Opcode 1: Read
92 {EnumSpiOpcodeReadNoAddr
, SF_INST_RDSR
, EnumSpiCycle50MHz
, EnumSpiOperationReadStatus
}, // Opcode 2: Read Status Register
93 {EnumSpiOpcodeWriteNoAddr
, SF_INST_WRDI
, EnumSpiCycle50MHz
, EnumSpiOperationWriteDisable
}, // Opcode 3: Write Disable
94 {EnumSpiOpcodeWrite
, SF_INST_SERASE
, EnumSpiCycle50MHz
, EnumSpiOperationErase_4K_Byte
}, // Opcode 4: Sector Erase (4KB)
95 {EnumSpiOpcodeWrite
, SF_INST_64KB_ERASE
, EnumSpiCycle50MHz
, EnumSpiOperationErase_64K_Byte
}, // Opcode 5: Block Erase (32KB)
96 {EnumSpiOpcodeWrite
, SF_INST_PROG
, EnumSpiCycle50MHz
, EnumSpiOperationProgramData_1_Byte
}, // Opcode 6: Byte Program
97 {EnumSpiOpcodeWriteNoAddr
, SF_INST_WRSR
, EnumSpiCycle50MHz
, EnumSpiOperationWriteStatus
}, // Opcode 7: Write Status Register
101 // The offset of the start of the BIOS image in flash. This value is platform specific
102 // and depends on the system flash map. If BIOS size is bigger than flash return -1.
104 ((ATMEL_AT26DF321_SIZE
>= FLASH_SIZE
) ? ATMEL_AT26DF321_SIZE
- FLASH_SIZE
: (UINTN
) (-1)),
107 // The size of the BIOS image in flash. This value is platform specific and depends on the system flash map.
112 SF_VENDOR_ID_ATMEL
, // VendorId
113 SF_DEVICE_ID0_AT25DF641
, // DeviceId 0
114 SF_DEVICE_ID1_AT25DF641
, // DeviceId 1
116 SF_INST_WREN
, // Prefix Opcode 0: Write Enable
117 SF_INST_WREN
// Prefix Opcode 1: Write Enable (this part doesn't support EWSR).
120 {EnumSpiOpcodeReadNoAddr
, SF_INST_JEDEC_READ_ID
, EnumSpiCycle50MHz
, EnumSpiOperationJedecId
}, // Opcode 0: Read ID
121 {EnumSpiOpcodeRead
, SF_INST_READ
, EnumSpiCycle50MHz
, EnumSpiOperationReadData
}, // Opcode 1: Read
122 {EnumSpiOpcodeReadNoAddr
, SF_INST_RDSR
, EnumSpiCycle50MHz
, EnumSpiOperationReadStatus
}, // Opcode 2: Read Status Register
123 {EnumSpiOpcodeWriteNoAddr
, SF_INST_WRDI
, EnumSpiCycle50MHz
, EnumSpiOperationWriteDisable
}, // Opcode 3: Write Disable
124 {EnumSpiOpcodeWrite
, SF_INST_SERASE
, EnumSpiCycle50MHz
, EnumSpiOperationErase_4K_Byte
}, // Opcode 4: Sector Erase (4KB)
125 {EnumSpiOpcodeWrite
, SF_INST_64KB_ERASE
, EnumSpiCycle50MHz
, EnumSpiOperationErase_64K_Byte
}, // Opcode 5: Block Erase (32KB)
126 {EnumSpiOpcodeWrite
, SF_INST_PROG
, EnumSpiCycle50MHz
, EnumSpiOperationProgramData_1_Byte
}, // Opcode 6: Byte Program
127 {EnumSpiOpcodeWriteNoAddr
, SF_INST_WRSR
, EnumSpiCycle50MHz
, EnumSpiOperationWriteStatus
}, // Opcode 7: Write Status Register
131 // The offset of the start of the BIOS image in flash. This value is platform specific
132 // and depends on the system flash map. If BIOS size is bigger than flash return -1.
134 ((ATMEL_AT25DF641_SIZE
>= FLASH_SIZE
) ? ATMEL_AT25DF641_SIZE
- FLASH_SIZE
: (UINTN
) (-1)),
137 // The size of the BIOS image in flash. This value is platform specific and depends on the system flash map.
142 SF_VENDOR_ID_WINBOND
, // VendorId
143 SF_DEVICE_ID0_W25QXX
, // DeviceId 0
144 SF_DEVICE_ID1_W25Q16
, // DeviceId 1
146 SF_INST_WREN
, // Prefix Opcode 0: Write Enable
147 SF_INST_EWSR
// Prefix Opcode 1: Enable Write Status Register
150 {EnumSpiOpcodeReadNoAddr
, SF_INST_JEDEC_READ_ID
, EnumSpiCycle50MHz
, EnumSpiOperationJedecId
}, // Opcode 0: Read ID
151 {EnumSpiOpcodeRead
, SF_INST_READ
, EnumSpiCycle50MHz
, EnumSpiOperationReadData
}, // Opcode 1: Read
152 {EnumSpiOpcodeReadNoAddr
, SF_INST_RDSR
, EnumSpiCycle50MHz
, EnumSpiOperationReadStatus
}, // Opcode 2: Read Status Register
153 {EnumSpiOpcodeRead
, SF_INST_SFDP
, EnumSpiCycle50MHz
, EnumSpiOperationDiscoveryParameters
}, // Opcode 3: Serial Flash Discovery Parameters
154 {EnumSpiOpcodeWrite
, SF_INST_SERASE
, EnumSpiCycle50MHz
, EnumSpiOperationErase_4K_Byte
}, // Opcode 4: Sector Erase (4KB)
155 {EnumSpiOpcodeWrite
, SF_INST_64KB_ERASE
, EnumSpiCycle50MHz
, EnumSpiOperationErase_64K_Byte
}, // Opcode 5: Block Erase (64KB
156 {EnumSpiOpcodeWrite
, SF_INST_PROG
, EnumSpiCycle50MHz
, EnumSpiOperationProgramData_1_Byte
}, // Opcode 6: Byte Program
157 {EnumSpiOpcodeWriteNoAddr
, SF_INST_WRSR
, EnumSpiCycle50MHz
, EnumSpiOperationWriteStatus
}, // Opcode 7: Write Status Register
161 // The offset of the start of the BIOS image in flash. This value is platform specific
162 // and depends on the system flash map. If BIOS size is bigger than flash return -1.
164 ((WINBOND_W25Q16_SIZE
>= FLASH_SIZE
) ? WINBOND_W25Q16_SIZE
- FLASH_SIZE
: (UINTN
) (-1)),
167 // The size of the BIOS image in flash. This value is platform specific and depends on the system flash map.
172 SF_VENDOR_ID_WINBOND
, // VendorId
173 SF_DEVICE_ID0_W25QXX
, // DeviceId 0
174 SF_DEVICE_ID1_W25Q32
, // DeviceId 1
176 SF_INST_WREN
, // Prefix Opcode 0: Write Enable
177 SF_INST_EWSR
// Prefix Opcode 1: Enable Write Status Register.
180 {EnumSpiOpcodeReadNoAddr
, SF_INST_JEDEC_READ_ID
, EnumSpiCycle50MHz
, EnumSpiOperationJedecId
}, // Opcode 0: Read ID
181 {EnumSpiOpcodeRead
, SF_INST_READ
, EnumSpiCycle50MHz
, EnumSpiOperationReadData
}, // Opcode 1: Read
182 {EnumSpiOpcodeReadNoAddr
, SF_INST_RDSR
, EnumSpiCycle50MHz
, EnumSpiOperationReadStatus
}, // Opcode 2: Read Status Register
183 {EnumSpiOpcodeRead
, SF_INST_SFDP
, EnumSpiCycle50MHz
, EnumSpiOperationDiscoveryParameters
}, // Opcode 3: Serial Flash Discovery Parameters
184 {EnumSpiOpcodeWrite
, SF_INST_SERASE
, EnumSpiCycle50MHz
, EnumSpiOperationErase_4K_Byte
}, // Opcode 4: Sector Erase (4KB)
185 {EnumSpiOpcodeWrite
, SF_INST_64KB_ERASE
, EnumSpiCycle50MHz
, EnumSpiOperationErase_64K_Byte
}, // Opcode 5: Block Erase (64KB
186 {EnumSpiOpcodeWrite
, SF_INST_PROG
, EnumSpiCycle50MHz
, EnumSpiOperationProgramData_1_Byte
}, // Opcode 6: Byte Program
187 {EnumSpiOpcodeWriteNoAddr
, SF_INST_WRSR
, EnumSpiCycle50MHz
, EnumSpiOperationWriteStatus
}, // Opcode 7: Write Status Register
191 // The offset of the start of the BIOS image in flash. This value is platform specific
192 // and depends on the system flash map. If BIOS size is bigger than flash return -1.
194 ((WINBOND_W25Q32_SIZE
>= FLASH_SIZE
) ? WINBOND_W25Q32_SIZE
- FLASH_SIZE
: (UINTN
) (-1)),
197 // The size of the BIOS image in flash. This value is platform specific and depends on the system flash map.
202 SF_VENDOR_ID_WINBOND
, // VendorId
203 SF_DEVICE_ID0_W25XXX
, // DeviceId 0
204 SF_DEVICE_ID1_W25X32
, // DeviceId 1
206 SF_INST_WREN
, // Prefix Opcode 0: Write Enable
207 SF_INST_EWSR
// Prefix Opcode 1: Enable Write Status Register
210 {EnumSpiOpcodeReadNoAddr
, SF_INST_JEDEC_READ_ID
, EnumSpiCycle50MHz
, EnumSpiOperationJedecId
}, // Opcode 0: Read ID
211 {EnumSpiOpcodeRead
, SF_INST_READ
, EnumSpiCycle50MHz
, EnumSpiOperationReadData
}, // Opcode 1: Read
212 {EnumSpiOpcodeReadNoAddr
, SF_INST_RDSR
, EnumSpiCycle50MHz
, EnumSpiOperationReadStatus
}, // Opcode 2: Read Status Register
213 {EnumSpiOpcodeRead
, SF_INST_SFDP
, EnumSpiCycle50MHz
, EnumSpiOperationDiscoveryParameters
}, // Opcode 3: Serial Flash Discovery Parameters
214 {EnumSpiOpcodeWrite
, SF_INST_SERASE
, EnumSpiCycle50MHz
, EnumSpiOperationErase_4K_Byte
}, // Opcode 4: Sector Erase (4KB)
215 {EnumSpiOpcodeWrite
, SF_INST_64KB_ERASE
, EnumSpiCycle50MHz
, EnumSpiOperationErase_64K_Byte
}, // Opcode 5: Block Erase (64KB
216 {EnumSpiOpcodeWrite
, SF_INST_PROG
, EnumSpiCycle50MHz
, EnumSpiOperationProgramData_1_Byte
}, // Opcode 6: Byte Program
217 {EnumSpiOpcodeWriteNoAddr
, SF_INST_WRSR
, EnumSpiCycle50MHz
, EnumSpiOperationWriteStatus
}, // Opcode 7: Write Status Register
221 // The offset of the start of the BIOS image in flash. This value is platform specific
222 // and depends on the system flash map. If BIOS size is bigger than flash return -1.
224 ((WINBOND_W25X32_SIZE
>= FLASH_SIZE
) ? WINBOND_W25X32_SIZE
- FLASH_SIZE
: (UINTN
) (-1)),
227 // The size of the BIOS image in flash. This value is platform specific and depends on the system flash map.
232 SF_VENDOR_ID_WINBOND
, // VendorId
233 SF_DEVICE_ID0_W25XXX
, // DeviceId 0
234 SF_DEVICE_ID1_W25X64
, // DeviceId 1
236 SF_INST_WREN
, // Prefix Opcode 0: Write Enable
237 SF_INST_EWSR
// Prefix Opcode 1: Enable Write Status Register
240 {EnumSpiOpcodeReadNoAddr
, SF_INST_JEDEC_READ_ID
, EnumSpiCycle50MHz
, EnumSpiOperationJedecId
}, // Opcode 0: Read ID
241 {EnumSpiOpcodeRead
, SF_INST_READ
, EnumSpiCycle50MHz
, EnumSpiOperationReadData
}, // Opcode 1: Read
242 {EnumSpiOpcodeReadNoAddr
, SF_INST_RDSR
, EnumSpiCycle50MHz
, EnumSpiOperationReadStatus
}, // Opcode 2: Read Status Register
243 {EnumSpiOpcodeRead
, SF_INST_SFDP
, EnumSpiCycle50MHz
, EnumSpiOperationDiscoveryParameters
}, // Opcode 3: Serial Flash Discovery Parameters
244 {EnumSpiOpcodeWrite
, SF_INST_SERASE
, EnumSpiCycle50MHz
, EnumSpiOperationErase_4K_Byte
}, // Opcode 4: Sector Erase (4KB)
245 {EnumSpiOpcodeWrite
, SF_INST_64KB_ERASE
, EnumSpiCycle50MHz
, EnumSpiOperationErase_64K_Byte
}, // Opcode 5: Block Erase (64KB
246 {EnumSpiOpcodeWrite
, SF_INST_PROG
, EnumSpiCycle50MHz
, EnumSpiOperationProgramData_1_Byte
}, // Opcode 6: Byte Program
247 {EnumSpiOpcodeWriteNoAddr
, SF_INST_WRSR
, EnumSpiCycle50MHz
, EnumSpiOperationWriteStatus
}, // Opcode 7: Write Status Register
251 // The offset of the start of the BIOS image in flash. This value is platform specific
252 // and depends on the system flash map. If BIOS size is bigger than flash return -1.
254 ((WINBOND_W25X64_SIZE
>= FLASH_SIZE
) ? WINBOND_W25X64_SIZE
- FLASH_SIZE
: (UINTN
) (-1)),
257 // The size of the BIOS image in flash. This value is platform specific and depends on the system flash map.
262 SF_VENDOR_ID_WINBOND
, // VendorId
263 SF_DEVICE_ID0_W25QXX
, // DeviceId 0
264 SF_DEVICE_ID1_W25Q128
, // DeviceId 1
266 SF_INST_WREN
, // Prefix Opcode 0: Write Enable
267 SF_INST_EWSR
// Prefix Opcode 1: Enable Write Status Register
270 {EnumSpiOpcodeReadNoAddr
, SF_INST_JEDEC_READ_ID
, EnumSpiCycle50MHz
, EnumSpiOperationJedecId
}, // Opcode 0: Read ID
271 {EnumSpiOpcodeRead
, SF_INST_READ
, EnumSpiCycle50MHz
, EnumSpiOperationReadData
}, // Opcode 1: Read
272 {EnumSpiOpcodeReadNoAddr
, SF_INST_RDSR
, EnumSpiCycle50MHz
, EnumSpiOperationReadStatus
}, // Opcode 2: Read Status Register
273 {EnumSpiOpcodeRead
, SF_INST_SFDP
, EnumSpiCycle50MHz
, EnumSpiOperationDiscoveryParameters
}, // Opcode 3: Serial Flash Discovery Parameters
274 {EnumSpiOpcodeWrite
, SF_INST_SERASE
, EnumSpiCycle50MHz
, EnumSpiOperationErase_4K_Byte
}, // Opcode 4: Sector Erase (4KB)
275 {EnumSpiOpcodeWrite
, SF_INST_64KB_ERASE
, EnumSpiCycle50MHz
, EnumSpiOperationErase_64K_Byte
}, // Opcode 5: Block Erase (64KB
276 {EnumSpiOpcodeWrite
, SF_INST_PROG
, EnumSpiCycle50MHz
, EnumSpiOperationProgramData_1_Byte
}, // Opcode 6: Byte Program
277 {EnumSpiOpcodeWriteNoAddr
, SF_INST_WRSR
, EnumSpiCycle50MHz
, EnumSpiOperationWriteStatus
}, // Opcode 7: Write Status Register
281 // The offset of the start of the BIOS image in flash. This value is platform specific
282 // and depends on the system flash map. If BIOS size is bigger than flash return -1.
284 ((WINBOND_W25Q128_SIZE
>= FLASH_SIZE
) ? WINBOND_W25Q128_SIZE
- FLASH_SIZE
: (UINTN
) (-1)),
287 // The size of the BIOS image in flash. This value is platform specific and depends on the system flash map.
292 SF_VENDOR_ID_MACRONIX
, // VendorId
293 SF_DEVICE_ID0_MX25LXX
, // DeviceId 0
294 SF_DEVICE_ID1_MX25L16
, // DeviceId 1
296 SF_INST_WREN
, // Prefix Opcode 0: Write Enable
297 SF_INST_EWSR
// Prefix Opcode 1: Write Enable (this part doesn't support EWSR).
300 {EnumSpiOpcodeReadNoAddr
, SF_INST_JEDEC_READ_ID
, EnumSpiCycle50MHz
, EnumSpiOperationJedecId
}, // Opcode 0: Read ID
301 {EnumSpiOpcodeRead
, SF_INST_READ
, EnumSpiCycle33MHz
, EnumSpiOperationReadData
}, // Opcode 1: Read
302 {EnumSpiOpcodeReadNoAddr
, SF_INST_RDSR
, EnumSpiCycle50MHz
, EnumSpiOperationReadStatus
}, // Opcode 2: Read Status Register
303 {EnumSpiOpcodeRead
, SF_INST_SFDP
, EnumSpiCycle50MHz
, EnumSpiOperationDiscoveryParameters
}, // Opcode 3: Serial Flash Discovery Parameters
304 {EnumSpiOpcodeWrite
, SF_INST_SERASE
, EnumSpiCycle50MHz
, EnumSpiOperationErase_4K_Byte
}, // Opcode 4: Sector Erase (4KB)
305 {EnumSpiOpcodeWrite
, SF_INST_64KB_ERASE
, EnumSpiCycle50MHz
, EnumSpiOperationErase_64K_Byte
}, // Opcode 5: Block Erase (64KB
306 {EnumSpiOpcodeWrite
, SF_INST_PROG
, EnumSpiCycle50MHz
, EnumSpiOperationProgramData_1_Byte
}, // Opcode 6: Byte Program
307 {EnumSpiOpcodeWriteNoAddr
, SF_INST_WRSR
, EnumSpiCycle50MHz
, EnumSpiOperationWriteStatus
}, // Opcode 7: Write Status Register
311 // The offset of the start of the BIOS image in flash. This value is platform specific
312 // and depends on the system flash map. If BIOS size is bigger than flash return -1.
314 ((MACRONIX_MX25L16_SIZE
>= FLASH_SIZE
) ? MACRONIX_MX25L16_SIZE
- FLASH_SIZE
: (UINTN
) (-1)),
317 // The size of the BIOS image in flash. This value is platform specific and depends on the system flash map.
322 SF_VENDOR_ID_MACRONIX
, // VendorId
323 SF_DEVICE_ID0_MX25LXX
, // DeviceId 0
324 SF_DEVICE_ID1_MX25L32
, // DeviceId 1
326 SF_INST_WREN
, // Prefix Opcode 0: Write Enable
327 SF_INST_EWSR
// Prefix Opcode 1: Write Enable (this part doesn't support EWSR).
330 {EnumSpiOpcodeReadNoAddr
, SF_INST_JEDEC_READ_ID
, EnumSpiCycle50MHz
, EnumSpiOperationJedecId
}, // Opcode 0: Read ID
331 {EnumSpiOpcodeRead
, SF_INST_READ
, EnumSpiCycle33MHz
, EnumSpiOperationReadData
}, // Opcode 1: Read
332 {EnumSpiOpcodeReadNoAddr
, SF_INST_RDSR
, EnumSpiCycle50MHz
, EnumSpiOperationReadStatus
}, // Opcode 2: Read Status Register
333 {EnumSpiOpcodeRead
, SF_INST_SFDP
, EnumSpiCycle50MHz
, EnumSpiOperationDiscoveryParameters
}, // Opcode 3: Serial Flash Discovery Parameters
334 {EnumSpiOpcodeWrite
, SF_INST_SERASE
, EnumSpiCycle50MHz
, EnumSpiOperationErase_4K_Byte
}, // Opcode 4: Sector Erase (4KB)
335 {EnumSpiOpcodeWrite
, SF_INST_64KB_ERASE
, EnumSpiCycle50MHz
, EnumSpiOperationErase_64K_Byte
}, // Opcode 5: Block Erase (64KB
336 {EnumSpiOpcodeWrite
, SF_INST_PROG
, EnumSpiCycle50MHz
, EnumSpiOperationProgramData_1_Byte
}, // Opcode 6: Byte Program
337 {EnumSpiOpcodeWriteNoAddr
, SF_INST_WRSR
, EnumSpiCycle50MHz
, EnumSpiOperationWriteStatus
}, // Opcode 7: Write Status Register
341 // The offset of the start of the BIOS image in flash. This value is platform specific
342 // and depends on the system flash map. If BIOS size is bigger than flash return -1.
344 ((MACRONIX_MX25L32_SIZE
>= FLASH_SIZE
) ? MACRONIX_MX25L32_SIZE
- FLASH_SIZE
: (UINTN
) (-1)),
347 // The size of the BIOS image in flash. This value is platform specific and depends on the system flash map.
352 SF_VENDOR_ID_MACRONIX
, // VendorId
353 SF_DEVICE_ID0_MX25LXX
, // DeviceId 0
354 SF_DEVICE_ID1_MX25L64
, // DeviceId 1
356 SF_INST_WREN
, // Prefix Opcode 0: Write Enable
357 SF_INST_EWSR
// Prefix Opcode 1: Write Enable (this part doesn't support EWSR)
360 {EnumSpiOpcodeReadNoAddr
, SF_INST_JEDEC_READ_ID
, EnumSpiCycle50MHz
, EnumSpiOperationJedecId
}, // Opcode 0: Read ID
361 {EnumSpiOpcodeRead
, SF_INST_READ
, EnumSpiCycle33MHz
, EnumSpiOperationReadData
}, // Opcode 1: Read
362 {EnumSpiOpcodeReadNoAddr
, SF_INST_RDSR
, EnumSpiCycle50MHz
, EnumSpiOperationReadStatus
}, // Opcode 2: Read Status Register
363 {EnumSpiOpcodeRead
, SF_INST_SFDP
, EnumSpiCycle50MHz
, EnumSpiOperationDiscoveryParameters
}, // Opcode 3: Serial Flash Discovery Parameters
364 {EnumSpiOpcodeWrite
, SF_INST_SERASE
, EnumSpiCycle50MHz
, EnumSpiOperationErase_4K_Byte
}, // Opcode 4: Sector Erase (4KB)
365 {EnumSpiOpcodeWrite
, SF_INST_64KB_ERASE
, EnumSpiCycle50MHz
, EnumSpiOperationErase_64K_Byte
}, // Opcode 5: Block Erase (64KB
366 {EnumSpiOpcodeWrite
, SF_INST_PROG
, EnumSpiCycle50MHz
, EnumSpiOperationProgramData_1_Byte
}, // Opcode 6: Byte Program
367 {EnumSpiOpcodeWriteNoAddr
, SF_INST_WRSR
, EnumSpiCycle50MHz
, EnumSpiOperationWriteStatus
}, // Opcode 7: Write Status Register
371 // The offset of the start of the BIOS image in flash. This value is platform specific
372 // and depends on the system flash map. If BIOS size is bigger than flash return -1.
374 ((MACRONIX_MX25L64_SIZE
>= FLASH_SIZE
) ? MACRONIX_MX25L64_SIZE
- FLASH_SIZE
: (UINTN
) (-1)),
377 // The size of the BIOS image in flash. This value is platform specific and depends on the system flash map.
382 SF_VENDOR_ID_MACRONIX
, // VendorId
383 SF_DEVICE_ID0_MX25LXX
, // DeviceId 0
384 SF_DEVICE_ID1_MX25L128
, // DeviceId 1
386 SF_INST_WREN
, // Prefix Opcode 0: Write Enable
387 SF_INST_EWSR
// Prefix Opcode 1: Write Enable (this part doesn't support EWSR)
390 {EnumSpiOpcodeReadNoAddr
, SF_INST_JEDEC_READ_ID
, EnumSpiCycle50MHz
, EnumSpiOperationJedecId
}, // Opcode 0: Read ID
391 {EnumSpiOpcodeRead
, SF_INST_READ
, EnumSpiCycle33MHz
, EnumSpiOperationReadData
}, // Opcode 1: Read
392 {EnumSpiOpcodeReadNoAddr
, SF_INST_RDSR
, EnumSpiCycle50MHz
, EnumSpiOperationReadStatus
}, // Opcode 2: Read Status Register
393 {EnumSpiOpcodeRead
, SF_INST_SFDP
, EnumSpiCycle50MHz
, EnumSpiOperationDiscoveryParameters
}, // Opcode 3: Serial Flash Discovery Parameters
394 {EnumSpiOpcodeWrite
, SF_INST_SERASE
, EnumSpiCycle50MHz
, EnumSpiOperationErase_4K_Byte
}, // Opcode 4: Sector Erase (4KB)
395 {EnumSpiOpcodeWrite
, SF_INST_64KB_ERASE
, EnumSpiCycle50MHz
, EnumSpiOperationErase_64K_Byte
}, // Opcode 5: Block Erase (64KB
396 {EnumSpiOpcodeWrite
, SF_INST_PROG
, EnumSpiCycle50MHz
, EnumSpiOperationProgramData_1_Byte
}, // Opcode 6: Byte Program
397 {EnumSpiOpcodeWriteNoAddr
, SF_INST_WRSR
, EnumSpiCycle50MHz
, EnumSpiOperationWriteStatus
}, // Opcode 7: Write Status Register
401 // The offset of the start of the BIOS image in flash. This value is platform specific
402 // and depends on the system flash map. If BIOS size is bigger than flash return -1.
404 ((MACRONIX_MX25L128_SIZE
>= FLASH_SIZE
) ? MACRONIX_MX25L128_SIZE
- FLASH_SIZE
: (UINTN
) (-1)),
407 // The size of the BIOS image in flash. This value is platform specific and depends on the system flash map.
412 SF_VENDOR_ID_MACRONIX
, // VendorId
413 SF_DEVICE_ID0_MX25UXX
, // DeviceId 0
414 SF_DEVICE_ID1_MX25U6435F
, // DeviceId 1
416 SF_INST_WREN
, // Prefix Opcode 0: Write Enable
417 SF_INST_EWSR
// Prefix Opcode 1: Write Enable (this part doesn't support EWSR)
420 {EnumSpiOpcodeReadNoAddr
, SF_INST_JEDEC_READ_ID
, EnumSpiCycle50MHz
, EnumSpiOperationJedecId
}, // Opcode 0: Read ID
421 {EnumSpiOpcodeRead
, SF_INST_READ
, EnumSpiCycle33MHz
, EnumSpiOperationReadData
}, // Opcode 1: Read
422 {EnumSpiOpcodeReadNoAddr
, SF_INST_RDSR
, EnumSpiCycle50MHz
, EnumSpiOperationReadStatus
}, // Opcode 2: Read Status Register
423 {EnumSpiOpcodeRead
, SF_INST_SFDP
, EnumSpiCycle50MHz
, EnumSpiOperationDiscoveryParameters
}, // Opcode 3: Serial Flash Discovery Parameters
424 {EnumSpiOpcodeWrite
, SF_INST_SERASE
, EnumSpiCycle50MHz
, EnumSpiOperationErase_4K_Byte
}, // Opcode 4: Sector Erase (4KB)
425 {EnumSpiOpcodeWrite
, SF_INST_64KB_ERASE
, EnumSpiCycle50MHz
, EnumSpiOperationErase_64K_Byte
}, // Opcode 5: Block Erase (64KB
426 {EnumSpiOpcodeWrite
, SF_INST_PROG
, EnumSpiCycle50MHz
, EnumSpiOperationProgramData_1_Byte
}, // Opcode 6: Byte Program
427 {EnumSpiOpcodeWriteNoAddr
, SF_INST_WRSR
, EnumSpiCycle50MHz
, EnumSpiOperationWriteStatus
}, // Opcode 7: Write Status Register
431 // The offset of the start of the BIOS image in flash. This value is platform specific
432 // and depends on the system flash map. If BIOS size is bigger than flash return -1.
434 ((MACRONIX_MX25U64_SIZE
>= FLASH_SIZE
) ? MACRONIX_MX25U64_SIZE
- FLASH_SIZE
: (UINTN
) (-1)),
437 // The size of the BIOS image in flash. This value is platform specific and depends on the system flash map.
442 SF_VENDOR_ID_SST
, // VendorId
443 SF_DEVICE_ID0_SST25VF0XXX
,// DeviceId 0
444 SF_DEVICE_ID1_SST25VF016B
,// DeviceId 1
446 SF_INST_WREN
, // Prefix Opcode 0: Write Enable
447 SF_INST_EWSR
// Prefix Opcode 1: Enable Write Status Register
450 {EnumSpiOpcodeReadNoAddr
, SF_INST_JEDEC_READ_ID
, EnumSpiCycle50MHz
, EnumSpiOperationJedecId
}, // Opcode 0: Read ID
451 {EnumSpiOpcodeRead
, SF_INST_READ
, EnumSpiCycle20MHz
, EnumSpiOperationReadData
}, // Opcode 1: Read
452 {EnumSpiOpcodeReadNoAddr
, SF_INST_RDSR
, EnumSpiCycle50MHz
, EnumSpiOperationReadStatus
}, // Opcode 2: Read Status Register
453 {EnumSpiOpcodeWriteNoAddr
, SF_INST_WRDI
, EnumSpiCycle50MHz
, EnumSpiOperationWriteDisable
}, // Opcode 3: Write Disable
454 {EnumSpiOpcodeWrite
, SF_INST_SERASE
, EnumSpiCycle50MHz
, EnumSpiOperationErase_4K_Byte
}, // Opcode 4: Sector Erase (4KB)
455 {EnumSpiOpcodeWrite
, SF_INST_64KB_ERASE
, EnumSpiCycle50MHz
, EnumSpiOperationErase_64K_Byte
}, // Opcode 5: Block Erase (32KB)
456 {EnumSpiOpcodeWrite
, SF_INST_PROG
, EnumSpiCycle50MHz
, EnumSpiOperationProgramData_1_Byte
}, // Opcode 6: Byte Program
457 {EnumSpiOpcodeWriteNoAddr
, SF_INST_WRSR
, EnumSpiCycle50MHz
, EnumSpiOperationWriteStatus
}, // Opcode 7: Write Status Register
461 // The offset of the start of the BIOS image in flash. This value is platform specific
462 // and depends on the system flash map. If BIOS size is bigger than flash return -1.
464 ((SST_SST25VF016B_SIZE
>= FLASH_SIZE
) ? SST_SST25VF016B_SIZE
- FLASH_SIZE
: (UINTN
) (-1)),
467 // The size of the BIOS image in flash. This value is platform specific and depends on the system flash map.
472 SF_VENDOR_ID_SST
, // VendorId
473 SF_DEVICE_ID0_SST25VF0XXX
,// DeviceId 0
474 SF_DEVICE_ID1_SST25VF064C
,// DeviceId 1
476 SF_INST_WREN
, // Prefix Opcode 0: Write Enable
477 SF_INST_EWSR
// Prefix Opcode 1: Enable Write Status Register
480 {EnumSpiOpcodeReadNoAddr
, SF_INST_JEDEC_READ_ID
, EnumSpiCycle50MHz
, EnumSpiOperationJedecId
}, // Opcode 0: Read ID
481 {EnumSpiOpcodeRead
, SF_INST_READ
, EnumSpiCycle20MHz
, EnumSpiOperationReadData
}, // Opcode 1: Read
482 {EnumSpiOpcodeReadNoAddr
, SF_INST_RDSR
, EnumSpiCycle50MHz
, EnumSpiOperationReadStatus
}, // Opcode 2: Read Status Register
483 {EnumSpiOpcodeWriteNoAddr
, SF_INST_WRDI
, EnumSpiCycle50MHz
, EnumSpiOperationWriteDisable
}, // Opcode 3: Write Disable
484 {EnumSpiOpcodeWrite
, SF_INST_SERASE
, EnumSpiCycle50MHz
, EnumSpiOperationErase_4K_Byte
}, // Opcode 4: Sector Erase (4KB)
485 {EnumSpiOpcodeWrite
, SF_INST_64KB_ERASE
, EnumSpiCycle50MHz
, EnumSpiOperationErase_64K_Byte
}, // Opcode 5: Block Erase (32KB)
486 {EnumSpiOpcodeWrite
, SF_INST_PROG
, EnumSpiCycle50MHz
, EnumSpiOperationProgramData_1_Byte
}, // Opcode 6: Byte Program
487 {EnumSpiOpcodeWriteNoAddr
, SF_INST_WRSR
, EnumSpiCycle50MHz
, EnumSpiOperationWriteStatus
}, // Opcode 7: Write Status Register
491 // The offset of the start of the BIOS image in flash. This value is platform specific
492 // and depends on the system flash map. If BIOS size is bigger than flash return -1.
494 ((SST_SST25VF064C_SIZE
>= FLASH_SIZE
) ? SST_SST25VF064C_SIZE
- FLASH_SIZE
: (UINTN
) (-1)),
497 // The size of the BIOS image in flash. This value is platform specific and depends on the system flash map.
505 SF_VENDOR_ID_NUMONYX
, // VendorId
506 SF_DEVICE_ID0_N25Q064
, // DeviceId 0
507 SF_DEVICE_ID1_N25Q064
, // DeviceId 1
509 SF_INST_WREN
, // Prefix Opcode 0: Write Enable
510 SF_INST_WREN
// Prefix Opcode 1: Write Enable (this part doesn't support EWSR)
513 {EnumSpiOpcodeReadNoAddr
, SF_INST_JEDEC_READ_ID
, EnumSpiCycle20MHz
, EnumSpiOperationJedecId
}, // Opcode 0: Read ID
514 {EnumSpiOpcodeRead
, SF_INST_READ
, EnumSpiCycle20MHz
, EnumSpiOperationReadData
}, // Opcode 1: Read
515 {EnumSpiOpcodeReadNoAddr
, SF_INST_RDSR
, EnumSpiCycle20MHz
, EnumSpiOperationReadStatus
}, // Opcode 2: Read Status Register
516 {EnumSpiOpcodeWriteNoAddr
, SF_INST_WRDI
, EnumSpiCycle20MHz
, EnumSpiOperationWriteDisable
}, // Opcode 3: Write Disable
517 {EnumSpiOpcodeWrite
, SF_INST_SERASE
, EnumSpiCycle20MHz
, EnumSpiOperationErase_4K_Byte
}, // Opcode 4: Sector Erase (4KB)
518 {EnumSpiOpcodeWrite
, SF_INST_64KB_ERASE
, EnumSpiCycle20MHz
, EnumSpiOperationErase_64K_Byte
}, // Opcode 5: Block Erase (64KB
519 {EnumSpiOpcodeWrite
, SF_INST_PROG
, EnumSpiCycle20MHz
, EnumSpiOperationProgramData_1_Byte
}, // Opcode 6: Byte Program
520 {EnumSpiOpcodeWriteNoAddr
, SF_INST_WRSR
, EnumSpiCycle20MHz
, EnumSpiOperationWriteStatus
}, // Opcode 7: Write Status Register
524 // The offset of the start of the BIOS image in flash. This value is platform specific
525 // and depends on the system flash map. If BIOS size is bigger than flash return -1.
527 ((NUMONYX_N25Q064_SIZE
>= FLASH_SIZE
) ? NUMONYX_N25Q064_SIZE
- FLASH_SIZE
: (UINTN
) (-1)),
530 // The size of the BIOS image in flash. This value is platform specific and depends on the system flash map.
535 SF_VENDOR_ID_NUMONYX
, // VendorId
536 SF_DEVICE_ID0_M25PXXX
, // DeviceId 0
537 SF_DEVICE_ID1_M25PX16
, // DeviceId 1
539 SF_INST_WREN
, // Prefix Opcode 0: Write Enable
540 SF_INST_WREN
// Prefix Opcode 1: Write Enable (this part doesn't support EWSR).
543 {EnumSpiOpcodeReadNoAddr
, SF_INST_JEDEC_READ_ID
, EnumSpiCycle50MHz
, EnumSpiOperationJedecId
}, // Opcode 0: Read ID
544 {EnumSpiOpcodeRead
, SF_INST_READ
, EnumSpiCycle33MHz
, EnumSpiOperationReadData
}, // Opcode 1: Read
545 {EnumSpiOpcodeReadNoAddr
, SF_INST_RDSR
, EnumSpiCycle50MHz
, EnumSpiOperationReadStatus
}, // Opcode 2: Read Status Register
546 {EnumSpiOpcodeWriteNoAddr
, SF_INST_WRDI
, EnumSpiCycle50MHz
, EnumSpiOperationWriteDisable
}, // Opcode 3: Write Disable
547 {EnumSpiOpcodeWrite
, SF_INST_SERASE
, EnumSpiCycle50MHz
, EnumSpiOperationErase_4K_Byte
}, // Opcode 4: Sector Erase (4KB)
548 {EnumSpiOpcodeWrite
, SF_INST_64KB_ERASE
, EnumSpiCycle50MHz
, EnumSpiOperationErase_64K_Byte
}, // Opcode 5: Block Erase (64KB
549 {EnumSpiOpcodeWrite
, SF_INST_PROG
, EnumSpiCycle50MHz
, EnumSpiOperationProgramData_1_Byte
}, // Opcode 6: Byte Program
550 {EnumSpiOpcodeWriteNoAddr
, SF_INST_WRSR
, EnumSpiCycle50MHz
, EnumSpiOperationWriteStatus
}, // Opcode 7: Write Status Register
554 // The offset of the start of the BIOS image in flash. This value is platform specific
555 // and depends on the system flash map. If BIOS size is bigger than flash return -1.
557 ((NUMONYX_M25PX16_SIZE
>= FLASH_SIZE
) ? NUMONYX_M25PX16_SIZE
- FLASH_SIZE
: (UINTN
) (-1)),
560 // The size of the BIOS image in flash. This value is platform specific and depends on the system flash map.
565 SF_VENDOR_ID_NUMONYX
, // VendorId
566 SF_DEVICE_ID0_N25QXXX
, // DeviceId 0
567 SF_DEVICE_ID1_N25Q032
, // DeviceId 1
569 SF_INST_WREN
, // Prefix Opcode 0: Write Enable
570 SF_INST_WREN
// Prefix Opcode 1: Write Enable (this part doesn't support EWSR).
573 {EnumSpiOpcodeReadNoAddr
, SF_INST_JEDEC_READ_ID
, EnumSpiCycle50MHz
, EnumSpiOperationJedecId
}, // Opcode 0: Read ID
574 {EnumSpiOpcodeRead
, SF_INST_READ
, EnumSpiCycle33MHz
, EnumSpiOperationReadData
}, // Opcode 1: Read
575 {EnumSpiOpcodeReadNoAddr
, SF_INST_RDSR
, EnumSpiCycle50MHz
, EnumSpiOperationReadStatus
}, // Opcode 2: Read Status Register
576 {EnumSpiOpcodeWriteNoAddr
, SF_INST_WRDI
, EnumSpiCycle50MHz
, EnumSpiOperationWriteDisable
}, // Opcode 3: Write Disable
577 {EnumSpiOpcodeWrite
, SF_INST_SERASE
, EnumSpiCycle50MHz
, EnumSpiOperationErase_4K_Byte
}, // Opcode 4: Sector Erase (4KB)
578 {EnumSpiOpcodeWrite
, SF_INST_64KB_ERASE
, EnumSpiCycle50MHz
, EnumSpiOperationErase_64K_Byte
}, // Opcode 5: Block Erase (64KB
579 {EnumSpiOpcodeWrite
, SF_INST_PROG
, EnumSpiCycle50MHz
, EnumSpiOperationProgramData_1_Byte
}, // Opcode 6: Byte Program
580 {EnumSpiOpcodeWriteNoAddr
, SF_INST_WRSR
, EnumSpiCycle50MHz
, EnumSpiOperationWriteStatus
}, // Opcode 7: Write Status Register
584 // The offset of the start of the BIOS image in flash. This value is platform specific
585 // and depends on the system flash map. If BIOS size is bigger than flash return -1.
587 ((NUMONYX_N25Q032_SIZE
>= FLASH_SIZE
) ? NUMONYX_N25Q032_SIZE
- FLASH_SIZE
: (UINTN
) (-1)),
590 // The size of the BIOS image in flash. This value is platform specific and depends on the system flash map.
595 SF_VENDOR_ID_NUMONYX
, // VendorId
596 SF_DEVICE_ID0_M25PXXX
, // DeviceId 0
597 SF_DEVICE_ID1_M25PX32
, // DeviceId 1
599 SF_INST_WREN
, // Prefix Opcode 0: Write Enable
600 SF_INST_WREN
// Prefix Opcode 1: Write Enable (this part doesn't support EWSR).
603 {EnumSpiOpcodeReadNoAddr
, SF_INST_JEDEC_READ_ID
, EnumSpiCycle50MHz
, EnumSpiOperationJedecId
}, // Opcode 0: Read ID
604 {EnumSpiOpcodeRead
, SF_INST_READ
, EnumSpiCycle33MHz
, EnumSpiOperationReadData
}, // Opcode 1: Read
605 {EnumSpiOpcodeReadNoAddr
, SF_INST_RDSR
, EnumSpiCycle50MHz
, EnumSpiOperationReadStatus
}, // Opcode 2: Read Status Register
606 {EnumSpiOpcodeWriteNoAddr
, SF_INST_WRDI
, EnumSpiCycle50MHz
, EnumSpiOperationWriteDisable
}, // Opcode 3: Write Disable
607 {EnumSpiOpcodeWrite
, SF_INST_SERASE
, EnumSpiCycle50MHz
, EnumSpiOperationErase_4K_Byte
}, // Opcode 4: Sector Erase (4KB)
608 {EnumSpiOpcodeWrite
, SF_INST_64KB_ERASE
, EnumSpiCycle50MHz
, EnumSpiOperationErase_64K_Byte
}, // Opcode 5: Block Erase (64KB
609 {EnumSpiOpcodeWrite
, SF_INST_PROG
, EnumSpiCycle50MHz
, EnumSpiOperationProgramData_1_Byte
}, // Opcode 6: Byte Program
610 {EnumSpiOpcodeWriteNoAddr
, SF_INST_WRSR
, EnumSpiCycle50MHz
, EnumSpiOperationWriteStatus
}, // Opcode 7: Write Status Register
614 // The offset of the start of the BIOS image in flash. This value is platform specific
615 // and depends on the system flash map. If BIOS size is bigger than flash return -1.
617 ((NUMONYX_M25PX32_SIZE
>= FLASH_SIZE
) ? NUMONYX_M25PX32_SIZE
- FLASH_SIZE
: (UINTN
) (-1)),
620 // The size of the BIOS image in flash. This value is platform specific and depends on the system flash map.
625 SF_VENDOR_ID_NUMONYX
, // VendorId
626 SF_DEVICE_ID0_M25PXXX
, // DeviceId 0
627 SF_DEVICE_ID1_M25PX64
, // DeviceId 1
629 SF_INST_WREN
, // Prefix Opcode 0: Write Enable
630 SF_INST_WREN
// Prefix Opcode 1: Write Enable (this part doesn't support EWSR)
633 {EnumSpiOpcodeReadNoAddr
, SF_INST_JEDEC_READ_ID
, EnumSpiCycle50MHz
, EnumSpiOperationJedecId
}, // Opcode 0: Read ID
634 {EnumSpiOpcodeRead
, SF_INST_READ
, EnumSpiCycle33MHz
, EnumSpiOperationReadData
}, // Opcode 1: Read
635 {EnumSpiOpcodeReadNoAddr
, SF_INST_RDSR
, EnumSpiCycle50MHz
, EnumSpiOperationReadStatus
}, // Opcode 2: Read Status Register
636 {EnumSpiOpcodeWriteNoAddr
, SF_INST_WRDI
, EnumSpiCycle50MHz
, EnumSpiOperationWriteDisable
}, // Opcode 3: Write Disable
637 {EnumSpiOpcodeWrite
, SF_INST_SERASE
, EnumSpiCycle50MHz
, EnumSpiOperationErase_4K_Byte
}, // Opcode 4: Sector Erase (4KB)
638 {EnumSpiOpcodeWrite
, SF_INST_64KB_ERASE
, EnumSpiCycle50MHz
, EnumSpiOperationErase_64K_Byte
}, // Opcode 5: Block Erase (64KB
639 {EnumSpiOpcodeWrite
, SF_INST_PROG
, EnumSpiCycle50MHz
, EnumSpiOperationProgramData_1_Byte
}, // Opcode 6: Byte Program
640 {EnumSpiOpcodeWriteNoAddr
, SF_INST_WRSR
, EnumSpiCycle50MHz
, EnumSpiOperationWriteStatus
}, // Opcode 7: Write Status Register
644 // The offset of the start of the BIOS image in flash. This value is platform specific
645 // and depends on the system flash map. If BIOS size is bigger than flash return -1.
647 ((NUMONYX_M25PX64_SIZE
>= FLASH_SIZE
) ? NUMONYX_M25PX64_SIZE
- FLASH_SIZE
: (UINTN
) (-1)),
650 // The size of the BIOS image in flash. This value is platform specific and depends on the system flash map.
655 SF_VENDOR_ID_NUMONYX
, // VendorId
656 SF_DEVICE_ID0_N25QXXX
, // DeviceId 0
657 SF_DEVICE_ID1_N25Q128
, // DeviceId 1
659 SF_INST_WREN
, // Prefix Opcode 0: Write Enable
660 SF_INST_WREN
// Prefix Opcode 1: Write Enable (this part doesn't support EWSR)
663 {EnumSpiOpcodeReadNoAddr
, SF_INST_JEDEC_READ_ID
, EnumSpiCycle50MHz
, EnumSpiOperationJedecId
}, // Opcode 0: Read ID
664 {EnumSpiOpcodeRead
, SF_INST_READ
, EnumSpiCycle33MHz
, EnumSpiOperationReadData
}, // Opcode 1: Read
665 {EnumSpiOpcodeReadNoAddr
, SF_INST_RDSR
, EnumSpiCycle50MHz
, EnumSpiOperationReadStatus
}, // Opcode 2: Read Status Register
666 {EnumSpiOpcodeWriteNoAddr
, SF_INST_WRDI
, EnumSpiCycle50MHz
, EnumSpiOperationWriteDisable
}, // Opcode 3: Write Disable
667 {EnumSpiOpcodeWrite
, SF_INST_SERASE
, EnumSpiCycle50MHz
, EnumSpiOperationErase_4K_Byte
}, // Opcode 4: Sector Erase (4KB)
668 {EnumSpiOpcodeWrite
, SF_INST_64KB_ERASE
, EnumSpiCycle50MHz
, EnumSpiOperationErase_64K_Byte
}, // Opcode 5: Block Erase (64KB
669 {EnumSpiOpcodeWrite
, SF_INST_PROG
, EnumSpiCycle50MHz
, EnumSpiOperationProgramData_1_Byte
}, // Opcode 6: Byte Program
670 {EnumSpiOpcodeWriteNoAddr
, SF_INST_WRSR
, EnumSpiCycle50MHz
, EnumSpiOperationWriteStatus
}, // Opcode 7: Write Status Register
674 // The offset of the start of the BIOS image in flash. This value is platform specific
675 // and depends on the system flash map. If BIOS size is bigger than flash return -1.
677 ((NUMONYX_N25Q128_SIZE
>= FLASH_SIZE
) ? NUMONYX_N25Q128_SIZE
- FLASH_SIZE
: (UINTN
) (-1)),
680 // The size of the BIOS image in flash. This value is platform specific and depends on the system flash map.
685 SF_VENDOR_ID_EON
, // VendorId
686 SF_DEVICE_ID0_EN25QXX
, // DeviceId 0
687 SF_DEVICE_ID1_EN25Q16
, // DeviceId 1
689 SF_INST_WREN
, // Prefix Opcode 0: Write Enable
690 SF_INST_WREN
// Prefix Opcode 1: Write Enable (this part doesn't support EWSR)
693 {EnumSpiOpcodeReadNoAddr
, SF_INST_JEDEC_READ_ID
, EnumSpiCycle50MHz
, EnumSpiOperationJedecId
}, // Opcode 0: Read ID
694 {EnumSpiOpcodeRead
, SF_INST_READ
, EnumSpiCycle50MHz
, EnumSpiOperationReadData
}, // Opcode 1: Read
695 {EnumSpiOpcodeReadNoAddr
, SF_INST_RDSR
, EnumSpiCycle50MHz
, EnumSpiOperationReadStatus
}, // Opcode 2: Read Status Register
696 {EnumSpiOpcodeWriteNoAddr
, SF_INST_WRDI
, EnumSpiCycle50MHz
, EnumSpiOperationWriteDisable
}, // Opcode 3: Write Disable
697 {EnumSpiOpcodeWrite
, SF_INST_SERASE
, EnumSpiCycle50MHz
, EnumSpiOperationErase_4K_Byte
}, // Opcode 4: Sector Erase (4KB)
698 {EnumSpiOpcodeWrite
, SF_INST_64KB_ERASE
, EnumSpiCycle50MHz
, EnumSpiOperationErase_64K_Byte
}, // Opcode 5: Block Erase (64KB
699 {EnumSpiOpcodeWrite
, SF_INST_PROG
, EnumSpiCycle50MHz
, EnumSpiOperationProgramData_1_Byte
}, // Opcode 6: Byte Program
700 {EnumSpiOpcodeWriteNoAddr
, SF_INST_WRSR
, EnumSpiCycle50MHz
, EnumSpiOperationWriteStatus
}, // Opcode 7: Write Status Register
704 // The offset of the start of the BIOS image in flash. This value is platform specific
705 // and depends on the system flash map. If BIOS size is bigger than flash return -1.
707 ((EON_EN25Q16_SIZE
>= FLASH_SIZE
) ? EON_EN25Q16_SIZE
- FLASH_SIZE
: (UINTN
) (-1)),
710 // The size of the BIOS image in flash. This value is platform specific and depends on the system flash map.
715 SF_VENDOR_ID_EON
, // VendorId
716 SF_DEVICE_ID0_EN25QXX
, // DeviceId 0
717 SF_DEVICE_ID1_EN25Q32
, // DeviceId 1
719 SF_INST_WREN
, // Prefix Opcode 0: Write Enable
720 SF_INST_WREN
// Prefix Opcode 1: Write Enable (this part doesn't support EWSR)
723 {EnumSpiOpcodeReadNoAddr
, SF_INST_JEDEC_READ_ID
, EnumSpiCycle50MHz
, EnumSpiOperationJedecId
}, // Opcode 0: Read ID
724 {EnumSpiOpcodeRead
, SF_INST_READ
, EnumSpiCycle33MHz
, EnumSpiOperationReadData
}, // Opcode 1: Read
725 {EnumSpiOpcodeReadNoAddr
, SF_INST_RDSR
, EnumSpiCycle50MHz
, EnumSpiOperationReadStatus
}, // Opcode 2: Read Status Register
726 {EnumSpiOpcodeWriteNoAddr
, SF_INST_WRDI
, EnumSpiCycle50MHz
, EnumSpiOperationWriteDisable
}, // Opcode 3: Write Disable
727 {EnumSpiOpcodeWrite
, SF_INST_SERASE
, EnumSpiCycle50MHz
, EnumSpiOperationErase_4K_Byte
}, // Opcode 4: Sector Erase (4KB)
728 {EnumSpiOpcodeWrite
, SF_INST_64KB_ERASE
, EnumSpiCycle50MHz
, EnumSpiOperationErase_64K_Byte
}, // Opcode 5: Block Erase (64KB
729 {EnumSpiOpcodeWrite
, SF_INST_PROG
, EnumSpiCycle50MHz
, EnumSpiOperationProgramData_1_Byte
}, // Opcode 6: Byte Program
730 {EnumSpiOpcodeWriteNoAddr
, SF_INST_WRSR
, EnumSpiCycle50MHz
, EnumSpiOperationWriteStatus
}, // Opcode 7: Write Status Register
734 // The offset of the start of the BIOS image in flash. This value is platform specific
735 // and depends on the system flash map. If BIOS size is bigger than flash return -1.
737 ((EON_EN25Q32_SIZE
>= FLASH_SIZE
) ? EON_EN25Q32_SIZE
- FLASH_SIZE
: (UINTN
) (-1)),
740 // The size of the BIOS image in flash. This value is platform specific and depends on the system flash map.
745 SF_VENDOR_ID_EON
, // VendorId
746 SF_DEVICE_ID0_EN25QXX
, // DeviceId 0
747 SF_DEVICE_ID1_EN25Q64
, // DeviceId 1
749 SF_INST_WREN
, // Prefix Opcode 0: Write Enable
750 SF_INST_WREN
// Prefix Opcode 1: Write Enable (this part doesn't support EWSR).
753 {EnumSpiOpcodeReadNoAddr
, SF_INST_JEDEC_READ_ID
, EnumSpiCycle50MHz
, EnumSpiOperationJedecId
}, // Opcode 0: Read ID
754 {EnumSpiOpcodeRead
, SF_INST_READ
, EnumSpiCycle50MHz
, EnumSpiOperationReadData
}, // Opcode 1: Read
755 {EnumSpiOpcodeReadNoAddr
, SF_INST_RDSR
, EnumSpiCycle50MHz
, EnumSpiOperationReadStatus
}, // Opcode 2: Read Status Register
756 {EnumSpiOpcodeWriteNoAddr
, SF_INST_WRDI
, EnumSpiCycle50MHz
, EnumSpiOperationWriteDisable
}, // Opcode 3: Write Disable
757 {EnumSpiOpcodeWrite
, SF_INST_SERASE
, EnumSpiCycle50MHz
, EnumSpiOperationErase_4K_Byte
}, // Opcode 4: Sector Erase (4KB)
758 {EnumSpiOpcodeWrite
, SF_INST_64KB_ERASE
, EnumSpiCycle50MHz
, EnumSpiOperationErase_64K_Byte
}, // Opcode 5: Block Erase (64KB
759 {EnumSpiOpcodeWrite
, SF_INST_PROG
, EnumSpiCycle50MHz
, EnumSpiOperationProgramData_1_Byte
}, // Opcode 6: Byte Program
760 {EnumSpiOpcodeWriteNoAddr
, SF_INST_WRSR
, EnumSpiCycle50MHz
, EnumSpiOperationWriteStatus
}, // Opcode 7: Write Status Register
764 // The offset of the start of the BIOS image in flash. This value is platform specific
765 // and depends on the system flash map. If BIOS size is bigger than flash return -1.
767 ((EON_EN25Q64_SIZE
>= FLASH_SIZE
) ? EON_EN25Q64_SIZE
- FLASH_SIZE
: (UINTN
) (-1)),
770 // The size of the BIOS image in flash. This value is platform specific and depends on the system flash map.
775 SF_VENDOR_ID_EON
, // VendorId
776 SF_DEVICE_ID0_EN25QXX
, // DeviceId 0
777 SF_DEVICE_ID1_EN25Q128
, // DeviceId 1
779 SF_INST_WREN
, // Prefix Opcode 0: Write Enable
780 SF_INST_WREN
// Prefix Opcode 1: Write Enable (this part doesn't support EWSR)
783 {EnumSpiOpcodeReadNoAddr
, SF_INST_JEDEC_READ_ID
, EnumSpiCycle50MHz
, EnumSpiOperationJedecId
}, // Opcode 0: Read ID
784 {EnumSpiOpcodeRead
, SF_INST_READ
, EnumSpiCycle50MHz
, EnumSpiOperationReadData
}, // Opcode 1: Read
785 {EnumSpiOpcodeReadNoAddr
, SF_INST_RDSR
, EnumSpiCycle50MHz
, EnumSpiOperationReadStatus
}, // Opcode 2: Read Status Register
786 {EnumSpiOpcodeWriteNoAddr
, SF_INST_WRDI
, EnumSpiCycle50MHz
, EnumSpiOperationWriteDisable
}, // Opcode 3: Write Disable
787 {EnumSpiOpcodeWrite
, SF_INST_SERASE
, EnumSpiCycle50MHz
, EnumSpiOperationErase_4K_Byte
}, // Opcode 4: Sector Erase (4KB)
788 {EnumSpiOpcodeWrite
, SF_INST_64KB_ERASE
, EnumSpiCycle50MHz
, EnumSpiOperationErase_64K_Byte
}, // Opcode 5: Block Erase (64KB
789 {EnumSpiOpcodeWrite
, SF_INST_PROG
, EnumSpiCycle50MHz
, EnumSpiOperationProgramData_1_Byte
}, // Opcode 6: Byte Program
790 {EnumSpiOpcodeWriteNoAddr
, SF_INST_WRSR
, EnumSpiCycle50MHz
, EnumSpiOperationWriteStatus
}, // Opcode 7: Write Status Register
794 // The offset of the start of the BIOS image in flash. This value is platform specific
795 // and depends on the system flash map. If BIOS size is bigger than flash return -1.
797 ((EON_EN25Q128_SIZE
>= FLASH_SIZE
) ? EON_EN25Q128_SIZE
- FLASH_SIZE
: (UINTN
) (-1)),
800 // The size of the BIOS image in flash. This value is platform specific and depends on the system flash map.
805 SF_VENDOR_ID_AMIC
, // VendorId
806 SF_DEVICE_ID0_A25L016
, // DeviceId 0
807 SF_DEVICE_ID1_A25L016
, // DeviceId 1
809 SF_INST_WREN
, // Prefix Opcode 0: Write Enable
810 SF_INST_WREN
// Prefix Opcode 1: Write Enable (this part doesn't support EWSR)
813 {EnumSpiOpcodeReadNoAddr
, SF_INST_JEDEC_READ_ID
, EnumSpiCycle50MHz
, EnumSpiOperationJedecId
}, // Opcode 0: Read ID
814 {EnumSpiOpcodeRead
, SF_INST_READ
, EnumSpiCycle50MHz
, EnumSpiOperationReadData
}, // Opcode 1: Read
815 {EnumSpiOpcodeReadNoAddr
, SF_INST_RDSR
, EnumSpiCycle50MHz
, EnumSpiOperationReadStatus
}, // Opcode 2: Read Status Register
816 {EnumSpiOpcodeWriteNoAddr
, SF_INST_WRDI
, EnumSpiCycle50MHz
, EnumSpiOperationWriteDisable
}, // Opcode 3: Write Disable
817 {EnumSpiOpcodeWrite
, SF_INST_SERASE
, EnumSpiCycle50MHz
, EnumSpiOperationErase_4K_Byte
}, // Opcode 4: Sector Erase (4KB)
818 {EnumSpiOpcodeWrite
, SF_INST_64KB_ERASE
, EnumSpiCycle50MHz
, EnumSpiOperationErase_64K_Byte
}, // Opcode 5: Block Erase (64KB
819 {EnumSpiOpcodeWrite
, SF_INST_PROG
, EnumSpiCycle50MHz
, EnumSpiOperationProgramData_1_Byte
}, // Opcode 6: Byte Program
820 {EnumSpiOpcodeWriteNoAddr
, SF_INST_WRSR
, EnumSpiCycle50MHz
, EnumSpiOperationWriteStatus
}, // Opcode 7: Write Status Register
824 // The offset of the start of the BIOS image in flash. This value is platform specific
825 // and depends on the system flash map. If BIOS size is bigger than flash return -1.
827 ((AMIC_A25L16_SIZE
>= FLASH_SIZE
) ? AMIC_A25L16_SIZE
- FLASH_SIZE
: (UINTN
) (-1)),
830 // The size of the BIOS image in flash. This value is platform specific and depends on the system flash map.