\r
**/\r
\r
-#include <PiSmm.h>\r
-\r
-#include <Protocol/SmmCpuIo2.h>\r
-\r
-#include <Library/BaseLib.h>\r
-#include <Library/DebugLib.h>\r
-#include <Library/IoLib.h>\r
-#include <Library/SmmServicesTableLib.h>\r
-#include <Library/BaseMemoryLib.h>\r
-\r
-#define MAX_IO_PORT_ADDRESS 0xFFFF\r
-\r
-//\r
-// Function Prototypes\r
-//\r
-EFI_STATUS\r
-EFIAPI\r
-CpuMemoryServiceRead (\r
- IN CONST EFI_SMM_CPU_IO2_PROTOCOL *This,\r
- IN EFI_SMM_IO_WIDTH Width,\r
- IN UINT64 Address,\r
- IN UINTN Count,\r
- OUT VOID *Buffer\r
- );\r
-\r
-EFI_STATUS\r
-EFIAPI\r
-CpuMemoryServiceWrite (\r
- IN CONST EFI_SMM_CPU_IO2_PROTOCOL *This,\r
- IN EFI_SMM_IO_WIDTH Width,\r
- IN UINT64 Address,\r
- IN UINTN Count,\r
- IN VOID *Buffer\r
- );\r
-\r
-EFI_STATUS\r
-EFIAPI\r
-CpuIoServiceRead (\r
- IN CONST EFI_SMM_CPU_IO2_PROTOCOL *This,\r
- IN EFI_SMM_IO_WIDTH Width,\r
- IN UINT64 Address,\r
- IN UINTN Count,\r
- OUT VOID *Buffer\r
- );\r
-\r
-EFI_STATUS\r
-EFIAPI\r
-CpuIoServiceWrite (\r
- IN CONST EFI_SMM_CPU_IO2_PROTOCOL *This,\r
- IN EFI_SMM_IO_WIDTH Width,\r
- IN UINT64 Address,\r
- IN UINTN Count,\r
- IN VOID *Buffer\r
- );\r
+#include "CpuIo2Smm.h"\r
\r
//\r
// Handle for the SMM CPU I/O Protocol\r
@param[in] Address The base address of the I/O operations. The caller is \r
responsible for aligning the Address if required. \r
@param[in] Count The number of I/O operations to perform.\r
- @param[out] Buffer For read operations, the destination buffer to store \r
+ @param[in] Buffer For read operations, the destination buffer to store \r
the results. For write operations, the source buffer \r
from which to write data.\r
\r
IN EFI_HANDLE ImageHandle,\r
IN EFI_SYSTEM_TABLE *SystemTable\r
)\r
- {\r
+{\r
EFI_STATUS Status;\r
\r
//\r