SourceLevelDebugPkg: Use CPU Local APIC timer to handle timeout.

Use CPU Local APIC timer to handle timeout when read data from debug port, instead of the TimerLib in Debug Communication lib instances.
It could remove much duplicated code in Debug Communication Lib instances.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Jeff Fan <jeff.fan@intel.com>
Reviewed-by: Ruiyu Ni <ruiyu.ni@intel.com>





git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@17089 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
Jeff Fan
2015-04-01 07:51:15 +00:00
committed by vanjeff
parent 206f412113
commit 08021523f8
17 changed files with 283 additions and 667 deletions

View File

@ -83,7 +83,7 @@
#define DATA_TRANSFER_WRITE_TIMEOUT 0
#define DATA_TRANSFER_READ_TIMEOUT 50000
#define DATA_TRANSFER_POLL_TIMEOUT 1000
#define XHC_DEBUG_PORT_1_MILLISECOND 1000
//
// XHCI port power off/on delay
//
@ -524,13 +524,6 @@ typedef struct _USB3_DEBUG_PORT_INSTANCE {
// The data buffer address for data read and poll.
//
EFI_PHYSICAL_ADDRESS Data;
//
// Timter settings
//
UINT64 TimerFrequency;
UINT64 TimerCycle;
BOOLEAN TimerCountDown;
} USB3_DEBUG_PORT_HANDLE;
#pragma pack()
@ -735,22 +728,4 @@ XhcDataTransfer (
IN UINTN Timeout
);
/**
Check if the timer is timeout.
@param[in] UsbDebugPortHandle Pointer to USB Debug port handle
@param[in] Timer The start timer from the begin.
@param[in] TimeoutTicker Ticker number need time out.
@return TRUE Timer time out occurs.
@retval FALSE Timer does not time out.
**/
BOOLEAN
IsTimerTimeout (
IN USB3_DEBUG_PORT_HANDLE *UsbDebugPortHandle,
IN UINT64 Timer,
IN UINT64 TimeoutTicker
);
#endif //__SERIAL_PORT_LIB_USB__