@@ -72,43 +72,18 @@ typedef struct FLASH_DESCRIPTOR_MAP_ {
7272 UINT32 DescriptorVersion ; // Reserved prior to Coffee Lake
7373} FLASH_DESCRIPTOR_MAP ;
7474
75- // Component section
75+ // Component section structure
7676// Flash parameters DWORD structure
7777typedef struct FLASH_PARAMETERS_ {
78- UINT8 FirstChipDensity : 4 ;
79- UINT8 SecondChipDensity : 4 ;
80- UINT8 : 8 ;
78+ UINT16 : 16 ;
8179 UINT8 : 1 ;
8280 UINT8 ReadClockFrequency : 3 ; // Hardcoded value of 20 Mhz (000b) in v1 descriptors
83- UINT8 FastReadEnabled : 1 ;
84- UINT8 FastReadFrequency : 3 ;
85- UINT8 FlashWriteFrequency : 3 ;
86- UINT8 FlashReadStatusFrequency : 3 ;
87- UINT8 DualOutputFastReadSupported : 1 ;
88- UINT8 : 1 ;
81+ UINT8 : 4 ;
82+ UINT8 : 8 ;
8983} FLASH_PARAMETERS ;
9084
91- // Flash densities
92- #define FLASH_DENSITY_512KB 0x00
93- #define FLASH_DENSITY_1MB 0x01
94- #define FLASH_DENSITY_2MB 0x02
95- #define FLASH_DENSITY_4MB 0x03
96- #define FLASH_DENSITY_8MB 0x04
97- #define FLASH_DENSITY_16MB 0x05
98- #define FLASH_DENSITY_32MB 0x06
99- #define FLASH_DENSITY_64MB 0x07
100- #define FLASH_DENSITY_UNUSED 0x0F
101-
102- // Flash frequencies
103- #define FLASH_FREQUENCY_20MHZ 0x00
104- #define FLASH_FREQUENCY_33MHZ 0x01
105- #define FLASH_FREQUENCY_48MHZ 0x02
106- #define FLASH_FREQUENCY_50MHZ_30MHZ 0x04
107- #define FLASH_FREQUENCY_17MHZ 0x06
108-
109- // Component section structure
11085typedef struct FLASH_DESCRIPTOR_COMPONENT_SECTION_ {
111- FLASH_PARAMETERS FlashParameters ;
86+ FLASH_PARAMETERS FlashParameters ; // Bit field with SPI flash parameters, changes almost every CPU generation, so will remain mostly undefined for now
11287 UINT8 InvalidInstruction0 ; // Instructions for SPI chip, that must not be executed, like FLASH ERASE
11388 UINT8 InvalidInstruction1 ; //
11489 UINT8 InvalidInstruction2 ; //
0 commit comments