]> git.proxmox.com Git - mirror_edk2.git/blame - ArmPkg/Include/Library/SemihostLib.h
Added a library for the default exception handler and started to add a dissasembler...
[mirror_edk2.git] / ArmPkg / Include / Library / SemihostLib.h
CommitLineData
2ef2b01e
A
1/** @file
2
3 Copyright (c) 2008-2009 Apple Inc. All rights reserved.<BR>
4
5 All rights reserved. This program and the accompanying materials
6 are licensed and made available under the terms and conditions of the BSD License
7 which accompanies this distribution. The full text of the license may be found at
8 http://opensource.org/licenses/bsd-license.php
9
10 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
11 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
12
13**/
14
15#ifndef __SEMIHOSTING_H__
16#define __SEMIHOSTING_H__
17
18/*
19 *
20 * Please refer to ARM RVDS 3.0 Compiler and Libraries Guide for more information
21 * about the semihosting interface.
22 *
23 */
24
25#define SEMIHOST_FILE_MODE_READ (0 << 2)
26#define SEMIHOST_FILE_MODE_WRITE (1 << 2)
27#define SEMIHOST_FILE_MODE_APPEND (2 << 2)
28#define SEMIHOST_FILE_MODE_CREATE (1 << 1)
29#define SEMIHOST_FILE_MODE_BINARY (1 << 0)
30#define SEMIHOST_FILE_MODE_ASCII (0 << 0)
31
32BOOLEAN
33SemihostConnectionSupported (
34 VOID
35 );
36
37EFI_STATUS
38SemihostFileOpen (
39 IN CHAR8 *FileName,
40 IN UINT32 Mode,
41 OUT UINT32 *FileHandle
42 );
43
44EFI_STATUS
45SemihostFileSeek (
46 IN UINT32 FileHandle,
47 IN UINT32 Offset
48 );
49
50EFI_STATUS
51SemihostFileRead (
52 IN UINT32 FileHandle,
53 IN OUT UINT32 *Length,
54 OUT VOID *Buffer
55 );
56
57EFI_STATUS
58SemihostFileWrite (
59 IN UINT32 FileHandle,
60 IN OUT UINT32 *Length,
61 IN VOID *Buffer
62 );
63
64EFI_STATUS
65SemihostFileClose (
66 IN UINT32 FileHandle
67 );
68
69EFI_STATUS
70SemihostFileLength (
71 IN UINT32 FileHandle,
72 OUT UINT32 *Length
73 );
74
75EFI_STATUS
76SemihostFileRemove (
77 IN CHAR8 *FileName
78 );
79
80CHAR8
81SemihostReadCharacter (
82 VOID
83 );
84
85VOID
86SemihostWriteCharacter (
87 IN CHAR8 Character
88 );
89
90VOID
91SemihostWriteString (
92 IN CHAR8 *String
93 );
94
95UINT32
96SemihostSystem (
97 IN CHAR8 *CommandLine
98 );
99
100#endif // __SEMIHOSTING_H__