3 Copyright (c) 2009 - 2014, Intel Corporation. All rights reserved.<BR>
5 SPDX-License-Identifier: BSD-2-Clause-Patent
12 MiscBootInformationFunction.c
16 boot information boot time changes.
22 #include "CommonHeader.h"
24 #include "MiscSubclassDriver.h"
28 This function makes boot time changes to the contents of the
29 MiscBootInformation (Type 32).
31 @param RecordData Pointer to copy of RecordData from the Data Table.
33 @retval EFI_SUCCESS All parameters were valid.
34 @retval EFI_UNSUPPORTED Unexpected RecordType value.
35 @retval EFI_INVALID_PARAMETER Invalid parameter was found.
39 MISC_SMBIOS_TABLE_FUNCTION(BootInformationStatus
)
42 EFI_SMBIOS_HANDLE SmbiosHandle
;
43 SMBIOS_TABLE_TYPE32
*SmbiosRecord
;
44 EFI_MISC_BOOT_INFORMATION_STATUS
* ForType32InputData
;
46 ForType32InputData
= (EFI_MISC_BOOT_INFORMATION_STATUS
*)RecordData
;
49 // First check for invalid parameters.
51 if (RecordData
== NULL
) {
52 return EFI_INVALID_PARAMETER
;
56 // Two zeros following the last string.
58 SmbiosRecord
= AllocatePool(sizeof (SMBIOS_TABLE_TYPE32
) + 1 + 1);
59 ZeroMem(SmbiosRecord
, sizeof (SMBIOS_TABLE_TYPE32
) + 1 + 1);
61 SmbiosRecord
->Hdr
.Type
= EFI_SMBIOS_TYPE_SYSTEM_BOOT_INFORMATION
;
62 SmbiosRecord
->Hdr
.Length
= sizeof (SMBIOS_TABLE_TYPE32
);
65 // Make handle chosen by smbios protocol.add automatically.
67 SmbiosRecord
->Hdr
.Handle
= 0;
68 SmbiosRecord
->BootStatus
= (UINT8
)ForType32InputData
->BootInformationStatus
;
71 // Now we have got the full smbios record, call smbios protocol to add this record.
73 SmbiosHandle
= SMBIOS_HANDLE_PI_RESERVED
;
74 Status
= Smbios
-> Add(
78 (EFI_SMBIOS_TABLE_HEADER
*) SmbiosRecord
80 FreePool(SmbiosRecord
);