TianoCore EDK2 master
Loading...
Searching...
No Matches
SemihostLib.h
Go to the documentation of this file.
1
10#ifndef SEMIHOSTING_LIB_H_
11#define SEMIHOSTING_LIB_H_
12
13/*
14 *
15 * Please refer to ARM RVDS 3.0 Compiler and Libraries Guide for more information
16 * about the semihosting interface.
17 *
18 */
19
20#define SEMIHOST_FILE_MODE_READ (0 << 2)
21#define SEMIHOST_FILE_MODE_WRITE (1 << 2)
22#define SEMIHOST_FILE_MODE_APPEND (2 << 2)
23#define SEMIHOST_FILE_MODE_UPDATE (1 << 1)
24#define SEMIHOST_FILE_MODE_BINARY (1 << 0)
25#define SEMIHOST_FILE_MODE_ASCII (0 << 0)
26
27BOOLEAN
28SemihostConnectionSupported (
29 VOID
30 );
31
32RETURN_STATUS
33SemihostFileOpen (
34 IN CHAR8 *FileName,
35 IN UINT32 Mode,
36 OUT UINTN *FileHandle
37 );
38
39RETURN_STATUS
40SemihostFileSeek (
41 IN UINTN FileHandle,
42 IN UINTN Offset
43 );
44
45RETURN_STATUS
46SemihostFileRead (
47 IN UINTN FileHandle,
48 IN OUT UINTN *Length,
49 OUT VOID *Buffer
50 );
51
52RETURN_STATUS
53SemihostFileWrite (
54 IN UINTN FileHandle,
55 IN OUT UINTN *Length,
56 IN VOID *Buffer
57 );
58
59RETURN_STATUS
60SemihostFileClose (
61 IN UINTN FileHandle
62 );
63
64RETURN_STATUS
65SemihostFileLength (
66 IN UINTN FileHandle,
67 OUT UINTN *Length
68 );
69
83RETURN_STATUS
85 OUT VOID *Buffer,
86 IN UINT8 Identifier,
87 IN UINTN Length
88 );
89
90RETURN_STATUS
91SemihostFileRemove (
92 IN CHAR8 *FileName
93 );
94
106RETURN_STATUS
108 IN CHAR8 *FileName,
109 IN CHAR8 *NewFileName
110 );
111
112CHAR8
113SemihostReadCharacter (
114 VOID
115 );
116
117VOID
118SemihostWriteCharacter (
119 IN CHAR8 Character
120 );
121
122VOID
123SemihostWriteString (
124 IN CHAR8 *String
125 );
126
127UINT32
128SemihostSystem (
129 IN CHAR8 *CommandLine
130 );
131
132#endif // SEMIHOSTING_LIB_H_
UINT64 UINTN
#define IN
Definition: Base.h:279
#define OUT
Definition: Base.h:284
RETURN_STATUS SemihostFileTmpName(OUT VOID *Buffer, IN UINT8 Identifier, IN UINTN Length)
Definition: SemihostLib.c:182
RETURN_STATUS SemihostFileRename(IN CHAR8 *FileName, IN CHAR8 *NewFileName)
Definition: SemihostLib.c:245