-
Notifications
You must be signed in to change notification settings - Fork 52
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
REBASE: Correct line endings for UncrustifyCheck
Note: this should be easy to squash if the ApplyUncrustify script is run from a correctly-configured machine during the next integration. If in doubt, use Linux
- Loading branch information
1 parent
4ce0ca1
commit c8c383f
Showing
21 changed files
with
2,629 additions
and
2,629 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,19 +1,19 @@ | ||
/** @file | ||
Defines the HOB GUID used to pass all excluded FVs to DXE Driver. | ||
Copyright (c) Microsoft Corporation. All rights reserved. | ||
SPDX-License-Identifier: BSD-2-Clause-Patent | ||
**/ | ||
|
||
#ifndef _EXCLUDED_FV_HOB_H_ | ||
#define _EXCLUDED_FV_HOB_H_ | ||
|
||
extern EFI_GUID gExcludedFvHobGuid; | ||
|
||
typedef struct { | ||
UINT32 Num; | ||
EFI_PEI_FIRMWARE_VOLUME_INFO_MEASUREMENT_EXCLUDED_FV ExcludedFvs[0]; | ||
} EXCLUDED_HOB_DATA; | ||
|
||
#endif | ||
/** @file | ||
Defines the HOB GUID used to pass all excluded FVs to DXE Driver. | ||
Copyright (c) Microsoft Corporation. All rights reserved. | ||
SPDX-License-Identifier: BSD-2-Clause-Patent | ||
**/ | ||
|
||
#ifndef _EXCLUDED_FV_HOB_H_ | ||
#define _EXCLUDED_FV_HOB_H_ | ||
|
||
extern EFI_GUID gExcludedFvHobGuid; | ||
|
||
typedef struct { | ||
UINT32 Num; | ||
EFI_PEI_FIRMWARE_VOLUME_INFO_MEASUREMENT_EXCLUDED_FV ExcludedFvs[0]; | ||
} EXCLUDED_HOB_DATA; | ||
|
||
#endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,127 +1,127 @@ | ||
/** @file -- OemTpm2InitLib.h | ||
Oem library hooks for additional TPM 2.0 initialization. | ||
MS_CHANGE_? | ||
Copyright (c) Microsoft Corporation. All rights reserved. | ||
SPDX-License-Identifier: BSD-2-Clause-Patent | ||
**/ | ||
|
||
#ifndef _OEM_TPM_2_INIT_LIB_H_ | ||
#define _OEM_TPM_2_INIT_LIB_H_ | ||
|
||
// In order to include this header, you will also need to include. | ||
// - Pi/PiBootMode.h | ||
// - Protocol/Tcg2Protocol.h | ||
|
||
/** | ||
OEM init hook that is called before Tcg2 PEI attempts | ||
to run TPM2_Startup(). | ||
NOTE: If this function returns an EFI_ERROR, TPM initialization WILL NOT continue. | ||
Make sure this is something you actually want to do. | ||
@param[in] BootMode EFI_BOOT_MODE to indicate the determined boot mode. | ||
@retval EFI_SUCCESS Everything is fine. Continue with init. | ||
@retval Others Something has gone wrong. Do not initialize TPM any further. | ||
**/ | ||
EFI_STATUS | ||
EFIAPI | ||
OemTpm2InitPeiPreStartup ( | ||
IN EFI_BOOT_MODE BootMode | ||
); | ||
|
||
/** | ||
OEM init hook that is called immediately after TPM2_SelfTest() completes. | ||
TODO: Consider passing in the SelfTest results to this function. | ||
NOTE: If this function returns an EFI_ERROR, TPM initialization WILL NOT continue. | ||
Make sure this is something you actually want to do. | ||
@param[in] BootMode EFI_BOOT_MODE to indicate the determined boot mode. | ||
@retval EFI_SUCCESS Everything is fine. Continue with init. | ||
@retval Others Something has gone wrong. Do not initialize TPM any further. | ||
**/ | ||
EFI_STATUS | ||
EFIAPI | ||
OemTpm2InitPeiPostSelfTest ( | ||
IN EFI_BOOT_MODE BootMode | ||
); | ||
|
||
/** | ||
OEM init hook that is called immediately before initial measurements of things like | ||
FV_MAIN and CRTM. | ||
NOTE: If this function returns an EFI_ERROR, TPM initialization WILL NOT continue. | ||
Make sure this is something you actually want to do. | ||
@retval EFI_SUCCESS Everything is fine. Continue with init. | ||
@retval Others Something has gone wrong. Do not initialize TPM any further. | ||
**/ | ||
EFI_STATUS | ||
EFIAPI | ||
OemTpm2InitPeiPreMeasurements ( | ||
VOID | ||
); | ||
|
||
/** | ||
OEM init hook that is called after all capabilities have been queried, but | ||
before any of the DXE event callbacks have been registered. | ||
NOTE: If this function returns an EFI_ERROR, TPM initialization WILL NOT continue. | ||
Make sure this is something you actually want to do. | ||
@param[in,out] BsCap Structure describing the capabilities of the existing TPM. | ||
@retval EFI_SUCCESS Everything is fine. Continue with init. | ||
@retval Others Something has gone wrong. Do not initialize TPM any further. | ||
**/ | ||
EFI_STATUS | ||
EFIAPI | ||
OemTpm2InitDxeEntryPreRegistration ( | ||
IN OUT EFI_TCG2_BOOT_SERVICE_CAPABILITY *BsCap | ||
); | ||
|
||
/** | ||
OEM init hook that is called during the Tcg2Dxe ReadyToBoot event. It is called before internal | ||
Tcg2Dxe initialization, most of which is ReadyToBoot measurements. | ||
NOTE: If this function returns an EFI_ERROR, TPM initialization WILL NOT continue. | ||
Make sure this is something you actually want to do. | ||
@param[in] BootAttemptCount Number of ReadyToBoot events that have occured. | ||
0 indicates that this is the first ReadyToBoot event and | ||
is where most of any custom initialization should occur. | ||
@retval EFI_SUCCESS Everything is fine. Continue with init. | ||
@retval Others Something has gone wrong. Do not initialize TPM any further. | ||
**/ | ||
EFI_STATUS | ||
EFIAPI | ||
OemTpm2InitDxeReadyToBootEvent ( | ||
IN UINTN BootAttemptCount | ||
); | ||
|
||
/** | ||
This function will perform additional TPM initialization | ||
that may be require for a specific vendor part. It will be invoked | ||
during the DXE phase. | ||
@retval EFI_SUCCESS TPM was successfully initialized. | ||
@retval Others Something went wrong. | ||
**/ | ||
EFI_STATUS | ||
OemTpm2VendorSpecificInit ( | ||
VOID | ||
); | ||
|
||
#endif // _OEM_TPM_2_INIT_LIB_H_ | ||
/** @file -- OemTpm2InitLib.h | ||
Oem library hooks for additional TPM 2.0 initialization. | ||
MS_CHANGE_? | ||
Copyright (c) Microsoft Corporation. All rights reserved. | ||
SPDX-License-Identifier: BSD-2-Clause-Patent | ||
**/ | ||
|
||
#ifndef _OEM_TPM_2_INIT_LIB_H_ | ||
#define _OEM_TPM_2_INIT_LIB_H_ | ||
|
||
// In order to include this header, you will also need to include. | ||
// - Pi/PiBootMode.h | ||
// - Protocol/Tcg2Protocol.h | ||
|
||
/** | ||
OEM init hook that is called before Tcg2 PEI attempts | ||
to run TPM2_Startup(). | ||
NOTE: If this function returns an EFI_ERROR, TPM initialization WILL NOT continue. | ||
Make sure this is something you actually want to do. | ||
@param[in] BootMode EFI_BOOT_MODE to indicate the determined boot mode. | ||
@retval EFI_SUCCESS Everything is fine. Continue with init. | ||
@retval Others Something has gone wrong. Do not initialize TPM any further. | ||
**/ | ||
EFI_STATUS | ||
EFIAPI | ||
OemTpm2InitPeiPreStartup ( | ||
IN EFI_BOOT_MODE BootMode | ||
); | ||
|
||
/** | ||
OEM init hook that is called immediately after TPM2_SelfTest() completes. | ||
TODO: Consider passing in the SelfTest results to this function. | ||
NOTE: If this function returns an EFI_ERROR, TPM initialization WILL NOT continue. | ||
Make sure this is something you actually want to do. | ||
@param[in] BootMode EFI_BOOT_MODE to indicate the determined boot mode. | ||
@retval EFI_SUCCESS Everything is fine. Continue with init. | ||
@retval Others Something has gone wrong. Do not initialize TPM any further. | ||
**/ | ||
EFI_STATUS | ||
EFIAPI | ||
OemTpm2InitPeiPostSelfTest ( | ||
IN EFI_BOOT_MODE BootMode | ||
); | ||
|
||
/** | ||
OEM init hook that is called immediately before initial measurements of things like | ||
FV_MAIN and CRTM. | ||
NOTE: If this function returns an EFI_ERROR, TPM initialization WILL NOT continue. | ||
Make sure this is something you actually want to do. | ||
@retval EFI_SUCCESS Everything is fine. Continue with init. | ||
@retval Others Something has gone wrong. Do not initialize TPM any further. | ||
**/ | ||
EFI_STATUS | ||
EFIAPI | ||
OemTpm2InitPeiPreMeasurements ( | ||
VOID | ||
); | ||
|
||
/** | ||
OEM init hook that is called after all capabilities have been queried, but | ||
before any of the DXE event callbacks have been registered. | ||
NOTE: If this function returns an EFI_ERROR, TPM initialization WILL NOT continue. | ||
Make sure this is something you actually want to do. | ||
@param[in,out] BsCap Structure describing the capabilities of the existing TPM. | ||
@retval EFI_SUCCESS Everything is fine. Continue with init. | ||
@retval Others Something has gone wrong. Do not initialize TPM any further. | ||
**/ | ||
EFI_STATUS | ||
EFIAPI | ||
OemTpm2InitDxeEntryPreRegistration ( | ||
IN OUT EFI_TCG2_BOOT_SERVICE_CAPABILITY *BsCap | ||
); | ||
|
||
/** | ||
OEM init hook that is called during the Tcg2Dxe ReadyToBoot event. It is called before internal | ||
Tcg2Dxe initialization, most of which is ReadyToBoot measurements. | ||
NOTE: If this function returns an EFI_ERROR, TPM initialization WILL NOT continue. | ||
Make sure this is something you actually want to do. | ||
@param[in] BootAttemptCount Number of ReadyToBoot events that have occured. | ||
0 indicates that this is the first ReadyToBoot event and | ||
is where most of any custom initialization should occur. | ||
@retval EFI_SUCCESS Everything is fine. Continue with init. | ||
@retval Others Something has gone wrong. Do not initialize TPM any further. | ||
**/ | ||
EFI_STATUS | ||
EFIAPI | ||
OemTpm2InitDxeReadyToBootEvent ( | ||
IN UINTN BootAttemptCount | ||
); | ||
|
||
/** | ||
This function will perform additional TPM initialization | ||
that may be require for a specific vendor part. It will be invoked | ||
during the DXE phase. | ||
@retval EFI_SUCCESS TPM was successfully initialized. | ||
@retval Others Something went wrong. | ||
**/ | ||
EFI_STATUS | ||
OemTpm2VendorSpecificInit ( | ||
VOID | ||
); | ||
|
||
#endif // _OEM_TPM_2_INIT_LIB_H_ |
96 changes: 48 additions & 48 deletions
96
SecurityPkg/Include/Library/Tcg2PhysicalPresencePromptLib.h
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,48 +1,48 @@ | ||
/** @file -- Tcg2PhysicalPresencePromptLib.h | ||
This library abstracts the action of prompting the user so that it may be overridden in a platform-specific way. | ||
Rather than just printing to the screen. | ||
Copyright (c) Microsoft Corporation. All rights reserved. | ||
SPDX-License-Identifier: BSD-2-Clause-Patent | ||
**/ | ||
|
||
// MS_CHANGE: Entire file created. | ||
|
||
#ifndef _TCG2_PHYSICAL_PRESENCE_PROMPT_LIB_H_ | ||
#define _TCG2_PHYSICAL_PRESENCE_PROMPT_LIB_H_ | ||
|
||
/** | ||
Simple function to inform any callers of whether the lib is ready to present a prompt. | ||
Since the prompt itself only returns TRUE or FALSE, make sure all other technical requirements | ||
are out of the way. | ||
@retval EFI_SUCCESS Prompt is ready. | ||
@retval EFI_NOT_READY Prompt does not have sufficient resources at this time. | ||
@retval EFI_DEVICE_ERROR Library failed to prepare resources. | ||
**/ | ||
EFI_STATUS | ||
EFIAPI | ||
IsPromptReady ( | ||
VOID | ||
); | ||
|
||
/** | ||
This function will take in a prompt string to present to the user in a | ||
OK/Cancel dialog box and return TRUE if the user actively pressed OK. Returns | ||
FALSE on Cancel or any errors. | ||
@param[in] PromptString The string that should occupy the body of the prompt. | ||
@retval TRUE User confirmed action. | ||
@retval FALSE User rejected action or a failure occurred. | ||
**/ | ||
BOOLEAN | ||
EFIAPI | ||
PromptForUserConfirmation ( | ||
IN CHAR16 *PromptString | ||
); | ||
|
||
#endif // _TCG2_PHYSICAL_PRESENCE_PROMPT_LIB_H_ | ||
/** @file -- Tcg2PhysicalPresencePromptLib.h | ||
This library abstracts the action of prompting the user so that it may be overridden in a platform-specific way. | ||
Rather than just printing to the screen. | ||
Copyright (c) Microsoft Corporation. All rights reserved. | ||
SPDX-License-Identifier: BSD-2-Clause-Patent | ||
**/ | ||
|
||
// MS_CHANGE: Entire file created. | ||
|
||
#ifndef _TCG2_PHYSICAL_PRESENCE_PROMPT_LIB_H_ | ||
#define _TCG2_PHYSICAL_PRESENCE_PROMPT_LIB_H_ | ||
|
||
/** | ||
Simple function to inform any callers of whether the lib is ready to present a prompt. | ||
Since the prompt itself only returns TRUE or FALSE, make sure all other technical requirements | ||
are out of the way. | ||
@retval EFI_SUCCESS Prompt is ready. | ||
@retval EFI_NOT_READY Prompt does not have sufficient resources at this time. | ||
@retval EFI_DEVICE_ERROR Library failed to prepare resources. | ||
**/ | ||
EFI_STATUS | ||
EFIAPI | ||
IsPromptReady ( | ||
VOID | ||
); | ||
|
||
/** | ||
This function will take in a prompt string to present to the user in a | ||
OK/Cancel dialog box and return TRUE if the user actively pressed OK. Returns | ||
FALSE on Cancel or any errors. | ||
@param[in] PromptString The string that should occupy the body of the prompt. | ||
@retval TRUE User confirmed action. | ||
@retval FALSE User rejected action or a failure occurred. | ||
**/ | ||
BOOLEAN | ||
EFIAPI | ||
PromptForUserConfirmation ( | ||
IN CHAR16 *PromptString | ||
); | ||
|
||
#endif // _TCG2_PHYSICAL_PRESENCE_PROMPT_LIB_H_ |
Oops, something went wrong.