2 boot information boot time changes.
5 Copyright (c) 2009 - 2011, Intel Corporation. All rights reserved.<BR>
6 SPDX-License-Identifier: BSD-2-Clause-Patent
10 #include "MiscSubclassDriver.h"
14 This function makes boot time changes to the contents of the
15 MiscBootInformation (Type 32).
17 @param RecordData Pointer to copy of RecordData from the Data Table.
19 @retval EFI_SUCCESS All parameters were valid.
20 @retval EFI_UNSUPPORTED Unexpected RecordType value.
21 @retval EFI_INVALID_PARAMETER Invalid parameter was found.
25 MISC_SMBIOS_TABLE_FUNCTION(BootInformationStatus
)
28 EFI_SMBIOS_HANDLE SmbiosHandle
;
29 SMBIOS_TABLE_TYPE32
*SmbiosRecord
;
30 EFI_MISC_BOOT_INFORMATION_STATUS
* ForType32InputData
;
32 ForType32InputData
= (EFI_MISC_BOOT_INFORMATION_STATUS
*)RecordData
;
35 // First check for invalid parameters.
37 if (RecordData
== NULL
) {
38 return EFI_INVALID_PARAMETER
;
42 // Two zeros following the last string.
44 SmbiosRecord
= AllocatePool(sizeof (SMBIOS_TABLE_TYPE32
) + 1 + 1);
45 ZeroMem(SmbiosRecord
, sizeof (SMBIOS_TABLE_TYPE32
) + 1 + 1);
47 SmbiosRecord
->Hdr
.Type
= EFI_SMBIOS_TYPE_SYSTEM_BOOT_INFORMATION
;
48 SmbiosRecord
->Hdr
.Length
= sizeof (SMBIOS_TABLE_TYPE32
);
50 // Make handle chosen by smbios protocol.add automatically.
52 SmbiosRecord
->Hdr
.Handle
= 0;
53 SmbiosRecord
->BootStatus
= (UINT8
)ForType32InputData
->BootInformationStatus
;
56 // Now we have got the full smbios record, call smbios protocol to add this record.
58 Status
= AddSmbiosRecord (Smbios
, &SmbiosHandle
, (EFI_SMBIOS_TABLE_HEADER
*) SmbiosRecord
);
60 FreePool(SmbiosRecord
);