EFI_STATUS Status;\r
EFI_SMBIOS_HANDLE SmbiosHandle;\r
\r
- SmbiosHandle = 0;\r
+ SmbiosHandle = SMBIOS_HANDLE_PI_RESERVED;\r
Status = Smbios->Add (\r
Smbios,\r
NULL,\r
BaseBoard manufacturer information boot time changes.\r
SMBIOS type 2.\r
\r
- Copyright (c) 2009, Intel Corporation. All rights reserved.<BR>\r
+ Copyright (c) 2009 - 2011, Intel Corporation. All rights reserved.<BR>\r
This program and the accompanying materials\r
are licensed and made available under the terms and conditions of the BSD License\r
which accompanies this distribution. The full text of the license may be found at\r
//\r
// Now we have got the full smbios record, call smbios protocol to add this record.\r
//\r
- SmbiosHandle = 0;\r
- Status = Smbios-> Add(\r
- Smbios,\r
- NULL,\r
- &SmbiosHandle,\r
- (EFI_SMBIOS_TABLE_HEADER *) SmbiosRecord\r
- );\r
+ Status = AddSmbiosRecord (Smbios, &SmbiosHandle, (EFI_SMBIOS_TABLE_HEADER *) SmbiosRecord);\r
\r
FreePool(SmbiosRecord);\r
return Status;\r
//\r
// Now we have got the full smbios record, call smbios protocol to add this record.\r
//\r
- SmbiosHandle = 0;\r
- Status = Smbios-> Add(\r
- Smbios,\r
- NULL,\r
- &SmbiosHandle,\r
- (EFI_SMBIOS_TABLE_HEADER *) SmbiosRecord\r
- );\r
+ Status = AddSmbiosRecord (Smbios, &SmbiosHandle, (EFI_SMBIOS_TABLE_HEADER *) SmbiosRecord);\r
\r
FreePool(SmbiosRecord);\r
return Status;\r
boot information boot time changes.\r
SMBIOS type 32.\r
\r
- Copyright (c) 2009, Intel Corporation. All rights reserved.<BR>\r
+ Copyright (c) 2009 - 2011, Intel Corporation. All rights reserved.<BR>\r
This program and the accompanying materials\r
are licensed and made available under the terms and conditions of the BSD License\r
which accompanies this distribution. The full text of the license may be found at\r
//\r
// Now we have got the full smbios record, call smbios protocol to add this record.\r
//\r
- SmbiosHandle = 0;\r
- Status = Smbios-> Add(\r
- Smbios,\r
- NULL,\r
- &SmbiosHandle,\r
- (EFI_SMBIOS_TABLE_HEADER *) SmbiosRecord\r
- );\r
+ Status = AddSmbiosRecord (Smbios, &SmbiosHandle, (EFI_SMBIOS_TABLE_HEADER *) SmbiosRecord);\r
+\r
FreePool(SmbiosRecord);\r
return Status;\r
}\r
Chassis manufacturer information boot time changes.\r
SMBIOS type 3.\r
\r
- Copyright (c) 2009, Intel Corporation. All rights reserved.<BR>\r
+ Copyright (c) 2009 - 2011, Intel Corporation. All rights reserved.<BR>\r
This program and the accompanying materials\r
are licensed and made available under the terms and conditions of the BSD License\r
which accompanies this distribution. The full text of the license may be found at\r
//\r
// Now we have got the full smbios record, call smbios protocol to add this record.\r
//\r
- SmbiosHandle = 0;\r
- Status = Smbios-> Add(\r
- Smbios,\r
- NULL,\r
- &SmbiosHandle,\r
- (EFI_SMBIOS_TABLE_HEADER *) SmbiosRecord\r
- );\r
+ Status = AddSmbiosRecord (Smbios, &SmbiosHandle, (EFI_SMBIOS_TABLE_HEADER *) SmbiosRecord);\r
\r
FreePool(SmbiosRecord);\r
return Status;\r
This driver parses the mSmbiosMiscDataTable structure and reports\r
any generated data.\r
\r
- Copyright (c) 2009, Intel Corporation. All rights reserved.<BR>\r
+ Copyright (c) 2009 - 2011, Intel Corporation. All rights reserved.<BR>\r
This program and the accompanying materials\r
are licensed and made available under the terms and conditions of the BSD License\r
which accompanies this distribution. The full text of the license may be found at\r
//\r
// Now we have got the full smbios record, call smbios protocol to add this record.\r
//\r
- SmbiosHandle = 0;\r
- Status = Smbios-> Add(\r
- Smbios,\r
- NULL,\r
- &SmbiosHandle,\r
- (EFI_SMBIOS_TABLE_HEADER *) SmbiosRecord\r
- );\r
+ Status = AddSmbiosRecord (Smbios, &SmbiosHandle, (EFI_SMBIOS_TABLE_HEADER *) SmbiosRecord);\r
+\r
FreePool(SmbiosRecord);\r
return Status;\r
}\r
boot information boot time changes.\r
SMBIOS type 11.\r
\r
- Copyright (c) 2009, Intel Corporation. All rights reserved.<BR>\r
+ Copyright (c) 2009 - 2011, Intel Corporation. All rights reserved.<BR>\r
This program and the accompanying materials\r
are licensed and made available under the terms and conditions of the BSD License\r
which accompanies this distribution. The full text of the license may be found at\r
//\r
// Now we have got the full smbios record, call smbios protocol to add this record.\r
//\r
- SmbiosHandle = 0;\r
- Status = Smbios-> Add(\r
- Smbios,\r
- NULL,\r
- &SmbiosHandle,\r
- (EFI_SMBIOS_TABLE_HEADER *) SmbiosRecord\r
- );\r
+ Status = AddSmbiosRecord (Smbios, &SmbiosHandle, (EFI_SMBIOS_TABLE_HEADER *) SmbiosRecord);\r
+\r
FreePool(SmbiosRecord);\r
return Status;\r
}\r
/*++\r
\r
-Copyright (c) 2006 - 2009, Intel Corporation. All rights reserved.<BR>\r
+Copyright (c) 2006 - 2011, Intel Corporation. All rights reserved.<BR>\r
This program and the accompanying materials\r
are licensed and made available under the terms and conditions of the BSD License\r
which accompanies this distribution. The full text of the license may be found at\r
//\r
// Now we have got the full smbios record, call smbios protocol to add this record.\r
//\r
- SmbiosHandle = 0;\r
- Status = Smbios-> Add(\r
- Smbios,\r
- NULL,\r
- &SmbiosHandle,\r
- (EFI_SMBIOS_TABLE_HEADER *) SmbiosRecord\r
- );\r
+ Status = AddSmbiosRecord (Smbios, &SmbiosHandle, (EFI_SMBIOS_TABLE_HEADER *) SmbiosRecord);\r
+\r
FreePool(SmbiosRecord);\r
return Status;\r
}\r
ResetCapabilities.\r
SMBIOS type 23.\r
\r
- Copyright (c) 2009, Intel Corporation. All rights reserved.<BR>\r
+ Copyright (c) 2009 - 2011, Intel Corporation. All rights reserved.<BR>\r
This program and the accompanying materials\r
are licensed and made available under the terms and conditions of the BSD License\r
which accompanies this distribution. The full text of the license may be found at\r
//\r
// Now we have got the full smbios record, call smbios protocol to add this record.\r
//\r
- SmbiosHandle = 0;\r
- Status = Smbios-> Add(\r
- Smbios,\r
- NULL,\r
- &SmbiosHandle,\r
- (EFI_SMBIOS_TABLE_HEADER *) SmbiosRecord\r
- );\r
+ Status = AddSmbiosRecord (Smbios, &SmbiosHandle, (EFI_SMBIOS_TABLE_HEADER *) SmbiosRecord);\r
+\r
FreePool(SmbiosRecord);\r
return Status;\r
}\r
/*++\r
\r
-Copyright (c) 2006 - 2009, Intel Corporation. All rights reserved.<BR>\r
+Copyright (c) 2006 - 2011, Intel Corporation. All rights reserved.<BR>\r
This program and the accompanying materials\r
are licensed and made available under the terms and conditions of the BSD License\r
which accompanies this distribution. The full text of the license may be found at\r
extern UINT8 MiscSubclassStrings[];\r
extern EFI_HII_HANDLE mHiiHandle;\r
\r
-//\r
-// Prototypes\r
-//\r
+/**\r
+ Add an SMBIOS record.\r
+\r
+ @param Smbios The EFI_SMBIOS_PROTOCOL instance.\r
+ @param SmbiosHandle A unique handle will be assigned to the SMBIOS record.\r
+ @param Record The data for the fixed portion of the SMBIOS record. The format of the record is\r
+ determined by EFI_SMBIOS_TABLE_HEADER.Type. The size of the formatted area is defined \r
+ by EFI_SMBIOS_TABLE_HEADER.Length and either followed by a double-null (0x0000) or \r
+ a set of null terminated strings and a null.\r
+\r
+ @retval EFI_SUCCESS Record was added.\r
+ @retval EFI_OUT_OF_RESOURCES Record was not added due to lack of system resources.\r
+\r
+**/\r
EFI_STATUS\r
-EFIAPI\r
-MiscSubclassDriverEntryPoint (\r
- IN EFI_HANDLE ImageHandle,\r
- IN EFI_SYSTEM_TABLE *SystemTable\r
+AddSmbiosRecord (\r
+ IN EFI_SMBIOS_PROTOCOL *Smbios,\r
+ OUT EFI_SMBIOS_HANDLE *SmbiosHandle,\r
+ IN EFI_SMBIOS_TABLE_HEADER *Record\r
);\r
\r
-\r
#endif /* _MISC_SUBCLASS_DRIVER_H */\r
\r
/* eof - MiscSubclassDriver.h */\r
/*++\r
\r
-Copyright (c) 2006 - 2009, Intel Corporation. All rights reserved.<BR>\r
+Copyright (c) 2006 - 2011, Intel Corporation. All rights reserved.<BR>\r
This program and the accompanying materials\r
are licensed and made available under the terms and conditions of the BSD License\r
which accompanies this distribution. The full text of the license may be found at\r
//\r
// Generate Memory Array Mapped Address info (TYPE 19)\r
//\r
- MemArrayMappedAddrSmbiosHandle = 0;\r
- Status = Smbios->Add (Smbios, NULL, &MemArrayMappedAddrSmbiosHandle, (EFI_SMBIOS_TABLE_HEADER*) Type19Record);\r
+ Status = AddSmbiosRecord (Smbios, &MemArrayMappedAddrSmbiosHandle, (EFI_SMBIOS_TABLE_HEADER*) Type19Record);\r
+\r
FreePool(Type19Record);\r
ASSERT_EFI_ERROR (Status);\r
\r
EfiStatus = LogMemorySmbiosRecord();\r
return EfiStatus;\r
}\r
+\r
+/**\r
+ Add an SMBIOS record.\r
+\r
+ @param Smbios The EFI_SMBIOS_PROTOCOL instance.\r
+ @param SmbiosHandle A unique handle will be assigned to the SMBIOS record.\r
+ @param Record The data for the fixed portion of the SMBIOS record. The format of the record is\r
+ determined by EFI_SMBIOS_TABLE_HEADER.Type. The size of the formatted area is defined \r
+ by EFI_SMBIOS_TABLE_HEADER.Length and either followed by a double-null (0x0000) or \r
+ a set of null terminated strings and a null.\r
+\r
+ @retval EFI_SUCCESS Record was added.\r
+ @retval EFI_OUT_OF_RESOURCES Record was not added due to lack of system resources.\r
+\r
+**/\r
+EFI_STATUS\r
+AddSmbiosRecord (\r
+ IN EFI_SMBIOS_PROTOCOL *Smbios,\r
+ OUT EFI_SMBIOS_HANDLE *SmbiosHandle,\r
+ IN EFI_SMBIOS_TABLE_HEADER *Record\r
+ )\r
+{\r
+ *SmbiosHandle = SMBIOS_HANDLE_PI_RESERVED;\r
+ return Smbios->Add (\r
+ Smbios,\r
+ NULL,\r
+ SmbiosHandle,\r
+ Record\r
+ );\r
+}\r
+\r
ResetCapabilities.\r
SMBIOS type 23.\r
\r
- Copyright (c) 2009, Intel Corporation. All rights reserved.<BR>\r
+ Copyright (c) 2009 - 2011, Intel Corporation. All rights reserved.<BR>\r
This program and the accompanying materials\r
are licensed and made available under the terms and conditions of the BSD License\r
which accompanies this distribution. The full text of the license may be found at\r
//\r
// Now we have got the full smbios record, call smbios protocol to add this record.\r
//\r
- SmbiosHandle = 0;\r
- Status = Smbios-> Add(\r
- Smbios,\r
- NULL,\r
- &SmbiosHandle,\r
- (EFI_SMBIOS_TABLE_HEADER *) SmbiosRecord\r
- );\r
+ Status = AddSmbiosRecord (Smbios, &SmbiosHandle, (EFI_SMBIOS_TABLE_HEADER *) SmbiosRecord);\r
+\r
FreePool(SmbiosRecord);\r
return Status;\r
}\r
/*++\r
\r
-Copyright (c) 2006 - 2009, Intel Corporation. All rights reserved.<BR>\r
+Copyright (c) 2006 - 2011, Intel Corporation. All rights reserved.<BR>\r
This program and the accompanying materials\r
are licensed and made available under the terms and conditions of the BSD License\r
which accompanies this distribution. The full text of the license may be found at\r
//\r
// Now we have got the full smbios record, call smbios protocol to add this record.\r
//\r
- SmbiosHandle = 0;\r
- Status = Smbios-> Add(\r
- Smbios,\r
- NULL,\r
- &SmbiosHandle,\r
- (EFI_SMBIOS_TABLE_HEADER *) SmbiosRecord\r
- );\r
+ Status = AddSmbiosRecord (Smbios, &SmbiosHandle, (EFI_SMBIOS_TABLE_HEADER *) SmbiosRecord);\r
+\r
FreePool(SmbiosRecord);\r
return Status;\r
}\r
BIOS system option string boot time changes.\r
SMBIOS type 12.\r
\r
- Copyright (c) 2009, Intel Corporation. All rights reserved.<BR>\r
+ Copyright (c) 2009 - 2011, Intel Corporation. All rights reserved.<BR>\r
This program and the accompanying materials\r
are licensed and made available under the terms and conditions of the BSD License\r
which accompanies this distribution. The full text of the license may be found at\r
//\r
// Now we have got the full smbios record, call smbios protocol to add this record.\r
//\r
- SmbiosHandle = 0;\r
- Status = Smbios-> Add(\r
- Smbios,\r
- NULL,\r
- &SmbiosHandle,\r
- (EFI_SMBIOS_TABLE_HEADER *) SmbiosRecord\r
- );\r
+ Status = AddSmbiosRecord (Smbios, &SmbiosHandle, (EFI_SMBIOS_TABLE_HEADER *) SmbiosRecord);\r
\r
FreePool(SmbiosRecord);\r
return Status;\r
BIOS system slot designator information boot time changes.\r
SMBIOS type 9.\r
\r
- Copyright (c) 2009, Intel Corporation. All rights reserved.<BR>\r
+ Copyright (c) 2009 - 2011, Intel Corporation. All rights reserved.<BR>\r
This program and the accompanying materials\r
are licensed and made available under the terms and conditions of the BSD License\r
which accompanies this distribution. The full text of the license may be found at\r
//\r
// Now we have got the full smbios record, call smbios protocol to add this record.\r
//\r
- SmbiosHandle = 0;\r
- Status = Smbios-> Add(\r
- Smbios,\r
- NULL,\r
- &SmbiosHandle,\r
- (EFI_SMBIOS_TABLE_HEADER *) SmbiosRecord\r
- );\r
+ Status = AddSmbiosRecord (Smbios, &SmbiosHandle, (EFI_SMBIOS_TABLE_HEADER *) SmbiosRecord);\r
+\r
FreePool(SmbiosRecord);\r
return Status;\r
}\r