]> git.proxmox.com Git - mirror_edk2.git/blame_incremental - EmbeddedPkg/Include/Library/GdbSerialLib.h
UefiCpuPkg: Move AsmRelocateApLoopStart from Mpfuncs.nasm to AmdSev.nasm
[mirror_edk2.git] / EmbeddedPkg / Include / Library / GdbSerialLib.h
... / ...
CommitLineData
1/** @file\r
2 Basic serial IO abstraction for GDB\r
3\r
4 Copyright (c) 2008 - 2009, Apple Inc. All rights reserved.<BR>\r
5\r
6 SPDX-License-Identifier: BSD-2-Clause-Patent\r
7\r
8**/\r
9\r
10#ifndef __GDB_SERIAL_LIB_H__\r
11#define __GDB_SERIAL_LIB_H__\r
12\r
13/**\r
14 Sets the baud rate, receive FIFO depth, transmit/receive time out, parity,\r
15 data buts, and stop bits on a serial device. This call is optional as the serial\r
16 port will be set up with defaults base on PCD values.\r
17\r
18 @param BaudRate The requested baud rate. A BaudRate value of 0 will use the\r
19 device's default interface speed.\r
20 @param Parity The type of parity to use on this serial device. A Parity value of\r
21 DefaultParity will use the device's default parity value.\r
22 @param DataBits The number of data bits to use on the serial device. A DataBits\r
23 value of 0 will use the device's default data bit setting.\r
24 @param StopBits The number of stop bits to use on this serial device. A StopBits\r
25 value of DefaultStopBits will use the device's default number of\r
26 stop bits.\r
27\r
28 @retval EFI_SUCCESS The device was configured.\r
29 @retval EFI_DEVICE_ERROR The serial device could not be configured.\r
30\r
31**/\r
32RETURN_STATUS\r
33EFIAPI\r
34GdbSerialInit (\r
35 IN UINT64 BaudRate,\r
36 IN UINT8 Parity,\r
37 IN UINT8 DataBits,\r
38 IN UINT8 StopBits\r
39 );\r
40\r
41/**\r
42 Check to see if a character is available from GDB. Do not read the character as that is\r
43 done via GdbGetChar().\r
44\r
45 @return TRUE - Character available\r
46 @return FALSE - Character not available\r
47\r
48**/\r
49BOOLEAN\r
50EFIAPI\r
51GdbIsCharAvailable (\r
52 VOID\r
53 );\r
54\r
55/**\r
56 Get a character from GDB. This function must be able to run in interrupt context.\r
57\r
58 @return A character from GDB\r
59\r
60**/\r
61CHAR8\r
62EFIAPI\r
63GdbGetChar (\r
64 VOID\r
65 );\r
66\r
67/**\r
68 Send a character to GDB. This function must be able to run in interrupt context.\r
69\r
70\r
71 @param Char Send a character to GDB\r
72\r
73**/\r
74\r
75VOID\r
76EFIAPI\r
77GdbPutChar (\r
78 IN CHAR8 Char\r
79 );\r
80\r
81/**\r
82 Send an ASCII string to GDB. This function must be able to run in interrupt context.\r
83\r
84\r
85 @param String Send a string to GDB\r
86\r
87**/\r
88\r
89VOID\r
90GdbPutString (\r
91 IN CHAR8 *String\r
92 );\r
93\r
94#endif\r