summaryrefslogtreecommitdiff
path: root/ArmPkg
diff options
context:
space:
mode:
authoroliviermartin <oliviermartin@6f19259b-4bc3-4df7-8a09-765794883524>2012-02-28 17:34:12 +0000
committeroliviermartin <oliviermartin@6f19259b-4bc3-4df7-8a09-765794883524>2012-02-28 17:34:12 +0000
commitafb9f4da946bc5030b31a21079c9d1d2c81bd2b7 (patch)
tree68d0f2ffea6a4718f213523e839d0a723ef9fc16 /ArmPkg
parent68dda854c63a2e5d66491d0bdc65b1fc580d8612 (diff)
downloadedk2-platforms-afb9f4da946bc5030b31a21079c9d1d2c81bd2b7.tar.xz
ArmPkg/Library/SemihostLib: Removed depenencies on Uefi.h (Base library)
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@13065 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'ArmPkg')
-rw-r--r--ArmPkg/Include/Library/SemihostLib.h14
-rw-r--r--ArmPkg/Library/SemihostLib/Arm/SemihostLib.c50
2 files changed, 32 insertions, 32 deletions
diff --git a/ArmPkg/Include/Library/SemihostLib.h b/ArmPkg/Include/Library/SemihostLib.h
index 03f3bce7a9..68f4b772eb 100644
--- a/ArmPkg/Include/Library/SemihostLib.h
+++ b/ArmPkg/Include/Library/SemihostLib.h
@@ -34,45 +34,45 @@ SemihostConnectionSupported (
VOID
);
-EFI_STATUS
+RETURN_STATUS
SemihostFileOpen (
IN CHAR8 *FileName,
IN UINT32 Mode,
OUT UINT32 *FileHandle
);
-EFI_STATUS
+RETURN_STATUS
SemihostFileSeek (
IN UINT32 FileHandle,
IN UINT32 Offset
);
-EFI_STATUS
+RETURN_STATUS
SemihostFileRead (
IN UINT32 FileHandle,
IN OUT UINT32 *Length,
OUT VOID *Buffer
);
-EFI_STATUS
+RETURN_STATUS
SemihostFileWrite (
IN UINT32 FileHandle,
IN OUT UINT32 *Length,
IN VOID *Buffer
);
-EFI_STATUS
+RETURN_STATUS
SemihostFileClose (
IN UINT32 FileHandle
);
-EFI_STATUS
+RETURN_STATUS
SemihostFileLength (
IN UINT32 FileHandle,
OUT UINT32 *Length
);
-EFI_STATUS
+RETURN_STATUS
SemihostFileRemove (
IN CHAR8 *FileName
);
diff --git a/ArmPkg/Library/SemihostLib/Arm/SemihostLib.c b/ArmPkg/Library/SemihostLib/Arm/SemihostLib.c
index 0b939b4bb2..cea6298a8d 100644
--- a/ArmPkg/Library/SemihostLib/Arm/SemihostLib.c
+++ b/ArmPkg/Library/SemihostLib/Arm/SemihostLib.c
@@ -11,7 +11,7 @@
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
**/
-#include <Uefi.h>
+#include <Base.h>
#include <Library/BaseLib.h>
#include <Library/SemihostLib.h>
@@ -26,7 +26,7 @@ SemihostConnectionSupported (
return SEMIHOST_SUPPORTED;
}
-EFI_STATUS
+RETURN_STATUS
SemihostFileOpen (
IN CHAR8 *FileName,
IN UINT32 Mode,
@@ -37,7 +37,7 @@ SemihostFileOpen (
INT32 Result;
if (FileHandle == NULL) {
- return EFI_INVALID_PARAMETER;
+ return RETURN_INVALID_PARAMETER;
}
OpenBlock.FileName = FileName;
@@ -47,14 +47,14 @@ SemihostFileOpen (
Result = Semihost_SYS_OPEN(&OpenBlock);
if (Result == -1) {
- return EFI_NOT_FOUND;
+ return RETURN_NOT_FOUND;
} else {
*FileHandle = Result;
- return EFI_SUCCESS;
+ return RETURN_SUCCESS;
}
}
-EFI_STATUS
+RETURN_STATUS
SemihostFileSeek (
IN UINT32 FileHandle,
IN UINT32 Offset
@@ -69,13 +69,13 @@ SemihostFileSeek (
Result = Semihost_SYS_SEEK(&SeekBlock);
if (Result == 0) {
- return EFI_SUCCESS;
+ return RETURN_SUCCESS;
} else {
- return EFI_ABORTED;
+ return RETURN_ABORTED;
}
}
-EFI_STATUS
+RETURN_STATUS
SemihostFileRead (
IN UINT32 FileHandle,
IN OUT UINT32 *Length,
@@ -86,7 +86,7 @@ SemihostFileRead (
UINT32 Result;
if ((Length == NULL) || (Buffer == NULL)) {
- return EFI_INVALID_PARAMETER;
+ return RETURN_INVALID_PARAMETER;
}
ReadBlock.Handle = FileHandle;
@@ -96,14 +96,14 @@ SemihostFileRead (
Result = Semihost_SYS_READ(&ReadBlock);
if (Result == *Length) {
- return EFI_ABORTED;
+ return RETURN_ABORTED;
} else {
*Length -= Result;
- return EFI_SUCCESS;
+ return RETURN_SUCCESS;
}
}
-EFI_STATUS
+RETURN_STATUS
SemihostFileWrite (
IN UINT32 FileHandle,
IN OUT UINT32 *Length,
@@ -113,7 +113,7 @@ SemihostFileWrite (
SEMIHOST_FILE_READ_WRITE_BLOCK WriteBlock;
if ((Length == NULL) || (Buffer == NULL)) {
- return EFI_INVALID_PARAMETER;
+ return RETURN_INVALID_PARAMETER;
}
WriteBlock.Handle = FileHandle;
@@ -122,10 +122,10 @@ SemihostFileWrite (
*Length = Semihost_SYS_WRITE(&WriteBlock);
- return EFI_SUCCESS;
+ return RETURN_SUCCESS;
}
-EFI_STATUS
+RETURN_STATUS
SemihostFileClose (
IN UINT32 FileHandle
)
@@ -133,13 +133,13 @@ SemihostFileClose (
INT32 Result = Semihost_SYS_CLOSE(&FileHandle);
if (Result == -1) {
- return EFI_INVALID_PARAMETER;
+ return RETURN_INVALID_PARAMETER;
} else {
- return EFI_SUCCESS;
+ return RETURN_SUCCESS;
}
}
-EFI_STATUS
+RETURN_STATUS
SemihostFileLength (
IN UINT32 FileHandle,
OUT UINT32 *Length
@@ -148,20 +148,20 @@ SemihostFileLength (
INT32 Result;
if (Length == NULL) {
- return EFI_INVALID_PARAMETER;
+ return RETURN_INVALID_PARAMETER;
}
Result = Semihost_SYS_FLEN(&FileHandle);
if (Result == -1) {
- return EFI_ABORTED;
+ return RETURN_ABORTED;
} else {
*Length = Result;
- return EFI_SUCCESS;
+ return RETURN_SUCCESS;
}
}
-EFI_STATUS
+RETURN_STATUS
SemihostFileRemove (
IN CHAR8 *FileName
)
@@ -175,9 +175,9 @@ SemihostFileRemove (
Result = Semihost_SYS_REMOVE(&RemoveBlock);
if (Result == 0) {
- return EFI_SUCCESS;
+ return RETURN_SUCCESS;
} else {
- return EFI_ABORTED;
+ return RETURN_ABORTED;
}
}