49 mSmbiosMiscImageHandle = ImageHandle;
51 EfiStatus =
gBS->LocateProtocol (
52 &gEfiSmbiosProtocolGuid,
54 (VOID **)&mSmbiosMiscSmbios
56 if (EFI_ERROR (EfiStatus)) {
57 DEBUG ((DEBUG_ERROR,
"Could not locate SMBIOS protocol. %r\n", EfiStatus));
63 mSmbiosMiscImageHandle,
67 if (mSmbiosMiscHiiHandle ==
NULL) {
68 return EFI_OUT_OF_RESOURCES;
71 for (Index = 0; Index < mSmbiosMiscDataTableEntries; ++Index) {
75 if (mSmbiosMiscDataTable[Index].Function !=
NULL) {
76 EfiStatus = (*mSmbiosMiscDataTable[Index].Function)(
77 mSmbiosMiscDataTable[Index].RecordData,
81 if (EFI_ERROR (EfiStatus)) {
84 "Misc smbios store error. Index=%d,"
117 IN OUT EFI_SMBIOS_HANDLE *SmbiosHandle OPTIONAL
121 EFI_SMBIOS_HANDLE Handle;
125 if (SmbiosHandle !=
NULL) {
126 Handle = *SmbiosHandle;
129 Status = mSmbiosMiscSmbios->Add (
136 if (SmbiosHandle !=
NULL) {
137 *SmbiosHandle = Handle;
158 EFI_SMBIOS_HANDLE SmbiosHandle;
165 Status = mSmbiosMiscSmbios->GetNext (
176 }
while (!EFI_ERROR (Status));
197 EFI_SMBIOS_HANDLE SmbiosHandle;
200 if (mSmbiosMiscSmbios ==
NULL) {
208 if (*HandleArray ==
NULL) {
209 DEBUG ((DEBUG_ERROR,
"HandleArray allocate memory resource failed.\n"));
216 for (Index = 0; Index < (*HandleCount); Index++) {
217 Status = mSmbiosMiscSmbios->GetNext (
225 if (!EFI_ERROR (Status)) {
226 (*HandleArray)[Index] = Record->Handle;
VOID *EFIAPI AllocateZeroPool(IN UINTN AllocationSize)
EFI_HII_HANDLE EFIAPI HiiAddPackages(IN CONST EFI_GUID *PackageListGuid, IN EFI_HANDLE DeviceHandle OPTIONAL,...)
#define SMBIOS_HANDLE_PI_RESERVED
#define DEBUG(Expression)
EFI_STATUS EFIAPI SmbiosMiscEntryPoint(IN EFI_HANDLE ImageHandle, IN EFI_SYSTEM_TABLE *SystemTable)
STATIC UINTN GetHandleCount(IN UINT8 SmbiosType)
EFI_STATUS SmbiosMiscAddRecord(IN UINT8 *Buffer, IN OUT EFI_SMBIOS_HANDLE *SmbiosHandle OPTIONAL)
VOID SmbiosMiscGetLinkTypeHandle(IN UINT8 SmbiosType, OUT SMBIOS_HANDLE **HandleArray, OUT UINTN *HandleCount)