2 boot information boot time changes.
5 Copyright (c) 2013-2015 Intel Corporation.
7 SPDX-License-Identifier: BSD-2-Clause-Patent
13 #include "CommonHeader.h"
14 #include "SmbiosMisc.h"
18 This function makes boot time changes to the contents of the
19 MiscBootInformation (Type 32).
21 @param RecordData Pointer to copy of RecordData from the Data Table.
23 @retval EFI_SUCCESS All parameters were valid.
24 @retval EFI_UNSUPPORTED Unexpected RecordType value.
25 @retval EFI_INVALID_PARAMETER Invalid parameter was found.
29 MISC_SMBIOS_TABLE_FUNCTION(MiscBootInfoStatus
)
32 EFI_SMBIOS_HANDLE SmbiosHandle
;
33 SMBIOS_TABLE_TYPE32
*SmbiosRecord
;
34 EFI_MISC_BOOT_INFORMATION_STATUS
* ForType32InputData
;
36 ForType32InputData
= (EFI_MISC_BOOT_INFORMATION_STATUS
*)RecordData
;
39 // First check for invalid parameters.
41 if (RecordData
== NULL
) {
42 return EFI_INVALID_PARAMETER
;
46 // Two zeros following the last string.
48 SmbiosRecord
= AllocatePool(sizeof (SMBIOS_TABLE_TYPE32
) + 1 + 1);
49 ZeroMem(SmbiosRecord
, sizeof (SMBIOS_TABLE_TYPE32
) + 1 + 1);
51 SmbiosRecord
->Hdr
.Type
= EFI_SMBIOS_TYPE_SYSTEM_BOOT_INFORMATION
;
52 SmbiosRecord
->Hdr
.Length
= sizeof (SMBIOS_TABLE_TYPE32
);
54 // Make handle chosen by smbios protocol.add automatically.
56 SmbiosRecord
->Hdr
.Handle
= 0;
57 SmbiosRecord
->BootStatus
= (UINT8
)ForType32InputData
->BootInformationStatus
;
60 // Now we have got the full smbios record, call smbios protocol to add this record.
62 SmbiosHandle
= SMBIOS_HANDLE_PI_RESERVED
;
63 Status
= Smbios
-> Add(
67 (EFI_SMBIOS_TABLE_HEADER
*) SmbiosRecord
69 FreePool(SmbiosRecord
);