summaryrefslogtreecommitdiffstats
path: root/SourceLevelDebugPkg
diff options
context:
space:
mode:
Diffstat (limited to 'SourceLevelDebugPkg')
-rw-r--r--SourceLevelDebugPkg/Library/DebugAgent/DebugAgentCommon/DebugTimer.c12
-rw-r--r--SourceLevelDebugPkg/Library/DebugAgent/DebugAgentCommon/DebugTimer.h6
2 files changed, 9 insertions, 9 deletions
diff --git a/SourceLevelDebugPkg/Library/DebugAgent/DebugAgentCommon/DebugTimer.c b/SourceLevelDebugPkg/Library/DebugAgent/DebugAgentCommon/DebugTimer.c
index bf965cb3c9..e287c4cbbe 100644
--- a/SourceLevelDebugPkg/Library/DebugAgent/DebugAgentCommon/DebugTimer.c
+++ b/SourceLevelDebugPkg/Library/DebugAgent/DebugAgentCommon/DebugTimer.c
@@ -19,7 +19,7 @@
@param[out] TimerFrequency Local APIC timer frequency returned.
@param[in] DumpFlag If TRUE, dump Local APIC timer's parameter.
-
+
@return 32-bit Local APIC timer init count.
**/
UINT32
@@ -108,8 +108,8 @@ SaveAndSetDebugTimerInterrupt (
/**
Check if the timer is time out.
-
- @param[in] TimerCycle Timer total count.
+
+ @param[in] TimerCycle Timer initial count.
@param[in] Timer The start timer from the begin.
@param[in] TimeoutTicker Ticker number need time out.
@@ -138,11 +138,11 @@ IsDebugTimerTimeout (
Delta = Timer - CurrentTimer;
} else {
//
- // Handle one roll-over.
+ // Handle one roll-over.
//
- Delta = TimerCycle - (CurrentTimer - Timer);
+ Delta = TimerCycle - (CurrentTimer - Timer) + 1;
}
-
+
return (BOOLEAN) (Delta >= TimeoutTicker);
}
diff --git a/SourceLevelDebugPkg/Library/DebugAgent/DebugAgentCommon/DebugTimer.h b/SourceLevelDebugPkg/Library/DebugAgent/DebugAgentCommon/DebugTimer.h
index 60550d42cf..e480fa3e0c 100644
--- a/SourceLevelDebugPkg/Library/DebugAgent/DebugAgentCommon/DebugTimer.h
+++ b/SourceLevelDebugPkg/Library/DebugAgent/DebugAgentCommon/DebugTimer.h
@@ -20,7 +20,7 @@
@param[out] TimerFrequency Local APIC timer frequency returned.
@param[in] DumpFlag If TRUE, dump Local APIC timer's parameter.
-
+
@return 32-bit Local APIC timer init count.
**/
UINT32
@@ -31,8 +31,8 @@ InitializeDebugTimer (
/**
Check if the timer is time out.
-
- @param[in] TimerCycle Timer total count.
+
+ @param[in] TimerCycle Timer initial count.
@param[in] Timer The start timer from the begin.
@param[in] TimeoutTicker Ticker number need time out.