summaryrefslogtreecommitdiff
path: root/Nt32Pkg
diff options
context:
space:
mode:
authorlzeng14 <lzeng14@6f19259b-4bc3-4df7-8a09-765794883524>2011-11-21 08:56:48 +0000
committerlzeng14 <lzeng14@6f19259b-4bc3-4df7-8a09-765794883524>2011-11-21 08:56:48 +0000
commit7ee85aa2ff751ce2420649bbb6f7db2d823dbd40 (patch)
treebe9b587a23ab21cfdf4c3c2c4c6fbb45d06cb643 /Nt32Pkg
parent49975acb395627a82ea58010c658d594d8111651 (diff)
According to PI errata 0000654 and 000811, we need use 0xFFFE to instead of 0 for EFI_SMBIOS_PROTOCOL.Add() SmbiosHandle parameter to assign a unique handle to the SMBIOS record, and for EFI_SMBIOS_PROTOCOL.GetNext() SmbiosHandle parameter to get the first matched SMBIOS handle or indicate no more SMBIOS record.
Signed-off-by: lzeng14 Reviewed-by: li-elvin git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@12751 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'Nt32Pkg')
-rw-r--r--Nt32Pkg/CpuRuntimeDxe/Cpu.c2
-rw-r--r--Nt32Pkg/MiscSubClassPlatformDxe/MiscBaseBoardManufacturerFunction.c10
-rw-r--r--Nt32Pkg/MiscSubClassPlatformDxe/MiscBiosVendorFunction.c10
-rw-r--r--Nt32Pkg/MiscSubClassPlatformDxe/MiscBootInformationFunction.c11
-rw-r--r--Nt32Pkg/MiscSubClassPlatformDxe/MiscChassisManufacturerFunction.c10
-rw-r--r--Nt32Pkg/MiscSubClassPlatformDxe/MiscNumberOfInstallableLanguagesFunction.c11
-rw-r--r--Nt32Pkg/MiscSubClassPlatformDxe/MiscOemStringFunction.c11
-rw-r--r--Nt32Pkg/MiscSubClassPlatformDxe/MiscPortInternalConnectorDesignatorFunction.c11
-rw-r--r--Nt32Pkg/MiscSubClassPlatformDxe/MiscResetCapabilitiesFunction.c11
-rw-r--r--Nt32Pkg/MiscSubClassPlatformDxe/MiscSubclassDriver.h28
-rw-r--r--Nt32Pkg/MiscSubClassPlatformDxe/MiscSubclassDriverEntryPoint.c37
-rw-r--r--Nt32Pkg/MiscSubClassPlatformDxe/MiscSystemLanguageStringFunction.c11
-rw-r--r--Nt32Pkg/MiscSubClassPlatformDxe/MiscSystemManufacturerFunction.c11
-rw-r--r--Nt32Pkg/MiscSubClassPlatformDxe/MiscSystemOptionStringFunction.c10
-rw-r--r--Nt32Pkg/MiscSubClassPlatformDxe/MiscSystemSlotDesignationFunction.c11
15 files changed, 87 insertions, 108 deletions
diff --git a/Nt32Pkg/CpuRuntimeDxe/Cpu.c b/Nt32Pkg/CpuRuntimeDxe/Cpu.c
index 4ac12a4e1..d15ac989e 100644
--- a/Nt32Pkg/CpuRuntimeDxe/Cpu.c
+++ b/Nt32Pkg/CpuRuntimeDxe/Cpu.c
@@ -402,7 +402,7 @@ LogSmbiosData (
EFI_STATUS Status;
EFI_SMBIOS_HANDLE SmbiosHandle;
- SmbiosHandle = 0;
+ SmbiosHandle = SMBIOS_HANDLE_PI_RESERVED;
Status = Smbios->Add (
Smbios,
NULL,
diff --git a/Nt32Pkg/MiscSubClassPlatformDxe/MiscBaseBoardManufacturerFunction.c b/Nt32Pkg/MiscSubClassPlatformDxe/MiscBaseBoardManufacturerFunction.c
index 6076e93b8..303726c3f 100644
--- a/Nt32Pkg/MiscSubClassPlatformDxe/MiscBaseBoardManufacturerFunction.c
+++ b/Nt32Pkg/MiscSubClassPlatformDxe/MiscBaseBoardManufacturerFunction.c
@@ -2,7 +2,7 @@
BaseBoard manufacturer information boot time changes.
SMBIOS type 2.
-Copyright (c) 2009, 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
@@ -154,13 +154,7 @@ MISC_SMBIOS_TABLE_FUNCTION(MiscBaseBoardManufacturer)
//
// Now we have got the full smbios record, call smbios protocol to add this record.
//
- SmbiosHandle = 0;
- Status = Smbios-> Add(
- Smbios,
- NULL,
- &SmbiosHandle,
- (EFI_SMBIOS_TABLE_HEADER *) SmbiosRecord
- );
+ Status = AddSmbiosRecord (Smbios, &SmbiosHandle, (EFI_SMBIOS_TABLE_HEADER *) SmbiosRecord);
FreePool(SmbiosRecord);
return Status;
diff --git a/Nt32Pkg/MiscSubClassPlatformDxe/MiscBiosVendorFunction.c b/Nt32Pkg/MiscSubClassPlatformDxe/MiscBiosVendorFunction.c
index eb1176531..415a8cab3 100644
--- a/Nt32Pkg/MiscSubClassPlatformDxe/MiscBiosVendorFunction.c
+++ b/Nt32Pkg/MiscSubClassPlatformDxe/MiscBiosVendorFunction.c
@@ -3,7 +3,7 @@
Misc. subclass type 2.
SMBIOS type 0.
-Copyright (c) 2009, 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
@@ -189,13 +189,7 @@ MISC_SMBIOS_TABLE_FUNCTION(MiscBiosVendor)
//
// Now we have got the full smbios record, call smbios protocol to add this record.
//
- SmbiosHandle = 0;
- Status = Smbios-> Add(
- Smbios,
- NULL,
- &SmbiosHandle,
- (EFI_SMBIOS_TABLE_HEADER *) SmbiosRecord
- );
+ Status = AddSmbiosRecord (Smbios, &SmbiosHandle, (EFI_SMBIOS_TABLE_HEADER *) SmbiosRecord);
FreePool(SmbiosRecord);
return Status;
diff --git a/Nt32Pkg/MiscSubClassPlatformDxe/MiscBootInformationFunction.c b/Nt32Pkg/MiscSubClassPlatformDxe/MiscBootInformationFunction.c
index 25105c3e4..0b916f2db 100644
--- a/Nt32Pkg/MiscSubClassPlatformDxe/MiscBootInformationFunction.c
+++ b/Nt32Pkg/MiscSubClassPlatformDxe/MiscBootInformationFunction.c
@@ -2,7 +2,7 @@
boot information boot time changes.
SMBIOS type 32.
-Copyright (c) 2009, 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
@@ -61,13 +61,8 @@ MISC_SMBIOS_TABLE_FUNCTION(BootInformationStatus)
//
// Now we have got the full smbios record, call smbios protocol to add this record.
//
- SmbiosHandle = 0;
- Status = Smbios-> Add(
- Smbios,
- NULL,
- &SmbiosHandle,
- (EFI_SMBIOS_TABLE_HEADER *) SmbiosRecord
- );
+ Status = AddSmbiosRecord (Smbios, &SmbiosHandle, (EFI_SMBIOS_TABLE_HEADER *) SmbiosRecord);
+
FreePool(SmbiosRecord);
return Status;
}
diff --git a/Nt32Pkg/MiscSubClassPlatformDxe/MiscChassisManufacturerFunction.c b/Nt32Pkg/MiscSubClassPlatformDxe/MiscChassisManufacturerFunction.c
index 586e2535c..c7f65ea83 100644
--- a/Nt32Pkg/MiscSubClassPlatformDxe/MiscChassisManufacturerFunction.c
+++ b/Nt32Pkg/MiscSubClassPlatformDxe/MiscChassisManufacturerFunction.c
@@ -2,7 +2,7 @@
Chassis manufacturer information boot time changes.
SMBIOS type 3.
-Copyright (c) 2009, 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
@@ -124,13 +124,7 @@ MISC_SMBIOS_TABLE_FUNCTION(MiscChassisManufacturer)
//
// Now we have got the full smbios record, call smbios protocol to add this record.
//
- SmbiosHandle = 0;
- Status = Smbios-> Add(
- Smbios,
- NULL,
- &SmbiosHandle,
- (EFI_SMBIOS_TABLE_HEADER *) SmbiosRecord
- );
+ Status = AddSmbiosRecord (Smbios, &SmbiosHandle, (EFI_SMBIOS_TABLE_HEADER *) SmbiosRecord);
FreePool(SmbiosRecord);
return Status;
diff --git a/Nt32Pkg/MiscSubClassPlatformDxe/MiscNumberOfInstallableLanguagesFunction.c b/Nt32Pkg/MiscSubClassPlatformDxe/MiscNumberOfInstallableLanguagesFunction.c
index 0b4d78875..5be7444b3 100644
--- a/Nt32Pkg/MiscSubClassPlatformDxe/MiscNumberOfInstallableLanguagesFunction.c
+++ b/Nt32Pkg/MiscSubClassPlatformDxe/MiscNumberOfInstallableLanguagesFunction.c
@@ -1,6 +1,6 @@
/** @file
-Copyright (c) 2009, 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
@@ -224,13 +224,8 @@ MISC_SMBIOS_TABLE_FUNCTION(NumberOfInstallableLanguages)
//
// Now we have got the full smbios record, call smbios protocol to add this record.
//
- SmbiosHandle = 0;
- Status = Smbios-> Add(
- Smbios,
- NULL,
- &SmbiosHandle,
- (EFI_SMBIOS_TABLE_HEADER *) SmbiosRecord
- );
+ Status = AddSmbiosRecord (Smbios, &SmbiosHandle, (EFI_SMBIOS_TABLE_HEADER *) SmbiosRecord);
+
FreePool(SmbiosRecord);
return Status;
}
diff --git a/Nt32Pkg/MiscSubClassPlatformDxe/MiscOemStringFunction.c b/Nt32Pkg/MiscSubClassPlatformDxe/MiscOemStringFunction.c
index 67d597935..077660257 100644
--- a/Nt32Pkg/MiscSubClassPlatformDxe/MiscOemStringFunction.c
+++ b/Nt32Pkg/MiscSubClassPlatformDxe/MiscOemStringFunction.c
@@ -2,7 +2,7 @@
boot information boot time changes.
SMBIOS type 11.
-Copyright (c) 2009, 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
@@ -69,13 +69,8 @@ MISC_SMBIOS_TABLE_FUNCTION(OemString)
//
// Now we have got the full smbios record, call smbios protocol to add this record.
//
- SmbiosHandle = 0;
- Status = Smbios-> Add(
- Smbios,
- NULL,
- &SmbiosHandle,
- (EFI_SMBIOS_TABLE_HEADER *) SmbiosRecord
- );
+ Status = AddSmbiosRecord (Smbios, &SmbiosHandle, (EFI_SMBIOS_TABLE_HEADER *) SmbiosRecord);
+
FreePool(SmbiosRecord);
return Status;
}
diff --git a/Nt32Pkg/MiscSubClassPlatformDxe/MiscPortInternalConnectorDesignatorFunction.c b/Nt32Pkg/MiscSubClassPlatformDxe/MiscPortInternalConnectorDesignatorFunction.c
index 6d2274f8a..1636abc4f 100644
--- a/Nt32Pkg/MiscSubClassPlatformDxe/MiscPortInternalConnectorDesignatorFunction.c
+++ b/Nt32Pkg/MiscSubClassPlatformDxe/MiscPortInternalConnectorDesignatorFunction.c
@@ -1,6 +1,6 @@
/**@file
-Copyright (c) 2006 - 2009, Intel Corporation. All rights reserved.<BR>
+Copyright (c) 2006 - 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
@@ -161,13 +161,8 @@ Returns:
//
// Now we have got the full smbios record, call smbios protocol to add this record.
//
- SmbiosHandle = 0;
- Status = Smbios-> Add(
- Smbios,
- NULL,
- &SmbiosHandle,
- (EFI_SMBIOS_TABLE_HEADER *) SmbiosRecord
- );
+ Status = AddSmbiosRecord (Smbios, &SmbiosHandle, (EFI_SMBIOS_TABLE_HEADER *) SmbiosRecord);
+
FreePool(SmbiosRecord);
return Status;
}
diff --git a/Nt32Pkg/MiscSubClassPlatformDxe/MiscResetCapabilitiesFunction.c b/Nt32Pkg/MiscSubClassPlatformDxe/MiscResetCapabilitiesFunction.c
index 52d5e4e67..7c1ffabe5 100644
--- a/Nt32Pkg/MiscSubClassPlatformDxe/MiscResetCapabilitiesFunction.c
+++ b/Nt32Pkg/MiscSubClassPlatformDxe/MiscResetCapabilitiesFunction.c
@@ -2,7 +2,7 @@
ResetCapabilities.
SMBIOS type 23.
-Copyright (c) 2009, 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
@@ -64,13 +64,8 @@ MISC_SMBIOS_TABLE_FUNCTION(MiscResetCapabilities)
//
// Now we have got the full smbios record, call smbios protocol to add this record.
//
- SmbiosHandle = 0;
- Status = Smbios-> Add(
- Smbios,
- NULL,
- &SmbiosHandle,
- (EFI_SMBIOS_TABLE_HEADER *) SmbiosRecord
- );
+ Status = AddSmbiosRecord (Smbios, &SmbiosHandle, (EFI_SMBIOS_TABLE_HEADER *) SmbiosRecord);
+
FreePool(SmbiosRecord);
return Status;
}
diff --git a/Nt32Pkg/MiscSubClassPlatformDxe/MiscSubclassDriver.h b/Nt32Pkg/MiscSubClassPlatformDxe/MiscSubclassDriver.h
index 2e87031e2..179a015de 100644
--- a/Nt32Pkg/MiscSubClassPlatformDxe/MiscSubclassDriver.h
+++ b/Nt32Pkg/MiscSubClassPlatformDxe/MiscSubclassDriver.h
@@ -1,6 +1,6 @@
/**@file
-Copyright (c) 2006 - 2009, Intel Corporation. All rights reserved.<BR>
+Copyright (c) 2006 - 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
@@ -102,16 +102,28 @@ extern UINTN mMiscSubclassDataTableEntries;
extern UINT8 MiscSubclassStrings[];
extern EFI_HII_HANDLE mHiiHandle;
-//
-// Prototypes
-//
+
+/**
+ Add an SMBIOS record.
+
+ @param Smbios The EFI_SMBIOS_PROTOCOL instance.
+ @param SmbiosHandle A unique handle will be assigned to the SMBIOS record.
+ @param Record The data for the fixed portion of the SMBIOS record. The format of the record is
+ determined by EFI_SMBIOS_TABLE_HEADER.Type. The size of the formatted area is defined
+ by EFI_SMBIOS_TABLE_HEADER.Length and either followed by a double-null (0x0000) or
+ a set of null terminated strings and a null.
+
+ @retval EFI_SUCCESS Record was added.
+ @retval EFI_OUT_OF_RESOURCES Record was not added due to lack of system resources.
+
+**/
EFI_STATUS
-MiscSubclassDriverEntryPoint (
- IN EFI_HANDLE ImageHandle,
- IN EFI_SYSTEM_TABLE *SystemTable
+AddSmbiosRecord (
+ IN EFI_SMBIOS_PROTOCOL *Smbios,
+ OUT EFI_SMBIOS_HANDLE *SmbiosHandle,
+ IN EFI_SMBIOS_TABLE_HEADER *Record
);
-
#endif /* _MISC_SUBCLASS_DRIVER_H */
/* eof - MiscSubclassDriver.h */
diff --git a/Nt32Pkg/MiscSubClassPlatformDxe/MiscSubclassDriverEntryPoint.c b/Nt32Pkg/MiscSubClassPlatformDxe/MiscSubclassDriverEntryPoint.c
index 9c901d82b..95e050f32 100644
--- a/Nt32Pkg/MiscSubClassPlatformDxe/MiscSubclassDriverEntryPoint.c
+++ b/Nt32Pkg/MiscSubClassPlatformDxe/MiscSubclassDriverEntryPoint.c
@@ -1,6 +1,6 @@
/**@file
-Copyright (c) 2006 - 2009, Intel Corporation. All rights reserved.<BR>
+Copyright (c) 2006 - 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
@@ -90,8 +90,8 @@ LogMemorySmbiosRecord (
//
// Generate Memory Array Mapped Address info (TYPE 19)
//
- MemArrayMappedAddrSmbiosHandle = 0;
- Status = Smbios->Add (Smbios, NULL, &MemArrayMappedAddrSmbiosHandle, (EFI_SMBIOS_TABLE_HEADER*) Type19Record);
+ Status = AddSmbiosRecord (Smbios, &MemArrayMappedAddrSmbiosHandle, (EFI_SMBIOS_TABLE_HEADER*) Type19Record);
+
FreePool(Type19Record);
ASSERT_EFI_ERROR (Status);
@@ -168,3 +168,34 @@ Returns:
EfiStatus = LogMemorySmbiosRecord();
return EfiStatus;
}
+
+/**
+ Add an SMBIOS record.
+
+ @param Smbios The EFI_SMBIOS_PROTOCOL instance.
+ @param SmbiosHandle A unique handle will be assigned to the SMBIOS record.
+ @param Record The data for the fixed portion of the SMBIOS record. The format of the record is
+ determined by EFI_SMBIOS_TABLE_HEADER.Type. The size of the formatted area is defined
+ by EFI_SMBIOS_TABLE_HEADER.Length and either followed by a double-null (0x0000) or
+ a set of null terminated strings and a null.
+
+ @retval EFI_SUCCESS Record was added.
+ @retval EFI_OUT_OF_RESOURCES Record was not added due to lack of system resources.
+
+**/
+EFI_STATUS
+AddSmbiosRecord (
+ IN EFI_SMBIOS_PROTOCOL *Smbios,
+ OUT EFI_SMBIOS_HANDLE *SmbiosHandle,
+ IN EFI_SMBIOS_TABLE_HEADER *Record
+ )
+{
+ *SmbiosHandle = SMBIOS_HANDLE_PI_RESERVED;
+ return Smbios->Add (
+ Smbios,
+ NULL,
+ SmbiosHandle,
+ Record
+ );
+}
+
diff --git a/Nt32Pkg/MiscSubClassPlatformDxe/MiscSystemLanguageStringFunction.c b/Nt32Pkg/MiscSubClassPlatformDxe/MiscSystemLanguageStringFunction.c
index 2cdbfda10..f033d1145 100644
--- a/Nt32Pkg/MiscSubClassPlatformDxe/MiscSystemLanguageStringFunction.c
+++ b/Nt32Pkg/MiscSubClassPlatformDxe/MiscSystemLanguageStringFunction.c
@@ -1,6 +1,6 @@
/** @file
-Copyright (c) 2009, 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
@@ -70,13 +70,8 @@ MISC_SMBIOS_TABLE_FUNCTION(SystemLanguageString)
//
// Now we have got the full smbios record, call smbios protocol to add this record.
//
- SmbiosHandle = 0;
- Status = Smbios-> Add(
- Smbios,
- NULL,
- &SmbiosHandle,
- (EFI_SMBIOS_TABLE_HEADER *) SmbiosRecord
- );
+ Status = AddSmbiosRecord (Smbios, &SmbiosHandle, (EFI_SMBIOS_TABLE_HEADER *) SmbiosRecord);
+
FreePool(SmbiosRecord);
return Status;
}
diff --git a/Nt32Pkg/MiscSubClassPlatformDxe/MiscSystemManufacturerFunction.c b/Nt32Pkg/MiscSubClassPlatformDxe/MiscSystemManufacturerFunction.c
index 55c85e9e6..9f3d5fe26 100644
--- a/Nt32Pkg/MiscSubClassPlatformDxe/MiscSystemManufacturerFunction.c
+++ b/Nt32Pkg/MiscSubClassPlatformDxe/MiscSystemManufacturerFunction.c
@@ -1,6 +1,6 @@
/**@file
-Copyright (c) 2006 - 2009, Intel Corporation. All rights reserved.<BR>
+Copyright (c) 2006 - 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
@@ -126,13 +126,8 @@ MISC_SMBIOS_TABLE_FUNCTION(MiscSystemManufacturer)
//
// Now we have got the full smbios record, call smbios protocol to add this record.
//
- SmbiosHandle = 0;
- Status = Smbios-> Add(
- Smbios,
- NULL,
- &SmbiosHandle,
- (EFI_SMBIOS_TABLE_HEADER *) SmbiosRecord
- );
+ Status = AddSmbiosRecord (Smbios, &SmbiosHandle, (EFI_SMBIOS_TABLE_HEADER *) SmbiosRecord);
+
FreePool(SmbiosRecord);
return Status;
}
diff --git a/Nt32Pkg/MiscSubClassPlatformDxe/MiscSystemOptionStringFunction.c b/Nt32Pkg/MiscSubClassPlatformDxe/MiscSystemOptionStringFunction.c
index 1f7026682..b9ce708f8 100644
--- a/Nt32Pkg/MiscSubClassPlatformDxe/MiscSystemOptionStringFunction.c
+++ b/Nt32Pkg/MiscSubClassPlatformDxe/MiscSystemOptionStringFunction.c
@@ -2,7 +2,7 @@
BIOS system option string boot time changes.
SMBIOS type 12.
-Copyright (c) 2009, 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
@@ -70,13 +70,7 @@ MISC_SMBIOS_TABLE_FUNCTION(SystemOptionString)
//
// Now we have got the full smbios record, call smbios protocol to add this record.
//
- SmbiosHandle = 0;
- Status = Smbios-> Add(
- Smbios,
- NULL,
- &SmbiosHandle,
- (EFI_SMBIOS_TABLE_HEADER *) SmbiosRecord
- );
+ Status = AddSmbiosRecord (Smbios, &SmbiosHandle, (EFI_SMBIOS_TABLE_HEADER *) SmbiosRecord);
FreePool(SmbiosRecord);
return Status;
diff --git a/Nt32Pkg/MiscSubClassPlatformDxe/MiscSystemSlotDesignationFunction.c b/Nt32Pkg/MiscSubClassPlatformDxe/MiscSystemSlotDesignationFunction.c
index 026ef2493..daf597039 100644
--- a/Nt32Pkg/MiscSubClassPlatformDxe/MiscSystemSlotDesignationFunction.c
+++ b/Nt32Pkg/MiscSubClassPlatformDxe/MiscSystemSlotDesignationFunction.c
@@ -2,7 +2,7 @@
BIOS system slot designator information boot time changes.
SMBIOS type 9.
-Copyright (c) 2009, 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
@@ -85,13 +85,8 @@ MISC_SMBIOS_TABLE_FUNCTION(MiscSystemSlotDesignation)
//
// Now we have got the full smbios record, call smbios protocol to add this record.
//
- SmbiosHandle = 0;
- Status = Smbios-> Add(
- Smbios,
- NULL,
- &SmbiosHandle,
- (EFI_SMBIOS_TABLE_HEADER *) SmbiosRecord
- );
+ Status = AddSmbiosRecord (Smbios, &SmbiosHandle, (EFI_SMBIOS_TABLE_HEADER *) SmbiosRecord);
+
FreePool(SmbiosRecord);
return Status;
}