summaryrefslogtreecommitdiff
path: root/Nt32Pkg/MiscSubClassPlatformDxe/MiscSubclassDriverEntryPoint.c
diff options
context:
space:
mode:
Diffstat (limited to 'Nt32Pkg/MiscSubClassPlatformDxe/MiscSubclassDriverEntryPoint.c')
-rw-r--r--Nt32Pkg/MiscSubClassPlatformDxe/MiscSubclassDriverEntryPoint.c37
1 files changed, 34 insertions, 3 deletions
diff --git a/Nt32Pkg/MiscSubClassPlatformDxe/MiscSubclassDriverEntryPoint.c b/Nt32Pkg/MiscSubClassPlatformDxe/MiscSubclassDriverEntryPoint.c
index 9c901d82b9..95e050f323 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
+ );
+}
+