-
Notifications
You must be signed in to change notification settings - Fork 134
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
UefiCpuPkg: Add support for testing the SMM page protections
Adds instrumentation to the PageTbl and SmiPFHandler code to allow reset (instead of halts) on page faults. This enables automated testing of fault detection and handling. Co-authored-by: Michael Kubacki <[email protected]> Signed-off-by: Michael Kubacki <[email protected]>
- Loading branch information
Showing
7 changed files
with
194 additions
and
18 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 |
---|---|---|
@@ -0,0 +1,38 @@ | ||
/** @file -- SmmExceptionTestProtocol.h | ||
A simple protocol to enable SMM exception handling being placed in test mode. | ||
Copyright (c) Microsoft Corporation. | ||
SPDX-License-Identifier: BSD-2-Clause-Patent | ||
**/ | ||
|
||
#ifndef SMM_EXCEPTION_TEST_PROTOCOL_H_ | ||
#define SMM_EXCEPTION_TEST_PROTOCOL_H_ | ||
|
||
// B76383A1-0E70-4A3F-86B4-C6134C8E5723 | ||
#define SMM_EXCEPTION_TEST_PROTOCOL_GUID \ | ||
{ \ | ||
0xb76383a1, 0x0e70, 0x4a3f, { 0x86, 0xb4, 0xc6, 0x13, 0x4c, 0x8e, 0x57, 0x23 } \ | ||
} | ||
|
||
extern EFI_GUID gSmmExceptionTestProtocolGuid; | ||
|
||
/** | ||
Enable exception handling test mode. | ||
NOTE: This should only work on debug builds, otherwise return EFI_UNSUPPORTED. | ||
@retval EFI_SUCCESS Test mode enabled. | ||
@retval EFI_UNSUPPORTED Test mode could not be enabled. | ||
**/ | ||
typedef | ||
EFI_STATUS | ||
(EFIAPI *SMM_ENABLE_EXCEPTION_TEST_MODE)( | ||
VOID | ||
); | ||
|
||
typedef struct _SMM_EXCEPTION_TEST_PROTOCOL { | ||
SMM_ENABLE_EXCEPTION_TEST_MODE EnableTestMode; | ||
} SMM_EXCEPTION_TEST_PROTOCOL; | ||
|
||
#endif // SMM_EXCEPTION_TEST_PROTOCOL_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
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
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
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
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
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