mirror of https://github.com/acidanthera/audk.git
Add missing Type 35 support and correct SmbiosFldMiscType13 implementation.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@11571 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
parent
33d9d83439
commit
0ec4f1cb6f
|
@ -325,6 +325,15 @@ SMBIOS_TYPE_INFO_TABLE_ENTRY mTypeInfoTable[] = {
|
||||||
FALSE
|
FALSE
|
||||||
},
|
},
|
||||||
//
|
//
|
||||||
|
// Type 35: Management Device Component
|
||||||
|
//
|
||||||
|
{
|
||||||
|
35,
|
||||||
|
0x0d,
|
||||||
|
FALSE,
|
||||||
|
FALSE
|
||||||
|
},
|
||||||
|
//
|
||||||
// Type 36: Management Device Threshold
|
// Type 36: Management Device Threshold
|
||||||
//
|
//
|
||||||
{
|
{
|
||||||
|
@ -1234,6 +1243,19 @@ SMBIOS_CONVERSION_TABLE_ENTRY mConversionTable[] = {
|
||||||
SmbiosFldMiscType34
|
SmbiosFldMiscType34
|
||||||
},
|
},
|
||||||
|
|
||||||
|
{
|
||||||
|
//
|
||||||
|
// Misc SubClass -- Record Type 0x1C: Management Device Component (SMBIOS Type 35)
|
||||||
|
//
|
||||||
|
EFI_MISC_SUBCLASS_GUID,
|
||||||
|
EFI_MISC_MANAGEMENT_DEVICE_COMPONENT_DESCRIPTION_RECORD_NUMBER, // 35,
|
||||||
|
35,
|
||||||
|
BySubclassInstanceSubinstanceProducer,
|
||||||
|
ByFunction,
|
||||||
|
0,
|
||||||
|
SmbiosFldMiscType35
|
||||||
|
},
|
||||||
|
|
||||||
{
|
{
|
||||||
//
|
//
|
||||||
// Misc SubClass -- Record Type 0x21: Management Device Threshold (SMBIOS Type 36)
|
// Misc SubClass -- Record Type 0x21: Management Device Threshold (SMBIOS Type 36)
|
||||||
|
|
|
@ -913,12 +913,12 @@ SmbiosFldMiscType13 (
|
||||||
|
|
||||||
//
|
//
|
||||||
// Current Language Number
|
// Current Language Number
|
||||||
|
// It's the index of multiple languages. Languages are filled by SmbiosFldMiscType14.
|
||||||
//
|
//
|
||||||
SmbiosFldString (
|
CopyMem (
|
||||||
StructureNode,
|
(UINT8 *) (StructureNode->Structure) + OFFSET_OF (SMBIOS_TABLE_TYPE13, CurrentLanguages),
|
||||||
OFFSET_OF (SMBIOS_TABLE_TYPE13, CurrentLanguages),
|
&InstallableLanguage->CurrentLanguageNumber,
|
||||||
&(InstallableLanguage->CurrentLanguageNumber),
|
1
|
||||||
2 // 64 * sizeof(CHAR16)
|
|
||||||
);
|
);
|
||||||
|
|
||||||
return EFI_SUCCESS;
|
return EFI_SUCCESS;
|
||||||
|
@ -2040,6 +2040,91 @@ SmbiosFldMiscType34 (
|
||||||
return EFI_SUCCESS;
|
return EFI_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
Field Filling Function for Misc SubClass record type 35 -- Management Device Component.
|
||||||
|
|
||||||
|
@param StructureNode Pointer to SMBIOS_STRUCTURE_NODE which is current processed.
|
||||||
|
@param Offset Offset of SMBIOS record which RecordData will be filled.
|
||||||
|
@param RecordData RecordData buffer will be filled.
|
||||||
|
@param RecordDataSize The size of RecordData buffer.
|
||||||
|
|
||||||
|
@retval EFI_SUCCESS Success fill RecordData into SMBIOS's record buffer.
|
||||||
|
**/
|
||||||
|
EFI_STATUS
|
||||||
|
SmbiosFldMiscType35 (
|
||||||
|
IN OUT SMBIOS_STRUCTURE_NODE *StructureNode,
|
||||||
|
IN UINT32 Offset,
|
||||||
|
IN VOID *RecordData,
|
||||||
|
IN UINT32 RecordDataSize
|
||||||
|
)
|
||||||
|
{
|
||||||
|
EFI_MISC_MANAGEMENT_DEVICE_COMPONENT_DESCRIPTION *ManagementDeviceComponent;
|
||||||
|
EFI_INTER_LINK_DATA ManagementDeviceLink;
|
||||||
|
EFI_INTER_LINK_DATA ManagementDeviceComponentLink;
|
||||||
|
EFI_INTER_LINK_DATA ManagementDeviceThresholdLink;
|
||||||
|
|
||||||
|
ManagementDeviceComponent = (EFI_MISC_MANAGEMENT_DEVICE_COMPONENT_DESCRIPTION *)RecordData;
|
||||||
|
CopyMem (
|
||||||
|
&ManagementDeviceLink,
|
||||||
|
&ManagementDeviceComponent->ManagementDeviceLink,
|
||||||
|
sizeof (EFI_INTER_LINK_DATA)
|
||||||
|
);
|
||||||
|
CopyMem (
|
||||||
|
&ManagementDeviceComponentLink,
|
||||||
|
&ManagementDeviceComponent->ManagementDeviceComponentLink,
|
||||||
|
sizeof (EFI_INTER_LINK_DATA)
|
||||||
|
);
|
||||||
|
CopyMem (&ManagementDeviceThresholdLink,
|
||||||
|
&ManagementDeviceComponent->ManagementDeviceThresholdLink,
|
||||||
|
sizeof (EFI_INTER_LINK_DATA)
|
||||||
|
);
|
||||||
|
|
||||||
|
//
|
||||||
|
// ManagementDeviceComponentDescription
|
||||||
|
//
|
||||||
|
SmbiosFldString (
|
||||||
|
StructureNode,
|
||||||
|
OFFSET_OF (SMBIOS_TABLE_TYPE35, Description),
|
||||||
|
&ManagementDeviceComponent->ManagementDeviceComponentDescription,
|
||||||
|
2 // 64 * sizeof(CHAR16)
|
||||||
|
);
|
||||||
|
|
||||||
|
//
|
||||||
|
// ManagementDeviceLink
|
||||||
|
//
|
||||||
|
SmbiosFldInterLink (
|
||||||
|
StructureNode,
|
||||||
|
(UINT16) OFFSET_OF (SMBIOS_TABLE_TYPE35, ManagementDeviceHandle),
|
||||||
|
34, // SMBIOS type 34 - Management Device
|
||||||
|
&ManagementDeviceLink,
|
||||||
|
&gEfiMiscSubClassGuid
|
||||||
|
);
|
||||||
|
|
||||||
|
//
|
||||||
|
// ManagementDeviceComponentLink
|
||||||
|
//
|
||||||
|
SmbiosFldInterLink (
|
||||||
|
StructureNode,
|
||||||
|
(UINT16) OFFSET_OF (SMBIOS_TABLE_TYPE35, ComponentHandle),
|
||||||
|
ManagementDeviceComponent->ComponentType, // SMBIOS type, according to SMBIOS spec, it can be Type 26, 27, 28, 29
|
||||||
|
&ManagementDeviceComponentLink,
|
||||||
|
&gEfiMiscSubClassGuid
|
||||||
|
);
|
||||||
|
|
||||||
|
//
|
||||||
|
// ManagementDeviceThresholdLink
|
||||||
|
//
|
||||||
|
SmbiosFldInterLink (
|
||||||
|
StructureNode,
|
||||||
|
(UINT16) OFFSET_OF (SMBIOS_TABLE_TYPE35, ThresholdHandle),
|
||||||
|
36, // SMBIOS type 36 - Management Device Threshold Data
|
||||||
|
&ManagementDeviceThresholdLink,
|
||||||
|
&gEfiMiscSubClassGuid
|
||||||
|
);
|
||||||
|
|
||||||
|
return EFI_SUCCESS;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
Field Filling Function for Misc SubClass record type 36 -- Management Device Threshold.
|
Field Filling Function for Misc SubClass record type 36 -- Management Device Threshold.
|
||||||
|
|
||||||
|
|
|
@ -1257,6 +1257,24 @@ SmbiosFldMiscType34 (
|
||||||
IN UINT32 RecordDataSize
|
IN UINT32 RecordDataSize
|
||||||
);
|
);
|
||||||
|
|
||||||
|
/**
|
||||||
|
Field Filling Function for Misc SubClass record type 35 -- Management Device Component.
|
||||||
|
|
||||||
|
@param StructureNode Pointer to SMBIOS_STRUCTURE_NODE which is current processed.
|
||||||
|
@param Offset Offset of SMBIOS record which RecordData will be filled.
|
||||||
|
@param RecordData RecordData buffer will be filled.
|
||||||
|
@param RecordDataSize The size of RecordData buffer.
|
||||||
|
|
||||||
|
@retval EFI_SUCCESS Success fill RecordData into SMBIOS's record buffer.
|
||||||
|
**/
|
||||||
|
EFI_STATUS
|
||||||
|
SmbiosFldMiscType35 (
|
||||||
|
IN OUT SMBIOS_STRUCTURE_NODE *StructureNode,
|
||||||
|
IN UINT32 Offset,
|
||||||
|
IN VOID *RecordData,
|
||||||
|
IN UINT32 RecordDataSize
|
||||||
|
);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
Field Filling Function for Misc SubClass record type 36 -- Management Device Threshold.
|
Field Filling Function for Misc SubClass record type 36 -- Management Device Threshold.
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue