mirror of
https://github.com/LongSoft/UEFITool.git
synced 2025-05-13 06:34:42 -04:00
Remove outdated definition of FLASH_PARAMETERS
This commit is contained in:
parent
c38ed925b0
commit
7cea8ee512
2 changed files with 7 additions and 32 deletions
|
@ -72,43 +72,18 @@ typedef struct FLASH_DESCRIPTOR_MAP_ {
|
|||
UINT32 DescriptorVersion; // Reserved prior to Coffee Lake
|
||||
} FLASH_DESCRIPTOR_MAP;
|
||||
|
||||
// Component section
|
||||
// Component section structure
|
||||
// Flash parameters DWORD structure
|
||||
typedef struct FLASH_PARAMETERS_ {
|
||||
UINT8 FirstChipDensity : 4;
|
||||
UINT8 SecondChipDensity : 4;
|
||||
UINT8 : 8;
|
||||
UINT16 : 16;
|
||||
UINT8 : 1;
|
||||
UINT8 ReadClockFrequency : 3; // Hardcoded value of 20 Mhz (000b) in v1 descriptors
|
||||
UINT8 FastReadEnabled : 1;
|
||||
UINT8 FastReadFrequency : 3;
|
||||
UINT8 FlashWriteFrequency : 3;
|
||||
UINT8 FlashReadStatusFrequency : 3;
|
||||
UINT8 DualOutputFastReadSupported : 1;
|
||||
UINT8 : 1;
|
||||
UINT8 : 4;
|
||||
UINT8 : 8;
|
||||
} FLASH_PARAMETERS;
|
||||
|
||||
// Flash densities
|
||||
#define FLASH_DENSITY_512KB 0x00
|
||||
#define FLASH_DENSITY_1MB 0x01
|
||||
#define FLASH_DENSITY_2MB 0x02
|
||||
#define FLASH_DENSITY_4MB 0x03
|
||||
#define FLASH_DENSITY_8MB 0x04
|
||||
#define FLASH_DENSITY_16MB 0x05
|
||||
#define FLASH_DENSITY_32MB 0x06
|
||||
#define FLASH_DENSITY_64MB 0x07
|
||||
#define FLASH_DENSITY_UNUSED 0x0F
|
||||
|
||||
// Flash frequencies
|
||||
#define FLASH_FREQUENCY_20MHZ 0x00
|
||||
#define FLASH_FREQUENCY_33MHZ 0x01
|
||||
#define FLASH_FREQUENCY_48MHZ 0x02
|
||||
#define FLASH_FREQUENCY_50MHZ_30MHZ 0x04
|
||||
#define FLASH_FREQUENCY_17MHZ 0x06
|
||||
|
||||
// Component section structure
|
||||
typedef struct FLASH_DESCRIPTOR_COMPONENT_SECTION_ {
|
||||
FLASH_PARAMETERS FlashParameters;
|
||||
FLASH_PARAMETERS FlashParameters; // Bit field with SPI flash parameters, changes almost every CPU generation, so will remain mostly undefined for now
|
||||
UINT8 InvalidInstruction0; // Instructions for SPI chip, that must not be executed, like FLASH ERASE
|
||||
UINT8 InvalidInstruction1; //
|
||||
UINT8 InvalidInstruction2; //
|
||||
|
|
|
@ -326,8 +326,8 @@ USTATUS FfsParser::parseIntelImage(const UByteArray & intelImage, const UINT32 l
|
|||
const FLASH_DESCRIPTOR_COMPONENT_SECTION* componentSection = (const FLASH_DESCRIPTOR_COMPONENT_SECTION*)calculateAddress8((UINT8*)descriptor, descriptorMap->ComponentBase);
|
||||
|
||||
UINT8 descriptorVersion = 2;
|
||||
// Check descriptor version by getting hardcoded value of FlashParameters.ReadClockFrequency
|
||||
if (componentSection->FlashParameters.ReadClockFrequency == FLASH_FREQUENCY_20MHZ)
|
||||
// Check descriptor version by getting hardcoded value of zero in FlashParameters.ReadClockFrequency
|
||||
if (componentSection->FlashParameters.ReadClockFrequency == 0)
|
||||
descriptorVersion = 1;
|
||||
|
||||
// Regions
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue