3 Copyright (c) 2006, Intel Corporation
4 All rights reserved. This program and the accompanying materials
5 are licensed and made available under the terms and conditions of the BSD License
6 which accompanies this distribution. The full text of the license may be found at
7 http://opensource.org/licenses/bsd-license.php
9 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
10 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
18 EFI PEI Core Boot Mode services
27 // Include common header file for this module.
29 #include "CommonHeader.h"
36 IN EFI_PEI_SERVICES
**PeiServices
,
37 OUT EFI_BOOT_MODE
*BootMode
43 This service enables PEIMs to ascertain the present value of the boot mode.
47 PeiServices - The PEI core services table.
48 BootMode - A pointer to contain the value of the boot mode.
52 EFI_SUCCESS - The boot mode was returned successfully.
53 EFI_INVALID_PARAMETER - BootMode is NULL.
57 PEI_CORE_INSTANCE
*PrivateData
;
58 EFI_HOB_HANDOFF_INFO_TABLE
*HandOffHob
;
61 if (BootMode
== NULL
) {
62 return EFI_INVALID_PARAMETER
;
65 PrivateData
= PEI_CORE_INSTANCE_FROM_PS_THIS(PeiServices
);
67 HandOffHob
= (PrivateData
->HobList
.HandoffInformationTable
);
69 *BootMode
= HandOffHob
->BootMode
;
79 IN EFI_PEI_SERVICES
**PeiServices
,
80 IN EFI_BOOT_MODE BootMode
86 This service enables PEIMs to update the boot mode variable.
90 PeiServices - The PEI core services table.
91 BootMode - The value of the boot mode to set.
95 EFI_SUCCESS - The value was successfully updated
99 PEI_CORE_INSTANCE
*PrivateData
;
100 EFI_HOB_HANDOFF_INFO_TABLE
*HandOffHob
;
103 PrivateData
= PEI_CORE_INSTANCE_FROM_PS_THIS(PeiServices
);
105 HandOffHob
= (PrivateData
->HobList
.HandoffInformationTable
);
107 HandOffHob
->BootMode
= BootMode
;