1- /** @file MockSmmSxDispatch2 .h
2- This file declares a mock of SMM Software Dispatch Protocol
1+ /** @file MockSxDispatch .h
2+ This file declares a mock of SMM/MM Sx Dispatch Protocol
33
44 Copyright (c) Microsoft Corporation.
55 SPDX-License-Identifier: BSD-2-Clause-Patent
66**/
77
8- #ifndef MOCK_SMM_SX_DISPATCH2_H_
9- #define MOCK_SMM_SX_DISPATCH2_H_
8+ #ifndef MOCK_SX_DISPATCH_H_
9+ #define MOCK_SX_DISPATCH_H_
1010
1111#include <Library/GoogleTestLib.h>
1212#include <Library/FunctionMockLib.h>
@@ -16,9 +16,9 @@ extern "C" {
1616 #include <Protocol/SmmSxDispatch2.h>
1717}
1818
19- // Declarations to handle usage of the EFI_SMM_SX_DISPATCH2_PROTOCOL
20- struct MockEfiSmmSxDispatch2Protocol {
21- MOCK_INTERFACE_DECLARATION (MockEfiSmmSxDispatch2Protocol );
19+ // Declarations to handle usage of the Sx Dispatch Protocol
20+ struct MockEfiSxDispatch2Protocol {
21+ MOCK_INTERFACE_DECLARATION (MockEfiSxDispatch2Protocol );
2222
2323 MOCK_FUNCTION_DECLARATION (
2424 EFI_STATUS ,
@@ -39,14 +39,19 @@ struct MockEfiSmmSxDispatch2Protocol {
3939 );
4040};
4141
42- MOCK_INTERFACE_DEFINITION (MockEfiSmmSxDispatch2Protocol );
43- MOCK_FUNCTION_DEFINITION (MockEfiSmmSxDispatch2Protocol , Register , 4 , EFIAPI );
44- MOCK_FUNCTION_DEFINITION (MockEfiSmmSxDispatch2Protocol , UnRegister , 2 , EFIAPI );
42+ MOCK_INTERFACE_DEFINITION (MockEfiSxDispatch2Protocol );
43+ MOCK_FUNCTION_DEFINITION (MockEfiSxDispatch2Protocol , Register , 4 , EFIAPI );
44+ MOCK_FUNCTION_DEFINITION (MockEfiSxDispatch2Protocol , UnRegister , 2 , EFIAPI );
4545
4646#define MOCK_EFI_SMM_SX_DISPATCH2_PROTOCOL_INSTANCE (NAME ) \
4747 EFI_SMM_SX_DISPATCH2_PROTOCOL NAME##_INSTANCE = { \
4848 Register, \
4949 UnRegister }; \
5050 EFI_SMM_SX_DISPATCH2_PROTOCOL *NAME = &NAME##_INSTANCE;
5151
52- #endif // MOCK_SMM_SW_DISPATCH2_H_
52+ #define MOCK_EFI_MM_SX_DISPATCH_PROTOCOL_INSTANCE (NAME ) \
53+ EFI_MM_SX_DISPATCH_PROTOCOL NAME##_INSTANCE = { \
54+ Register, \
55+ UnRegister }; \
56+ EFI_MM_SX_DISPATCH_PROTOCOL *NAME = &NAME##_INSTANCE;
57+ #endif // MOCK_SX_DISPATCH_H_
0 commit comments