3 Copyright (c) 2009, Intel Corporation. All rights reserved. <BR>
4 This software and associated documentation (if any) is furnished
5 under a license and may only be used or copied in accordance
6 with the terms of the license. Except as permitted by such
7 license, no part of this software or documentation may be
8 reproduced, stored in a retrieval system, or transmitted in any
9 form or by any means without the express written consent of
15 MiscBootInformationFunction.c
19 boot information boot time changes.
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
);
64 // Make handle chosen by smbios protocol.add automatically.
66 SmbiosRecord
->Hdr
.Handle
= 0;
67 SmbiosRecord
->BootStatus
= (UINT8
)ForType32InputData
->BootInformationStatus
;
70 // Now we have got the full smbios record, call smbios protocol to add this record.
73 Status
= Smbios
-> Add(
77 (EFI_SMBIOS_TABLE_HEADER
*) SmbiosRecord
79 FreePool(SmbiosRecord
);