]>
Commit | Line | Data |
---|---|---|
2ef2b01e A |
1 | /** @file\r |
2 | Support a Semi Host file system over a debuggers JTAG\r | |
3 | \r | |
d6ebcab7 | 4 | Copyright (c) 2008 - 2009, Apple Inc. All rights reserved.<BR>\r |
2ef2b01e | 5 | \r |
d6ebcab7 | 6 | This program and the accompanying materials\r |
2ef2b01e A |
7 | are licensed and made available under the terms and conditions of the BSD License\r |
8 | which accompanies this distribution. The full text of the license may be found at\r | |
9 | http://opensource.org/licenses/bsd-license.php\r | |
10 | \r | |
11 | THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r | |
12 | WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r | |
13 | \r | |
14 | **/\r | |
15 | \r | |
16 | #ifndef __SEMIHOST_FS_H__\r | |
17 | #define __SEMIHOST_FS_H__\r | |
18 | \r | |
19 | EFI_STATUS\r | |
b34e4db3 | 20 | VolumeOpen (\r |
2ef2b01e A |
21 | IN EFI_SIMPLE_FILE_SYSTEM_PROTOCOL *This,\r |
22 | OUT EFI_FILE **Root\r | |
23 | );\r | |
24 | \r | |
fdd12bd5 RC |
25 | /**\r |
26 | Open a file on the host system by means of the semihosting interface.\r | |
27 | \r | |
28 | @param[in] This A pointer to the EFI_FILE_PROTOCOL instance that is\r | |
29 | the file handle to source location.\r | |
30 | @param[out] NewHandle A pointer to the location to return the opened\r | |
31 | handle for the new file.\r | |
32 | @param[in] FileName The Null-terminated string of the name of the file\r | |
33 | to be opened.\r | |
34 | @param[in] OpenMode The mode to open the file : Read or Read/Write or\r | |
35 | Read/Write/Create\r | |
36 | @param[in] Attributes Only valid for EFI_FILE_MODE_CREATE, in which case these\r | |
37 | are the attribute bits for the newly created file. The\r | |
38 | mnemonics of the attribute bits are : EFI_FILE_READ_ONLY,\r | |
39 | EFI_FILE_HIDDEN, EFI_FILE_SYSTEM, EFI_FILE_RESERVED,\r | |
40 | EFI_FILE_DIRECTORY and EFI_FILE_ARCHIVE.\r | |
41 | \r | |
42 | @retval EFI_SUCCESS The file was open.\r | |
43 | @retval EFI_NOT_FOUND The specified file could not be found.\r | |
44 | @retval EFI_DEVICE_ERROR The last issued semi-hosting operation failed.\r | |
45 | @retval EFI_WRITE_PROTECTED Attempt to create a directory. This is not possible\r | |
46 | with the semi-hosting interface.\r | |
47 | @retval EFI_OUT_OF_RESOURCES Not enough resources were available to open the file.\r | |
48 | @retval EFI_INVALID_PARAMETER At least one of the parameters is invalid.\r | |
49 | \r | |
50 | **/\r | |
2ef2b01e | 51 | EFI_STATUS\r |
b34e4db3 | 52 | FileOpen (\r |
fdd12bd5 | 53 | IN EFI_FILE *This,\r |
2ef2b01e A |
54 | OUT EFI_FILE **NewHandle,\r |
55 | IN CHAR16 *FileName,\r | |
56 | IN UINT64 OpenMode,\r | |
57 | IN UINT64 Attributes\r | |
58 | );\r | |
59 | \r | |
60 | EFI_STATUS\r | |
b34e4db3 | 61 | FileClose (\r |
2ef2b01e A |
62 | IN EFI_FILE *File\r |
63 | );\r | |
64 | \r | |
65 | EFI_STATUS\r | |
66 | FileDelete(\r | |
67 | IN EFI_FILE *File\r | |
68 | );\r | |
69 | \r | |
70 | EFI_STATUS\r | |
b34e4db3 | 71 | FileRead (\r |
2ef2b01e A |
72 | IN EFI_FILE *File,\r |
73 | IN OUT UINTN *BufferSize,\r | |
74 | OUT VOID *Buffer\r | |
75 | );\r | |
76 | \r | |
77 | EFI_STATUS\r | |
b34e4db3 | 78 | FileWrite (\r |
2ef2b01e A |
79 | IN EFI_FILE *File,\r |
80 | IN OUT UINTN *BufferSize,\r | |
81 | IN VOID *Buffer\r | |
82 | );\r | |
83 | \r | |
84 | EFI_STATUS\r | |
b34e4db3 | 85 | FileGetPosition (\r |
2ef2b01e A |
86 | IN EFI_FILE *File,\r |
87 | OUT UINT64 *Position\r | |
88 | );\r | |
89 | \r | |
90 | EFI_STATUS\r | |
b34e4db3 | 91 | FileSetPosition (\r |
2ef2b01e A |
92 | IN EFI_FILE *File,\r |
93 | IN UINT64 Position\r | |
94 | );\r | |
95 | \r | |
96 | EFI_STATUS\r | |
b34e4db3 | 97 | FileGetInfo (\r |
2ef2b01e A |
98 | IN EFI_FILE *File,\r |
99 | IN EFI_GUID *InformationType,\r | |
100 | IN OUT UINTN *BufferSize,\r | |
101 | OUT VOID *Buffer\r | |
102 | );\r | |
103 | \r | |
104 | EFI_STATUS\r | |
b34e4db3 | 105 | FileSetInfo (\r |
2ef2b01e A |
106 | IN EFI_FILE *File,\r |
107 | IN EFI_GUID *InformationType,\r | |
108 | IN UINTN BufferSize,\r | |
109 | IN VOID *Buffer\r | |
110 | );\r | |
111 | \r | |
112 | EFI_STATUS\r | |
b34e4db3 | 113 | FileFlush (\r |
2ef2b01e A |
114 | IN EFI_FILE *File\r |
115 | );\r | |
116 | \r | |
117 | #endif // __SEMIHOST_FS_H__\r | |
118 | \r |