]> git.proxmox.com Git - mirror_edk2.git/blame - EmbeddedPkg/Include/Library/GdbSerialLib.h
UefiCpuPkg: Move AsmRelocateApLoopStart from Mpfuncs.nasm to AmdSev.nasm
[mirror_edk2.git] / EmbeddedPkg / Include / Library / GdbSerialLib.h
CommitLineData
1e57a462 1/** @file\r
c6a72cd7 2 Basic serial IO abstraction for GDB\r
1e57a462 3\r
4 Copyright (c) 2008 - 2009, Apple Inc. All rights reserved.<BR>\r
5\r
878b807a 6 SPDX-License-Identifier: BSD-2-Clause-Patent\r
1e57a462 7\r
8**/\r
9\r
10#ifndef __GDB_SERIAL_LIB_H__\r
11#define __GDB_SERIAL_LIB_H__\r
12\r
1e57a462 13/**\r
c6a72cd7 14 Sets the baud rate, receive FIFO depth, transmit/receive time out, parity,\r
1e57a462 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
a4037690 18 @param BaudRate The requested baud rate. A BaudRate value of 0 will use the\r
1e57a462 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
c6a72cd7 23 value of 0 will use the device's default data bit setting.\r
1e57a462 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
c6a72cd7 29 @retval EFI_DEVICE_ERROR The serial device could not be configured.\r
1e57a462 30\r
31**/\r
32RETURN_STATUS\r
33EFIAPI\r
34GdbSerialInit (\r
e7108d0e
MK
35 IN UINT64 BaudRate,\r
36 IN UINT8 Parity,\r
37 IN UINT8 DataBits,\r
38 IN UINT8 StopBits\r
3402aac7 39 );\r
1e57a462 40\r
1e57a462 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
4f0624e8
GL
45 @return TRUE - Character available\r
46 @return FALSE - Character not available\r
3402aac7 47\r
1e57a462 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
3402aac7 59\r
1e57a462 60**/\r
61CHAR8\r
62EFIAPI\r
63GdbGetChar (\r
64 VOID\r
65 );\r
66\r
1e57a462 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
e7108d0e 78 IN CHAR8 Char\r
1e57a462 79 );\r
80\r
1e57a462 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
1e57a462 94#endif\r