summaryrefslogtreecommitdiffstats
path: root/UefiCpuPkg/CpuIo2Smm/CpuIo2Smm.c
diff options
context:
space:
mode:
authorxli24 <xli24@6f19259b-4bc3-4df7-8a09-765794883524>2010-07-13 03:08:54 +0000
committerxli24 <xli24@6f19259b-4bc3-4df7-8a09-765794883524>2010-07-13 03:08:54 +0000
commit430fbbe0968c9ce6748203776a13e96d367c3bce (patch)
treedc44376b91c52ae81537e523baf39f3a3cccd2f3 /UefiCpuPkg/CpuIo2Smm/CpuIo2Smm.c
parent099f2b1882cb955b59fa8c0ce33ccd9db0318e36 (diff)
downloadedk2-430fbbe0968c9ce6748203776a13e96d367c3bce.tar.gz
edk2-430fbbe0968c9ce6748203776a13e96d367c3bce.tar.bz2
edk2-430fbbe0968c9ce6748203776a13e96d367c3bce.zip
Code refinement.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@10647 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'UefiCpuPkg/CpuIo2Smm/CpuIo2Smm.c')
-rw-r--r--UefiCpuPkg/CpuIo2Smm/CpuIo2Smm.c59
1 files changed, 3 insertions, 56 deletions
diff --git a/UefiCpuPkg/CpuIo2Smm/CpuIo2Smm.c b/UefiCpuPkg/CpuIo2Smm/CpuIo2Smm.c
index bcf3964d89..1c172a096c 100644
--- a/UefiCpuPkg/CpuIo2Smm/CpuIo2Smm.c
+++ b/UefiCpuPkg/CpuIo2Smm/CpuIo2Smm.c
@@ -12,60 +12,7 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
**/
-#include <PiSmm.h>
-
-#include <Protocol/SmmCpuIo2.h>
-
-#include <Library/BaseLib.h>
-#include <Library/DebugLib.h>
-#include <Library/IoLib.h>
-#include <Library/SmmServicesTableLib.h>
-#include <Library/BaseMemoryLib.h>
-
-#define MAX_IO_PORT_ADDRESS 0xFFFF
-
-//
-// Function Prototypes
-//
-EFI_STATUS
-EFIAPI
-CpuMemoryServiceRead (
- IN CONST EFI_SMM_CPU_IO2_PROTOCOL *This,
- IN EFI_SMM_IO_WIDTH Width,
- IN UINT64 Address,
- IN UINTN Count,
- OUT VOID *Buffer
- );
-
-EFI_STATUS
-EFIAPI
-CpuMemoryServiceWrite (
- IN CONST EFI_SMM_CPU_IO2_PROTOCOL *This,
- IN EFI_SMM_IO_WIDTH Width,
- IN UINT64 Address,
- IN UINTN Count,
- IN VOID *Buffer
- );
-
-EFI_STATUS
-EFIAPI
-CpuIoServiceRead (
- IN CONST EFI_SMM_CPU_IO2_PROTOCOL *This,
- IN EFI_SMM_IO_WIDTH Width,
- IN UINT64 Address,
- IN UINTN Count,
- OUT VOID *Buffer
- );
-
-EFI_STATUS
-EFIAPI
-CpuIoServiceWrite (
- IN CONST EFI_SMM_CPU_IO2_PROTOCOL *This,
- IN EFI_SMM_IO_WIDTH Width,
- IN UINT64 Address,
- IN UINTN Count,
- IN VOID *Buffer
- );
+#include "CpuIo2Smm.h"
//
// Handle for the SMM CPU I/O Protocol
@@ -104,7 +51,7 @@ UINT8 mStride[] = {
@param[in] Address The base address of the I/O operations. The caller is
responsible for aligning the Address if required.
@param[in] Count The number of I/O operations to perform.
- @param[out] Buffer For read operations, the destination buffer to store
+ @param[in] Buffer For read operations, the destination buffer to store
the results. For write operations, the source buffer
from which to write data.
@@ -443,7 +390,7 @@ SmmCpuIo2Initialize (
IN EFI_HANDLE ImageHandle,
IN EFI_SYSTEM_TABLE *SystemTable
)
- {
+{
EFI_STATUS Status;
//