From a3e134836dfb28111b2a446d3b83b86b8e7e7a5c Mon Sep 17 00:00:00 2001 From: TsunFeng Date: Mon, 4 Nov 2024 14:19:18 +0800 Subject: [PATCH] Add all the mock functions in MockIoLib --- .../Include/GoogleTest/Library/MockIoLib.h | 867 +++++++++++++++++- .../GoogleTest/MockIoLib/MockIoLib.cpp | 86 +- 2 files changed, 926 insertions(+), 27 deletions(-) diff --git a/MdePkg/Test/Mock/Include/GoogleTest/Library/MockIoLib.h b/MdePkg/Test/Mock/Include/GoogleTest/Library/MockIoLib.h index 561955c20f..8e9792a4f2 100644 --- a/MdePkg/Test/Mock/Include/GoogleTest/Library/MockIoLib.h +++ b/MdePkg/Test/Mock/Include/GoogleTest/Library/MockIoLib.h @@ -18,64 +18,563 @@ extern "C" { struct MockIoLib { MOCK_INTERFACE_DECLARATION (MockIoLib); + MOCK_FUNCTION_DECLARATION ( + UINT8, + IoRead8, + ( + IN UINTN Port + ) + ); + + MOCK_FUNCTION_DECLARATION ( + UINT8, + IoWrite8, + ( + IN UINTN Port, + IN UINT8 Value + ) + ); + + MOCK_FUNCTION_DECLARATION ( + VOID, + IoReadFifo8, + ( + IN UINTN Port, + IN UINTN Count, + OUT VOID *Buffer + ) + ); + + MOCK_FUNCTION_DECLARATION ( + VOID, + IoWriteFifo8, + ( + IN UINTN Port, + IN UINTN Count, + IN VOID *Buffer + ) + ); + + MOCK_FUNCTION_DECLARATION ( + UINT8, + IoOr8, + ( + IN UINTN Port, + IN UINT8 OrData + ) + ); + + MOCK_FUNCTION_DECLARATION ( + UINT8, + IoAnd8, + ( + IN UINTN Port, + IN UINT8 AndData + ) + ); + + MOCK_FUNCTION_DECLARATION ( + UINT8, + IoAndThenOr8, + ( + IN UINTN Port, + IN UINT8 AndData, + IN UINT8 OrData + ) + ); + + MOCK_FUNCTION_DECLARATION ( + UINT8, + IoBitFieldRead8, + ( + IN UINTN Port, + IN UINTN StartBit, + IN UINTN EndBit + ) + ); + + MOCK_FUNCTION_DECLARATION ( + UINT8, + IoBitFieldWrite8, + ( + IN UINTN Port, + IN UINTN StartBit, + IN UINTN EndBit, + IN UINT8 Value + ) + ); + + MOCK_FUNCTION_DECLARATION ( + UINT8, + IoBitFieldOr8, + ( + IN UINTN Port, + IN UINTN StartBit, + IN UINTN EndBit, + IN UINT8 OrData + ) + ); + + MOCK_FUNCTION_DECLARATION ( + UINT8, + IoBitFieldAnd8, + ( + IN UINTN Port, + IN UINTN StartBit, + IN UINTN EndBit, + IN UINT8 AndData + ) + ); + + MOCK_FUNCTION_DECLARATION ( + UINT8, + IoBitFieldAndThenOr8, + ( + IN UINTN Port, + IN UINTN StartBit, + IN UINTN EndBit, + IN UINT8 AndData, + IN UINT8 OrData + ) + ); + + MOCK_FUNCTION_DECLARATION ( + UINT16, + IoRead16, + ( + IN UINTN Port + ) + ); + + MOCK_FUNCTION_DECLARATION ( + UINT16, + IoWrite16, + ( + IN UINTN Port, + IN UINT16 Value + ) + ); + + MOCK_FUNCTION_DECLARATION ( + VOID, + IoReadFifo16, + ( + IN UINTN Port, + IN UINTN Count, + OUT VOID *Buffer + ) + ); + + MOCK_FUNCTION_DECLARATION ( + VOID, + IoWriteFifo16, + ( + IN UINTN Port, + IN UINTN Count, + IN VOID *Buffer + ) + ); + + MOCK_FUNCTION_DECLARATION ( + UINT16, + IoOr16, + ( + IN UINTN Port, + IN UINT16 OrData + ) + ); + + MOCK_FUNCTION_DECLARATION ( + UINT16, + IoAnd16, + ( + IN UINTN Port, + IN UINT16 AndData + ) + ); + + MOCK_FUNCTION_DECLARATION ( + UINT16, + IoAndThenOr16, + ( + IN UINTN Port, + IN UINT16 AndData, + IN UINT16 OrData + ) + ); + + MOCK_FUNCTION_DECLARATION ( + UINT16, + IoBitFieldRead16, + ( + IN UINTN Port, + IN UINTN StartBit, + IN UINTN EndBit + ) + ); + + MOCK_FUNCTION_DECLARATION ( + UINT16, + IoBitFieldWrite16, + ( + IN UINTN Port, + IN UINTN StartBit, + IN UINTN EndBit, + IN UINT16 Value + ) + ); + + MOCK_FUNCTION_DECLARATION ( + UINT16, + IoBitFieldOr16, + ( + IN UINTN Port, + IN UINTN StartBit, + IN UINTN EndBit, + IN UINT16 OrData + ) + ); + + MOCK_FUNCTION_DECLARATION ( + UINT16, + IoBitFieldAnd16, + ( + IN UINTN Port, + IN UINTN StartBit, + IN UINTN EndBit, + IN UINT16 AndData + ) + ); + + MOCK_FUNCTION_DECLARATION ( + UINT16, + IoBitFieldAndThenOr16, + ( + IN UINTN Port, + IN UINTN StartBit, + IN UINTN EndBit, + IN UINT16 AndData, + IN UINT16 OrData + ) + ); + MOCK_FUNCTION_DECLARATION ( UINT32, - MmioAndThenOr32, + IoRead32, + ( + IN UINTN Port + ) + ); + + MOCK_FUNCTION_DECLARATION ( + UINT32, + IoWrite32, + ( + IN UINTN Port, + IN UINT32 Value + ) + ); + + MOCK_FUNCTION_DECLARATION ( + VOID, + IoReadFifo32, + ( + IN UINTN Port, + IN UINTN Count, + OUT VOID *Buffer + ) + ); + + MOCK_FUNCTION_DECLARATION ( + VOID, + IoWriteFifo32, + ( + IN UINTN Port, + IN UINTN Count, + IN VOID *Buffer + ) + ); + + MOCK_FUNCTION_DECLARATION ( + UINT32, + IoOr32, + ( + IN UINTN Port, + IN UINT32 OrData + ) + ); + + MOCK_FUNCTION_DECLARATION ( + UINT32, + IoAnd32, + ( + IN UINTN Port, + IN UINT32 AndData + ) + ); + + MOCK_FUNCTION_DECLARATION ( + UINT32, + IoAndThenOr32, + ( + IN UINTN Port, + IN UINT32 AndData, + IN UINT32 OrData + ) + ); + + MOCK_FUNCTION_DECLARATION ( + UINT32, + IoBitFieldRead32, + ( + IN UINTN Port, + IN UINTN StartBit, + IN UINTN EndBit + ) + ); + + MOCK_FUNCTION_DECLARATION ( + UINT32, + IoBitFieldWrite32, + ( + IN UINTN Port, + IN UINTN StartBit, + IN UINTN EndBit, + IN UINT32 Value + ) + ); + + MOCK_FUNCTION_DECLARATION ( + UINT32, + IoBitFieldOr32, + ( + IN UINTN Port, + IN UINTN StartBit, + IN UINTN EndBit, + IN UINT32 OrData + ) + ); + + MOCK_FUNCTION_DECLARATION ( + UINT32, + IoBitFieldAnd32, + ( + IN UINTN Port, + IN UINTN StartBit, + IN UINTN EndBit, + IN UINT32 AndData + ) + ); + + MOCK_FUNCTION_DECLARATION ( + UINT32, + IoBitFieldAndThenOr32, + ( + IN UINTN Port, + IN UINTN StartBit, + IN UINTN EndBit, + IN UINT32 AndData, + IN UINT32 OrData + ) + ); + + MOCK_FUNCTION_DECLARATION ( + UINT64, + IoRead64, + ( + IN UINTN Port + ) + ); + + MOCK_FUNCTION_DECLARATION ( + UINT64, + IoWrite64, + ( + IN UINTN Port, + IN UINT64 Value + ) + ); + + MOCK_FUNCTION_DECLARATION ( + UINT64, + IoOr64, + ( + IN UINTN Port, + IN UINT64 OrData + ) + ); + + MOCK_FUNCTION_DECLARATION ( + UINT64, + IoAnd64, + ( + IN UINTN Port, + IN UINT64 AndData + ) + ); + + MOCK_FUNCTION_DECLARATION ( + UINT64, + IoAndThenOr64, + ( + IN UINTN Port, + IN UINT64 AndData, + IN UINT64 OrData + ) + ); + + MOCK_FUNCTION_DECLARATION ( + UINT64, + IoBitFieldRead64, + ( + IN UINTN Port, + IN UINTN StartBit, + IN UINTN EndBit + ) + ); + + MOCK_FUNCTION_DECLARATION ( + UINT64, + IoBitFieldWrite64, + ( + IN UINTN Port, + IN UINTN StartBit, + IN UINTN EndBit, + IN UINT64 Value + ) + ); + + MOCK_FUNCTION_DECLARATION ( + UINT64, + IoBitFieldOr64, + ( + IN UINTN Port, + IN UINTN StartBit, + IN UINTN EndBit, + IN UINT64 OrData + ) + ); + + MOCK_FUNCTION_DECLARATION ( + UINT64, + IoBitFieldAnd64, + ( + IN UINTN Port, + IN UINTN StartBit, + IN UINTN EndBit, + IN UINT64 AndData + ) + ); + + MOCK_FUNCTION_DECLARATION ( + UINT64, + IoBitFieldAndThenOr64, + ( + IN UINTN Port, + IN UINTN StartBit, + IN UINTN EndBit, + IN UINT64 AndData, + IN UINT64 OrData + ) + ); + + MOCK_FUNCTION_DECLARATION ( + UINT8, + MmioRead8, + ( + IN UINTN Address + ) + ); + + MOCK_FUNCTION_DECLARATION ( + UINT8, + MmioWrite8, + ( + IN UINTN Address, + IN UINT8 Value + ) + ); + + MOCK_FUNCTION_DECLARATION ( + UINT8, + MmioOr8, ( - IN UINTN Address, - IN UINT32 AndData, - IN UINT32 OrData + IN UINTN Address, + IN UINT8 OrData ) ); MOCK_FUNCTION_DECLARATION ( UINT8, - IoWrite8, + MmioAnd8, ( - IN UINTN Port, - IN UINT8 Value + IN UINTN Address, + IN UINT8 AndData ) ); MOCK_FUNCTION_DECLARATION ( UINT8, - IoRead8, + MmioAndThenOr8, ( - IN UINTN Port + IN UINTN Address, + IN UINT8 AndData, + IN UINT8 OrData ) ); MOCK_FUNCTION_DECLARATION ( - UINT64, - IoRead64, + UINT8, + MmioBitFieldRead8, ( - IN UINTN Port + IN UINTN Address, + IN UINTN StartBit, + IN UINTN EndBit ) ); MOCK_FUNCTION_DECLARATION ( - UINT64, - IoWrite64, + UINT8, + MmioBitFieldWrite8, ( - IN UINTN Port, - IN UINT64 Value + IN UINTN Address, + IN UINTN StartBit, + IN UINTN EndBit, + IN UINT8 Value ) ); MOCK_FUNCTION_DECLARATION ( UINT8, - MmioRead8, + MmioBitFieldOr8, ( - IN UINTN Address + IN UINTN Address, + IN UINTN StartBit, + IN UINTN EndBit, + IN UINT8 OrData ) ); MOCK_FUNCTION_DECLARATION ( UINT8, - MmioWrite8, + MmioBitFieldAnd8, ( IN UINTN Address, - IN UINT8 Value + IN UINTN StartBit, + IN UINTN EndBit, + IN UINT8 AndData + ) + ); + + MOCK_FUNCTION_DECLARATION ( + UINT8, + MmioBitFieldAndThenOr8, + ( + IN UINTN Address, + IN UINTN StartBit, + IN UINTN EndBit, + IN UINT8 AndData, + IN UINT8 OrData ) ); @@ -96,6 +595,89 @@ struct MockIoLib { ) ); + MOCK_FUNCTION_DECLARATION ( + UINT16, + MmioOr16, + ( + IN UINTN Address, + IN UINT16 OrData + ) + ); + + MOCK_FUNCTION_DECLARATION ( + UINT16, + MmioAnd16, + ( + IN UINTN Address, + IN UINT16 AndData + ) + ); + + MOCK_FUNCTION_DECLARATION ( + UINT16, + MmioAndThenOr16, + ( + IN UINTN Address, + IN UINT16 AndData, + IN UINT16 OrData + ) + ); + + MOCK_FUNCTION_DECLARATION ( + UINT16, + MmioBitFieldRead16, + ( + IN UINTN Address, + IN UINTN StartBit, + IN UINTN EndBit + ) + ); + + MOCK_FUNCTION_DECLARATION ( + UINT16, + MmioBitFieldWrite16, + ( + IN UINTN Address, + IN UINTN StartBit, + IN UINTN EndBit, + IN UINT16 Value + ) + ); + + MOCK_FUNCTION_DECLARATION ( + UINT16, + MmioBitFieldOr16, + ( + IN UINTN Address, + IN UINTN StartBit, + IN UINTN EndBit, + IN UINT16 OrData + ) + ); + + MOCK_FUNCTION_DECLARATION ( + UINT16, + MmioBitFieldAnd16, + ( + IN UINTN Address, + IN UINTN StartBit, + IN UINTN EndBit, + IN UINT16 AndData + ) + ); + + MOCK_FUNCTION_DECLARATION ( + UINT16, + MmioBitFieldAndThenOr16, + ( + IN UINTN Address, + IN UINTN StartBit, + IN UINTN EndBit, + IN UINT16 AndData, + IN UINT16 OrData + ) + ); + MOCK_FUNCTION_DECLARATION ( UINT32, MmioRead32, @@ -113,6 +695,89 @@ struct MockIoLib { ) ); + MOCK_FUNCTION_DECLARATION ( + UINT32, + MmioOr32, + ( + IN UINTN Address, + IN UINT32 OrData + ) + ); + + MOCK_FUNCTION_DECLARATION ( + UINT32, + MmioAnd32, + ( + IN UINTN Address, + IN UINT32 AndData + ) + ); + + MOCK_FUNCTION_DECLARATION ( + UINT32, + MmioAndThenOr32, + ( + IN UINTN Address, + IN UINT32 AndData, + IN UINT32 OrData + ) + ); + + MOCK_FUNCTION_DECLARATION ( + UINT32, + MmioBitFieldRead32, + ( + IN UINTN Address, + IN UINTN StartBit, + IN UINTN EndBit + ) + ); + + MOCK_FUNCTION_DECLARATION ( + UINT32, + MmioBitFieldWrite32, + ( + IN UINTN Address, + IN UINTN StartBit, + IN UINTN EndBit, + IN UINT32 Value + ) + ); + + MOCK_FUNCTION_DECLARATION ( + UINT32, + MmioBitFieldOr32, + ( + IN UINTN Address, + IN UINTN StartBit, + IN UINTN EndBit, + IN UINT32 OrData + ) + ); + + MOCK_FUNCTION_DECLARATION ( + UINT32, + MmioBitFieldAnd32, + ( + IN UINTN Address, + IN UINTN StartBit, + IN UINTN EndBit, + IN UINT32 AndData + ) + ); + + MOCK_FUNCTION_DECLARATION ( + UINT32, + MmioBitFieldAndThenOr32, + ( + IN UINTN Address, + IN UINTN StartBit, + IN UINTN EndBit, + IN UINT32 AndData, + IN UINT32 OrData + ) + ); + MOCK_FUNCTION_DECLARATION ( UINT64, MmioRead64, @@ -131,11 +796,165 @@ struct MockIoLib { ); MOCK_FUNCTION_DECLARATION ( - UINT16, - IoWrite16, + UINT64, + MmioOr64, ( - IN UINTN Port, - IN UINT16 Value + IN UINTN Address, + IN UINT64 OrData + ) + ); + + MOCK_FUNCTION_DECLARATION ( + UINT64, + MmioAnd64, + ( + IN UINTN Address, + IN UINT64 AndData + ) + ); + + MOCK_FUNCTION_DECLARATION ( + UINT64, + MmioAndThenOr64, + ( + IN UINTN Address, + IN UINT64 AndData, + IN UINT64 OrData + ) + ); + + MOCK_FUNCTION_DECLARATION ( + UINT64, + MmioBitFieldRead64, + ( + IN UINTN Address, + IN UINTN StartBit, + IN UINTN EndBit + ) + ); + + MOCK_FUNCTION_DECLARATION ( + UINT64, + MmioBitFieldWrite64, + ( + IN UINTN Address, + IN UINTN StartBit, + IN UINTN EndBit, + IN UINT64 Value + ) + ); + + MOCK_FUNCTION_DECLARATION ( + UINT64, + MmioBitFieldOr64, + ( + IN UINTN Address, + IN UINTN StartBit, + IN UINTN EndBit, + IN UINT64 OrData + ) + ); + + MOCK_FUNCTION_DECLARATION ( + UINT64, + MmioBitFieldAnd64, + ( + IN UINTN Address, + IN UINTN StartBit, + IN UINTN EndBit, + IN UINT64 AndData + ) + ); + + MOCK_FUNCTION_DECLARATION ( + UINT64, + MmioBitFieldAndThenOr64, + ( + IN UINTN Address, + IN UINTN StartBit, + IN UINTN EndBit, + IN UINT64 AndData, + IN UINT64 OrData + ) + ); + + MOCK_FUNCTION_DECLARATION ( + UINT8 *, + MmioReadBuffer8, + ( + IN UINTN StartAddress, + IN UINTN Length, + OUT UINT8 *Buffer + ) + ); + + MOCK_FUNCTION_DECLARATION ( + UINT16 *, + MmioReadBuffer16, + ( + IN UINTN StartAddress, + IN UINTN Length, + OUT UINT16 *Buffer + ) + ); + + MOCK_FUNCTION_DECLARATION ( + UINT32 *, + MmioReadBuffer32, + ( + IN UINTN StartAddress, + IN UINTN Length, + OUT UINT32 *Buffer + ) + ); + + MOCK_FUNCTION_DECLARATION ( + UINT64 *, + MmioReadBuffer64, + ( + IN UINTN StartAddress, + IN UINTN Length, + OUT UINT64 *Buffer + ) + ); + + MOCK_FUNCTION_DECLARATION ( + UINT8 *, + MmioWriteBuffer8, + ( + IN UINTN StartAddress, + IN UINTN Length, + IN CONST UINT8 *Buffer + ) + ); + + MOCK_FUNCTION_DECLARATION ( + UINT16 *, + MmioWriteBuffer16, + ( + IN UINTN StartAddress, + IN UINTN Length, + IN CONST UINT16 *Buffer + ) + ); + + MOCK_FUNCTION_DECLARATION ( + UINT32 *, + MmioWriteBuffer32, + ( + IN UINTN StartAddress, + IN UINTN Length, + IN CONST UINT32 *Buffer + ) + ); + + MOCK_FUNCTION_DECLARATION ( + UINT64 *, + MmioWriteBuffer64, + ( + IN UINTN StartAddress, + IN UINTN Length, + IN CONST UINT64 *Buffer ) ); }; diff --git a/MdePkg/Test/Mock/Library/GoogleTest/MockIoLib/MockIoLib.cpp b/MdePkg/Test/Mock/Library/GoogleTest/MockIoLib/MockIoLib.cpp index 7bd5322c27..7f25a562bb 100644 --- a/MdePkg/Test/Mock/Library/GoogleTest/MockIoLib/MockIoLib.cpp +++ b/MdePkg/Test/Mock/Library/GoogleTest/MockIoLib/MockIoLib.cpp @@ -9,17 +9,97 @@ MOCK_INTERFACE_DEFINITION (MockIoLib); -MOCK_FUNCTION_DEFINITION (MockIoLib, MmioAndThenOr32, 3, EFIAPI); -MOCK_FUNCTION_DEFINITION (MockIoLib, IoWrite8, 2, EFIAPI); MOCK_FUNCTION_DEFINITION (MockIoLib, IoRead8, 1, EFIAPI); +MOCK_FUNCTION_DEFINITION (MockIoLib, IoWrite8, 2, EFIAPI); +MOCK_FUNCTION_DEFINITION (MockIoLib, IoReadFifo8, 3, EFIAPI); +MOCK_FUNCTION_DEFINITION (MockIoLib, IoWriteFifo8, 3, EFIAPI); +MOCK_FUNCTION_DEFINITION (MockIoLib, IoOr8, 2, EFIAPI); +MOCK_FUNCTION_DEFINITION (MockIoLib, IoAnd8, 2, EFIAPI); +MOCK_FUNCTION_DEFINITION (MockIoLib, IoAndThenOr8, 3, EFIAPI); +MOCK_FUNCTION_DEFINITION (MockIoLib, IoBitFieldRead8, 3, EFIAPI); +MOCK_FUNCTION_DEFINITION (MockIoLib, IoBitFieldWrite8, 4, EFIAPI); +MOCK_FUNCTION_DEFINITION (MockIoLib, IoBitFieldOr8, 4, EFIAPI); +MOCK_FUNCTION_DEFINITION (MockIoLib, IoBitFieldAnd8, 4, EFIAPI); +MOCK_FUNCTION_DEFINITION (MockIoLib, IoBitFieldAndThenOr8, 5, EFIAPI); +MOCK_FUNCTION_DEFINITION (MockIoLib, IoRead16, 1, EFIAPI); +MOCK_FUNCTION_DEFINITION (MockIoLib, IoWrite16, 2, EFIAPI); +MOCK_FUNCTION_DEFINITION (MockIoLib, IoReadFifo16, 3, EFIAPI); +MOCK_FUNCTION_DEFINITION (MockIoLib, IoWriteFifo16, 3, EFIAPI); +MOCK_FUNCTION_DEFINITION (MockIoLib, IoOr16, 2, EFIAPI); +MOCK_FUNCTION_DEFINITION (MockIoLib, IoAnd16, 2, EFIAPI); +MOCK_FUNCTION_DEFINITION (MockIoLib, IoAndThenOr16, 3, EFIAPI); +MOCK_FUNCTION_DEFINITION (MockIoLib, IoBitFieldRead16, 3, EFIAPI); +MOCK_FUNCTION_DEFINITION (MockIoLib, IoBitFieldWrite16, 4, EFIAPI); +MOCK_FUNCTION_DEFINITION (MockIoLib, IoBitFieldOr16, 4, EFIAPI); +MOCK_FUNCTION_DEFINITION (MockIoLib, IoBitFieldAnd16, 4, EFIAPI); +MOCK_FUNCTION_DEFINITION (MockIoLib, IoBitFieldAndThenOr16, 5, EFIAPI); +MOCK_FUNCTION_DEFINITION (MockIoLib, IoRead32, 1, EFIAPI); +MOCK_FUNCTION_DEFINITION (MockIoLib, IoWrite32, 2, EFIAPI); +MOCK_FUNCTION_DEFINITION (MockIoLib, IoReadFifo32, 3, EFIAPI); +MOCK_FUNCTION_DEFINITION (MockIoLib, IoWriteFifo32, 3, EFIAPI); +MOCK_FUNCTION_DEFINITION (MockIoLib, IoOr32, 2, EFIAPI); +MOCK_FUNCTION_DEFINITION (MockIoLib, IoAnd32, 2, EFIAPI); +MOCK_FUNCTION_DEFINITION (MockIoLib, IoAndThenOr32, 3, EFIAPI); +MOCK_FUNCTION_DEFINITION (MockIoLib, IoBitFieldRead32, 3, EFIAPI); +MOCK_FUNCTION_DEFINITION (MockIoLib, IoBitFieldWrite32, 4, EFIAPI); +MOCK_FUNCTION_DEFINITION (MockIoLib, IoBitFieldOr32, 4, EFIAPI); +MOCK_FUNCTION_DEFINITION (MockIoLib, IoBitFieldAnd32, 4, EFIAPI); +MOCK_FUNCTION_DEFINITION (MockIoLib, IoBitFieldAndThenOr32, 5, EFIAPI); MOCK_FUNCTION_DEFINITION (MockIoLib, IoRead64, 1, EFIAPI); MOCK_FUNCTION_DEFINITION (MockIoLib, IoWrite64, 2, EFIAPI); +MOCK_FUNCTION_DEFINITION (MockIoLib, IoOr64, 2, EFIAPI); +MOCK_FUNCTION_DEFINITION (MockIoLib, IoAnd64, 2, EFIAPI); +MOCK_FUNCTION_DEFINITION (MockIoLib, IoAndThenOr64, 3, EFIAPI); +MOCK_FUNCTION_DEFINITION (MockIoLib, IoBitFieldRead64, 3, EFIAPI); +MOCK_FUNCTION_DEFINITION (MockIoLib, IoBitFieldWrite64, 4, EFIAPI); +MOCK_FUNCTION_DEFINITION (MockIoLib, IoBitFieldOr64, 4, EFIAPI); +MOCK_FUNCTION_DEFINITION (MockIoLib, IoBitFieldAnd64, 4, EFIAPI); +MOCK_FUNCTION_DEFINITION (MockIoLib, IoBitFieldAndThenOr64, 5, EFIAPI); MOCK_FUNCTION_DEFINITION (MockIoLib, MmioRead8, 1, EFIAPI); MOCK_FUNCTION_DEFINITION (MockIoLib, MmioWrite8, 2, EFIAPI); +MOCK_FUNCTION_DEFINITION (MockIoLib, MmioOr8, 2, EFIAPI); +MOCK_FUNCTION_DEFINITION (MockIoLib, MmioAnd8, 2, EFIAPI); +MOCK_FUNCTION_DEFINITION (MockIoLib, MmioAndThenOr8, 3, EFIAPI); +MOCK_FUNCTION_DEFINITION (MockIoLib, MmioBitFieldRead8, 3, EFIAPI); +MOCK_FUNCTION_DEFINITION (MockIoLib, MmioBitFieldWrite8, 4, EFIAPI); +MOCK_FUNCTION_DEFINITION (MockIoLib, MmioBitFieldOr8, 4, EFIAPI); +MOCK_FUNCTION_DEFINITION (MockIoLib, MmioBitFieldAnd8, 4, EFIAPI); +MOCK_FUNCTION_DEFINITION (MockIoLib, MmioBitFieldAndThenOr8, 5, EFIAPI); MOCK_FUNCTION_DEFINITION (MockIoLib, MmioRead16, 1, EFIAPI); MOCK_FUNCTION_DEFINITION (MockIoLib, MmioWrite16, 2, EFIAPI); +MOCK_FUNCTION_DEFINITION (MockIoLib, MmioOr16, 2, EFIAPI); +MOCK_FUNCTION_DEFINITION (MockIoLib, MmioAnd16, 2, EFIAPI); +MOCK_FUNCTION_DEFINITION (MockIoLib, MmioAndThenOr16, 3, EFIAPI); +MOCK_FUNCTION_DEFINITION (MockIoLib, MmioBitFieldRead16, 3, EFIAPI); +MOCK_FUNCTION_DEFINITION (MockIoLib, MmioBitFieldWrite16, 4, EFIAPI); +MOCK_FUNCTION_DEFINITION (MockIoLib, MmioBitFieldOr16, 4, EFIAPI); +MOCK_FUNCTION_DEFINITION (MockIoLib, MmioBitFieldAnd16, 4, EFIAPI); +MOCK_FUNCTION_DEFINITION (MockIoLib, MmioBitFieldAndThenOr16, 5, EFIAPI); MOCK_FUNCTION_DEFINITION (MockIoLib, MmioRead32, 1, EFIAPI); MOCK_FUNCTION_DEFINITION (MockIoLib, MmioWrite32, 2, EFIAPI); +MOCK_FUNCTION_DEFINITION (MockIoLib, MmioOr32, 2, EFIAPI); +MOCK_FUNCTION_DEFINITION (MockIoLib, MmioAnd32, 2, EFIAPI); +MOCK_FUNCTION_DEFINITION (MockIoLib, MmioAndThenOr32, 3, EFIAPI); +MOCK_FUNCTION_DEFINITION (MockIoLib, MmioBitFieldRead32, 3, EFIAPI); +MOCK_FUNCTION_DEFINITION (MockIoLib, MmioBitFieldWrite32, 4, EFIAPI); +MOCK_FUNCTION_DEFINITION (MockIoLib, MmioBitFieldOr32, 4, EFIAPI); +MOCK_FUNCTION_DEFINITION (MockIoLib, MmioBitFieldAnd32, 4, EFIAPI); +MOCK_FUNCTION_DEFINITION (MockIoLib, MmioBitFieldAndThenOr32, 5, EFIAPI); MOCK_FUNCTION_DEFINITION (MockIoLib, MmioRead64, 1, EFIAPI); MOCK_FUNCTION_DEFINITION (MockIoLib, MmioWrite64, 2, EFIAPI); -MOCK_FUNCTION_DEFINITION (MockIoLib, IoWrite16, 2, EFIAPI); +MOCK_FUNCTION_DEFINITION (MockIoLib, MmioOr64, 2, EFIAPI); +MOCK_FUNCTION_DEFINITION (MockIoLib, MmioAnd64, 2, EFIAPI); +MOCK_FUNCTION_DEFINITION (MockIoLib, MmioAndThenOr64, 3, EFIAPI); +MOCK_FUNCTION_DEFINITION (MockIoLib, MmioBitFieldRead64, 3, EFIAPI); +MOCK_FUNCTION_DEFINITION (MockIoLib, MmioBitFieldWrite64, 4, EFIAPI); +MOCK_FUNCTION_DEFINITION (MockIoLib, MmioBitFieldOr64, 4, EFIAPI); +MOCK_FUNCTION_DEFINITION (MockIoLib, MmioBitFieldAnd64, 4, EFIAPI); +MOCK_FUNCTION_DEFINITION (MockIoLib, MmioBitFieldAndThenOr64, 5, EFIAPI); +MOCK_FUNCTION_DEFINITION (MockIoLib, MmioReadBuffer8, 3, EFIAPI); +MOCK_FUNCTION_DEFINITION (MockIoLib, MmioReadBuffer16, 3, EFIAPI); +MOCK_FUNCTION_DEFINITION (MockIoLib, MmioReadBuffer32, 3, EFIAPI); +MOCK_FUNCTION_DEFINITION (MockIoLib, MmioReadBuffer64, 3, EFIAPI); +MOCK_FUNCTION_DEFINITION (MockIoLib, MmioWriteBuffer8, 3, EFIAPI); +MOCK_FUNCTION_DEFINITION (MockIoLib, MmioWriteBuffer16, 3, EFIAPI); +MOCK_FUNCTION_DEFINITION (MockIoLib, MmioWriteBuffer32, 3, EFIAPI); +MOCK_FUNCTION_DEFINITION (MockIoLib, MmioWriteBuffer64, 3, EFIAPI);