TianoCore EDK2 master
Loading...
Searching...
No Matches
BootMode.c
Go to the documentation of this file.
1
13#include "PeiMain.h"
14
26EFIAPI
28 IN CONST EFI_PEI_SERVICES **PeiServices,
29 IN OUT EFI_BOOT_MODE *BootMode
30 )
31{
32 PEI_CORE_INSTANCE *PrivateData;
34
35 if (BootMode == NULL) {
36 return EFI_INVALID_PARAMETER;
37 }
38
39 PrivateData = PEI_CORE_INSTANCE_FROM_PS_THIS (PeiServices);
40
41 HandOffHob = (PrivateData->HobList.HandoffInformationTable);
42
43 *BootMode = HandOffHob->BootMode;
44
45 return EFI_SUCCESS;
46}
47
59EFIAPI
61 IN CONST EFI_PEI_SERVICES **PeiServices,
62 IN EFI_BOOT_MODE BootMode
63 )
64{
65 PEI_CORE_INSTANCE *PrivateData;
67
68 PrivateData = PEI_CORE_INSTANCE_FROM_PS_THIS (PeiServices);
69
70 HandOffHob = (PrivateData->HobList.HandoffInformationTable);
71
72 HandOffHob->BootMode = BootMode;
73
74 return EFI_SUCCESS;
75}
EFI_STATUS EFIAPI PeiGetBootMode(IN CONST EFI_PEI_SERVICES **PeiServices, IN OUT EFI_BOOT_MODE *BootMode)
Definition: BootMode.c:27
EFI_STATUS EFIAPI PeiSetBootMode(IN CONST EFI_PEI_SERVICES **PeiServices, IN EFI_BOOT_MODE BootMode)
Definition: BootMode.c:60
#define NULL
Definition: Base.h:319
#define CONST
Definition: Base.h:259
#define IN
Definition: Base.h:279
#define OUT
Definition: Base.h:284
#define PEI_CORE_INSTANCE_FROM_PS_THIS(a)
Definition: PeiMain.h:343
UINT32 EFI_BOOT_MODE
Definition: PiBootMode.h:18
RETURN_STATUS EFI_STATUS
Definition: UefiBaseType.h:29
#define EFI_SUCCESS
Definition: UefiBaseType.h:112
EFI_BOOT_MODE BootMode
Definition: PiHob.h:74