VirtualBox

source: vbox/trunk/src/VBox/Devices/EFI/Firmware/ArmPkg/Include/Library/SemihostLib.h@ 107675

最後變更 在這個檔案從107675是 99464,由 vboxsync 提交於 2 年 前

Devices/EFI/Firmware: Restore ArmPkg, ArmVirtPkg, ArmPlatformPkg in order to be able to build Aarch64 and Aarch32 firmware images for the virt platform, bugref:10400

  • 屬性 svn:eol-style 設為 native
檔案大小: 2.6 KB
 
1/** @file
2
3 Copyright (c) 2008 - 2009, Apple Inc. All rights reserved.<BR>
4 Portions copyright (c) 2011, 2012, ARM Ltd. All rights reserved.<BR>
5
6 SPDX-License-Identifier: BSD-2-Clause-Patent
7
8**/
9
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
70/**
71 Get a temporary name for a file from the host running the debug agent.
72
73 @param[out] Buffer Pointer to the buffer where the temporary name has to
74 be stored
75 @param[in] Identifier File name identifier (integer in the range 0 to 255)
76 @param[in] Length Length of the buffer to store the temporary name
77
78 @retval RETURN_SUCCESS Temporary name returned
79 @retval RETURN_INVALID_PARAMETER Invalid buffer address
80 @retval RETURN_ABORTED Temporary name not returned
81
82**/
83RETURN_STATUS
84SemihostFileTmpName (
85 OUT VOID *Buffer,
86 IN UINT8 Identifier,
87 IN UINTN Length
88 );
89
90RETURN_STATUS
91SemihostFileRemove (
92 IN CHAR8 *FileName
93 );
94
95/**
96 Rename a specified file.
97
98 @param[in] FileName Name of the file to rename.
99 @param[in] NewFileName The new name of the file.
100
101 @retval RETURN_SUCCESS File Renamed
102 @retval RETURN_INVALID_PARAMETER Either the current or the new name is not specified
103 @retval RETURN_ABORTED Rename failed
104
105**/
106RETURN_STATUS
107SemihostFileRename (
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_
注意: 瀏覽 TracBrowser 來幫助您使用儲存庫瀏覽器

© 2025 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette