Create smbios table before ReadyToBoot event. For SMBIOS thunk driver, create/update smbios table in configuration table when each field is updated.

Signed-off-by: li-elvin
Reviewed-by: lzeng14


git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@12066 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
li-elvin 2011-08-01 07:23:14 +00:00
parent af00cab88d
commit afe05b7a45
1 changed files with 23 additions and 5 deletions

View File

@ -2,7 +2,7 @@
Translate the DataHub records via EFI_DATA_HUB_PROTOCOL to Smbios recorders Translate the DataHub records via EFI_DATA_HUB_PROTOCOL to Smbios recorders
via EFI_SMBIOS_PROTOCOL. via EFI_SMBIOS_PROTOCOL.
Copyright (c) 2009 - 2010, Intel Corporation. All rights reserved.<BR> Copyright (c) 2009 - 2011, Intel Corporation. All rights reserved.<BR>
This program and the accompanying materials This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License are licensed and made available under the terms and conditions of the BSD License
which accompanies this distribution. The full text of the license may be found at which accompanies this distribution. The full text of the license may be found at
@ -127,7 +127,7 @@ SmbiosProcessDataRecord (
StructureNode->SubInstance == DataHeader->SubInstance && StructureNode->SubInstance == DataHeader->SubInstance &&
CompareGuid (&(StructureNode->ProducerName), &(RecordHeader->ProducerName)) CompareGuid (&(StructureNode->ProducerName), &(RecordHeader->ProducerName))
) { ) {
if (Conversion->SmbiosType >= 0X80) { if (Conversion->SmbiosType >= 0x80) {
if (StructureNode->SmbiosType == ((SMBIOS_STRUCTURE_HDR *) SrcData)->Type) { if (StructureNode->SmbiosType == ((SMBIOS_STRUCTURE_HDR *) SrcData)->Type) {
break; break;
} }
@ -144,7 +144,7 @@ SmbiosProcessDataRecord (
StructureNode->Instance == DataHeader->Instance && StructureNode->Instance == DataHeader->Instance &&
CompareGuid (&(StructureNode->ProducerName), &(RecordHeader->ProducerName)) CompareGuid (&(StructureNode->ProducerName), &(RecordHeader->ProducerName))
) { ) {
if (Conversion->SmbiosType >= 0X80) { if (Conversion->SmbiosType >= 0x80) {
if (StructureNode->SmbiosType == ((SMBIOS_STRUCTURE_HDR *) SrcData)->Type) { if (StructureNode->SmbiosType == ((SMBIOS_STRUCTURE_HDR *) SrcData)->Type) {
break; break;
} }
@ -196,7 +196,6 @@ SmbiosProcessDataRecord (
// Allocate the structure instance // Allocate the structure instance
// //
StructureNode->StructureSize = SmbiosGetTypeMinimalLength (Conversion->SmbiosType); StructureNode->StructureSize = SmbiosGetTypeMinimalLength (Conversion->SmbiosType);
StructureNode->SmbiosType = Conversion->SmbiosType;
// //
// StructureSize include the TWO trailing zero byte. // StructureSize include the TWO trailing zero byte.
@ -209,7 +208,15 @@ SmbiosProcessDataRecord (
goto Done; goto Done;
} }
StructureNode->SmbiosType = Conversion->SmbiosType; //
// Assign correct SmbiosType when OEM type and Non-OEM type
//
if (Conversion->SmbiosType >= 0x80) {
StructureNode->SmbiosType = ((SMBIOS_STRUCTURE_HDR *) SrcData)->Type;
} else {
StructureNode->SmbiosType = Conversion->SmbiosType;
}
StructureNode->SmbiosHandle = 0; StructureNode->SmbiosHandle = 0;
Status = SmbiosProtocolCreateRecord ( Status = SmbiosProtocolCreateRecord (
NULL, NULL,
@ -361,6 +368,17 @@ SmbiosProcessDataRecord (
goto Done; goto Done;
} }
//
// SmbiosEnlargeStructureBuffer is called to remove and add again
// this SMBIOS entry to reflash SMBIOS table in configuration table.
//
SmbiosEnlargeStructureBuffer (
StructureNode,
StructureNode->Structure->Length,
StructureNode->StructureSize,
StructureNode->StructureSize
);
} }
Done: Done:
return ; return ;