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
31 IN EFI_PEI_SERVICES
**PeiServices
,
32 OUT EFI_BOOT_MODE
*BootMode
38 This service enables PEIMs to ascertain the present value of the boot mode.
42 PeiServices - The PEI core services table.
43 BootMode - A pointer to contain the value of the boot mode.
47 EFI_SUCCESS - The boot mode was returned successfully.
48 EFI_INVALID_PARAMETER - BootMode is NULL.
52 PEI_CORE_INSTANCE
*PrivateData
;
53 EFI_HOB_HANDOFF_INFO_TABLE
*HandOffHob
;
56 if (BootMode
== NULL
) {
57 return EFI_INVALID_PARAMETER
;
60 PrivateData
= PEI_CORE_INSTANCE_FROM_PS_THIS(PeiServices
);
62 HandOffHob
= (PrivateData
->HobList
.HandoffInformationTable
);
64 *BootMode
= HandOffHob
->BootMode
;
74 IN EFI_PEI_SERVICES
**PeiServices
,
75 IN EFI_BOOT_MODE BootMode
81 This service enables PEIMs to update the boot mode variable.
85 PeiServices - The PEI core services table.
86 BootMode - The value of the boot mode to set.
90 EFI_SUCCESS - The value was successfully updated
94 PEI_CORE_INSTANCE
*PrivateData
;
95 EFI_HOB_HANDOFF_INFO_TABLE
*HandOffHob
;
98 PrivateData
= PEI_CORE_INSTANCE_FROM_PS_THIS(PeiServices
);
100 HandOffHob
= (PrivateData
->HobList
.HandoffInformationTable
);
102 HandOffHob
->BootMode
= BootMode
;