mirror of https://github.com/acidanthera/audk.git
1. Correct CopyMem and CompareMem to CopyGuid and CompareGuid for GUID data
2. Add the missing processor type in DataHubRecords/DataHubSubClassProcessor.h file. git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@5926 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
parent
4792a1a65b
commit
66df253186
|
@ -31,9 +31,19 @@ ConvertIso639ToRfc3066 (
|
|||
)
|
||||
{
|
||||
UINTN Index;
|
||||
CHAR8 AsciiLanguage[ISO_639_2_ENTRY_SIZE + 1];
|
||||
|
||||
AsciiStrnCpy (AsciiLanguage, Iso638Lang, sizeof (AsciiLanguage));
|
||||
for (Index = 0; Index < ISO_639_2_ENTRY_SIZE + 1; Index ++) {
|
||||
if (AsciiLanguage [Index] == 0) {
|
||||
break;
|
||||
} else if (AsciiLanguage [Index] >= 'A' && AsciiLanguage [Index] <= 'Z') {
|
||||
AsciiLanguage [Index] = AsciiLanguage [Index] - 'A' + 'a';
|
||||
}
|
||||
}
|
||||
|
||||
for (Index = 0; Index < sizeof (Iso639ToRfc3066Map) / sizeof (Iso639ToRfc3066Map[0]); Index++) {
|
||||
if (AsciiStrnCmp (Iso638Lang, Iso639ToRfc3066Map[Index].Iso639, AsciiStrSize (Iso638Lang)) == 0) {
|
||||
if (AsciiStrnCmp (AsciiLanguage, Iso639ToRfc3066Map[Index].Iso639, AsciiStrSize (AsciiLanguage)) == 0) {
|
||||
return Iso639ToRfc3066Map[Index].Rfc3066;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -979,7 +979,7 @@ ParseOpCodes (
|
|||
//
|
||||
// check the formset GUID
|
||||
//
|
||||
if (CompareMem (&FormSet->Guid, &((EFI_IFR_FORM_SET *) OpCodeData)->Guid, sizeof (EFI_GUID)) != 0) {
|
||||
if (CompareGuid ((EFI_GUID *)(VOID *)&FormSet->Guid, (EFI_GUID *)(VOID *)&((EFI_IFR_FORM_SET *) OpCodeData)->Guid) != 0) {
|
||||
return EFI_INVALID_PARAMETER;
|
||||
}
|
||||
|
||||
|
|
|
@ -277,7 +277,7 @@ GetFormSetGuid (
|
|||
switch (OpCode->OpCode) {
|
||||
case EFI_IFR_FORM_SET_OP:
|
||||
FormSet = (EFI_IFR_FORM_SET *) OpCode;
|
||||
CopyMem (FormSetGuid, &FormSet->Guid, sizeof (EFI_GUID));
|
||||
CopyGuid (FormSetGuid, (EFI_GUID *)(VOID *)&FormSet->Guid);
|
||||
return;
|
||||
|
||||
default:
|
||||
|
@ -344,7 +344,7 @@ GetAttributesOfFirstFormSet (
|
|||
|
||||
case EFI_IFR_GUID_OP:
|
||||
Class = (EFI_IFR_GUID_CLASS*) OpCode;
|
||||
if (CompareMem (&Class->Guid, &gTianoHiiIfrGuid, sizeof (EFI_GUID)) == 0) {
|
||||
if (CompareGuid ((EFI_GUID *)(VOID *)&Class->Guid, &gTianoHiiIfrGuid) == 0) {
|
||||
Class = (EFI_IFR_GUID_CLASS *) OpCode;
|
||||
|
||||
switch (Class->ExtendOpCode) {
|
||||
|
@ -497,7 +497,7 @@ CreateQuestionIdMap (
|
|||
|
||||
case EFI_IFR_GUID_OP:
|
||||
OptionMap = (EFI_IFR_GUID_OPTIONKEY *) OpCode;
|
||||
if (CompareMem (&OptionMap->Guid, &gFrameworkHiiCompatbilityGuid, sizeof (EFI_GUID)) == 0) {
|
||||
if (CompareGuid ((EFI_GUID *)(VOID *)&OptionMap->Guid, &gFrameworkHiiCompatbilityGuid) == 0) {
|
||||
if (OptionMap->ExtendOpCode == EFI_IFR_EXTEND_OP_OPTIONKEY) {
|
||||
OneOfOptinMapEntryListHead = GetOneOfOptionMapEntryListHead (ThunkContext, OptionMap->QuestionId);
|
||||
if (OneOfOptinMapEntryListHead == NULL) {
|
||||
|
@ -525,7 +525,7 @@ CreateQuestionIdMap (
|
|||
|
||||
InsertTailList (OneOfOptinMapEntryListHead, &OneOfOptionMapEntry->Link);
|
||||
}
|
||||
} else if (CompareMem (&OptionMap->Guid, &gTianoHiiIfrGuid, sizeof (EFI_GUID)) == 0) {
|
||||
} else if (CompareGuid ((EFI_GUID *)(VOID *)&OptionMap->Guid, &gTianoHiiIfrGuid) == 0) {
|
||||
Class = (EFI_IFR_GUID_CLASS *) OpCode;
|
||||
|
||||
switch (Class->ExtendOpCode) {
|
||||
|
|
|
@ -49,6 +49,7 @@ typedef STRING_REF EFI_PROCESSOR_MANUFACTURER_DATA;
|
|||
typedef STRING_REF EFI_PROCESSOR_SERIAL_NUMBER_DATA;
|
||||
|
||||
typedef STRING_REF EFI_PROCESSOR_ASSET_TAG_DATA;
|
||||
typedef STRING_REF EFI_PROCESSOR_PART_NUMBER_DATA;
|
||||
|
||||
typedef struct {
|
||||
UINT32 ProcessorSteppingId:4;
|
||||
|
@ -332,6 +333,8 @@ typedef UINT8 EFI_PROCESSOR_CORE_COUNT_DATA;
|
|||
typedef UINT8 EFI_PROCESSOR_ENABLED_CORE_COUNT_DATA;
|
||||
typedef UINT8 EFI_PROCESSOR_THREAD_COUNT_DATA;
|
||||
|
||||
typedef EFI_EXP_BASE10_DATA EFI_PROCESSOR_MAX_FSB_FREQUENCY_DATA;
|
||||
|
||||
typedef struct {
|
||||
UINT16 Reserved :1;
|
||||
UINT16 Unknown :1;
|
||||
|
@ -339,6 +342,32 @@ typedef struct {
|
|||
UINT16 Reserved2 :13;
|
||||
} EFI_PROCESSOR_CHARACTERISTICS_DATA;
|
||||
|
||||
typedef struct {
|
||||
EFI_PROCESSOR_SOCKET_NAME_DATA ProcessorSocketName;
|
||||
EFI_PROCESSOR_TYPE_DATA ProcessorType;
|
||||
EFI_PROCESSOR_FAMILY_DATA ProcessorFamily;
|
||||
EFI_PROCESSOR_MANUFACTURER_DATA ProcessorManufacturer;
|
||||
EFI_PROCESSOR_ID_DATA ProcessorId;
|
||||
EFI_PROCESSOR_VERSION_DATA ProcessorVersion;
|
||||
EFI_PROCESSOR_VOLTAGE_DATA ProcessorVoltage;
|
||||
EFI_PROCESSOR_FSB_FREQUENCY_DATA ProcessorFsbFrequency;
|
||||
EFI_PROCESSOR_MAX_CORE_FREQUENCY_DATA ProcessorMaxCoreFrequency;
|
||||
EFI_PROCESSOR_CORE_FREQUENCY_DATA ProcessorCoreFrequency;
|
||||
EFI_PROCESSOR_STATUS_DATA ProcessorStatus;
|
||||
EFI_PROCESSOR_SOCKET_TYPE_DATA ProcessorSocketType;
|
||||
EFI_CACHE_ASSOCIATION_DATA ProcessorL1LinkData;
|
||||
EFI_CACHE_ASSOCIATION_DATA ProcessorL2LinkData;
|
||||
EFI_CACHE_ASSOCIATION_DATA ProcessorL3LinkData;
|
||||
EFI_PROCESSOR_SERIAL_NUMBER_DATA ProcessorSerialNumber;
|
||||
EFI_PROCESSOR_ASSET_TAG_DATA ProcessorAssetTag;
|
||||
EFI_PROCESSOR_PART_NUMBER_DATA ProcessorPartNumber;
|
||||
EFI_PROCESSOR_CORE_COUNT_DATA ProcessorCoreCount;
|
||||
EFI_PROCESSOR_ENABLED_CORE_COUNT_DATA ProcessorEnabledCoreCount;
|
||||
EFI_PROCESSOR_THREAD_COUNT_DATA ProcessorThreadCount;
|
||||
EFI_PROCESSOR_CHARACTERISTICS_DATA ProcessorCharacteristics;
|
||||
EFI_PROCESSOR_FAMILY2_DATA ProcessorFamily2;
|
||||
} EFI_PROCESSOR_SOCKET_DATA;
|
||||
|
||||
typedef enum {
|
||||
ProcessorCoreFrequencyRecordType = 1,
|
||||
ProcessorFsbFrequencyRecordType = 2,
|
||||
|
@ -368,7 +397,9 @@ typedef enum {
|
|||
ProcessorEnabledCoreCountRecordType = 26,
|
||||
ProcessorThreadCountRecordType = 27,
|
||||
ProcessorCharacteristicsRecordType = 28,
|
||||
ProcessorFamily2RecordType = 29
|
||||
ProcessorFamily2RecordType = 29,
|
||||
ProcessorPartNumberRecordType = 30,
|
||||
ProcessorSocketRecordType = 31
|
||||
} EFI_CPU_VARIABLE_RECORD_TYPE;
|
||||
|
||||
typedef union {
|
||||
|
@ -393,6 +424,7 @@ typedef union {
|
|||
EFI_PROCESSOR_SOCKET_TYPE_DATA ProcessorSocketType;
|
||||
EFI_PROCESSOR_SOCKET_NAME_DATA ProcessorSocketName;
|
||||
EFI_PROCESSOR_ASSET_TAG_DATA ProcessorAssetTag;
|
||||
EFI_PROCESSOR_PART_NUMBER_DATA ProcessorPartNumber;
|
||||
EFI_PROCESSOR_HEALTH_STATUS ProcessorHealthStatus;
|
||||
EFI_PROCESSOR_PACKAGE_NUMBER_DATA ProcessorPackageNumber;
|
||||
EFI_PROCESSOR_CORE_COUNT_DATA ProcessorCoreCount;
|
||||
|
@ -400,6 +432,7 @@ typedef union {
|
|||
EFI_PROCESSOR_THREAD_COUNT_DATA ProcessorThreadCount;
|
||||
EFI_PROCESSOR_CHARACTERISTICS_DATA ProcessorCharacteristics;
|
||||
EFI_PROCESSOR_FAMILY2_DATA ProcessorFamily2;
|
||||
EFI_PROCESSOR_SOCKET_DATA ProcessorSocket;
|
||||
} EFI_CPU_VARIABLE_RECORD;
|
||||
|
||||
typedef struct {
|
||||
|
|
Loading…
Reference in New Issue