summaryrefslogtreecommitdiff
path: root/EdkCompatibilityPkg
diff options
context:
space:
mode:
authorli-elvin <li-elvin@6f19259b-4bc3-4df7-8a09-765794883524>2011-08-01 07:23:14 +0000
committerli-elvin <li-elvin@6f19259b-4bc3-4df7-8a09-765794883524>2011-08-01 07:23:14 +0000
commitafe05b7a45cefed0fffd482741d57143b34dc036 (patch)
tree3a639e044c2e299a57e91bf5416fb8df467d146a /EdkCompatibilityPkg
parentaf00cab88d24a30466f0a90ca32f80bc6d2eba14 (diff)
downloadedk2-platforms-afe05b7a45cefed0fffd482741d57143b34dc036.tar.xz
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
Diffstat (limited to 'EdkCompatibilityPkg')
-rw-r--r--EdkCompatibilityPkg/Compatibility/PiSmbiosRecordOnDataHubSmbiosRecordThunk/Translate.c28
1 files changed, 23 insertions, 5 deletions
diff --git a/EdkCompatibilityPkg/Compatibility/PiSmbiosRecordOnDataHubSmbiosRecordThunk/Translate.c b/EdkCompatibilityPkg/Compatibility/PiSmbiosRecordOnDataHubSmbiosRecordThunk/Translate.c
index 851fb06c03..38b1697156 100644
--- a/EdkCompatibilityPkg/Compatibility/PiSmbiosRecordOnDataHubSmbiosRecordThunk/Translate.c
+++ b/EdkCompatibilityPkg/Compatibility/PiSmbiosRecordOnDataHubSmbiosRecordThunk/Translate.c
@@ -2,7 +2,7 @@
Translate the DataHub records via EFI_DATA_HUB_PROTOCOL to Smbios recorders
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
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
@@ -127,7 +127,7 @@ SmbiosProcessDataRecord (
StructureNode->SubInstance == DataHeader->SubInstance &&
CompareGuid (&(StructureNode->ProducerName), &(RecordHeader->ProducerName))
) {
- if (Conversion->SmbiosType >= 0X80) {
+ if (Conversion->SmbiosType >= 0x80) {
if (StructureNode->SmbiosType == ((SMBIOS_STRUCTURE_HDR *) SrcData)->Type) {
break;
}
@@ -144,7 +144,7 @@ SmbiosProcessDataRecord (
StructureNode->Instance == DataHeader->Instance &&
CompareGuid (&(StructureNode->ProducerName), &(RecordHeader->ProducerName))
) {
- if (Conversion->SmbiosType >= 0X80) {
+ if (Conversion->SmbiosType >= 0x80) {
if (StructureNode->SmbiosType == ((SMBIOS_STRUCTURE_HDR *) SrcData)->Type) {
break;
}
@@ -196,7 +196,6 @@ SmbiosProcessDataRecord (
// Allocate the structure instance
//
StructureNode->StructureSize = SmbiosGetTypeMinimalLength (Conversion->SmbiosType);
- StructureNode->SmbiosType = Conversion->SmbiosType;
//
// StructureSize include the TWO trailing zero byte.
@@ -209,7 +208,15 @@ SmbiosProcessDataRecord (
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;
Status = SmbiosProtocolCreateRecord (
NULL,
@@ -361,6 +368,17 @@ SmbiosProcessDataRecord (
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:
return ;