summaryrefslogtreecommitdiffstats
path: root/SourceLevelDebugPkg/Library/DebugAgent/DebugAgentCommon/DebugAgent.h
diff options
context:
space:
mode:
Diffstat (limited to 'SourceLevelDebugPkg/Library/DebugAgent/DebugAgentCommon/DebugAgent.h')
-rw-r--r--SourceLevelDebugPkg/Library/DebugAgent/DebugAgentCommon/DebugAgent.h28
1 files changed, 28 insertions, 0 deletions
diff --git a/SourceLevelDebugPkg/Library/DebugAgent/DebugAgentCommon/DebugAgent.h b/SourceLevelDebugPkg/Library/DebugAgent/DebugAgentCommon/DebugAgent.h
index c92204136f..6a9e316f45 100644
--- a/SourceLevelDebugPkg/Library/DebugAgent/DebugAgentCommon/DebugAgent.h
+++ b/SourceLevelDebugPkg/Library/DebugAgent/DebugAgentCommon/DebugAgent.h
@@ -60,6 +60,7 @@
// Timeout value for reading packet (unit is microsecond)
//
#define READ_PACKET_TIMEOUT (500 * 1000)
+#define DEBUG_TIMER_INTERVAL (100 * 1000)
#define SOFT_INTERRUPT_SIGNATURE SIGNATURE_32('S','O','F','T')
#define SYSTEM_RESET_SIGNATURE SIGNATURE_32('S','Y','S','R')
@@ -102,6 +103,7 @@ typedef struct {
#define DEBUG_MAILBOX_LAST_ACK 4
#define DEBUG_MAILBOX_SEQUENCE_NO_INDEX 5
#define DEBUG_MAILBOX_HOST_SEQUENCE_NO_INDEX 6
+#define DEBUG_MAILBOX_DEBUG_TIMER_FREQUENCY 7
#pragma pack(1)
typedef union {
@@ -137,6 +139,7 @@ typedef struct {
UINT8 LastAck; // The last ack packet type
UINT8 SequenceNo;
UINT8 HostSequenceNo;
+ UINT32 DebugTimerFrequency;
UINT8 CheckSum; // Mailbox checksum
UINT8 ToBeCheckSum; // To be Mailbox checksum at the next
} DEBUG_AGENT_MAILBOX;
@@ -469,5 +472,30 @@ ReadRemainingBreakPacket (
IN OUT DEBUG_PACKET_HEADER *DebugHeader
);
+/**
+ Read data from debug channel and save the data in buffer.
+
+ Reads NumberOfBytes data bytes from a debug device into the buffer
+ specified by Buffer. The number of bytes actually read is returned.
+ If the return value is less than NumberOfBytes, then the rest operation failed.
+ If NumberOfBytes is zero, then return 0.
+
+ @param Handle Debug port handle.
+ @param Buffer Pointer to the data buffer to store the data read from the debug device.
+ @param NumberOfBytes Number of bytes which will be read.
+ @param Timeout Timeout value for reading from debug device. It unit is Microsecond.
+
+ @retval 0 Read data failed, no data is to be read.
+ @retval >0 Actual number of bytes read from debug device.
+
+**/
+UINTN
+DebugAgentReadBuffer (
+ IN DEBUG_PORT_HANDLE Handle,
+ IN OUT UINT8 *Buffer,
+ IN UINTN NumberOfBytes,
+ IN UINTN Timeout
+ );
+
#endif