TianoCore EDK2 master
Loading...
Searching...
No Matches
DebugTimer.c File Reference
#include "DebugAgent.h"

Go to the source code of this file.

Functions

UINT32 InitializeDebugTimer (OUT UINT32 *TimerFrequency, IN BOOLEAN DumpFlag)
 
BOOLEAN EFIAPI SaveAndSetDebugTimerInterrupt (IN BOOLEAN EnableStatus)
 
BOOLEAN IsDebugTimerTimeout (IN UINT32 TimerCycle, IN UINT32 Timer, IN UINT32 TimeoutTicker)
 

Detailed Description

Code for debug timer to support debug agent library implementation.

Copyright (c) 2010 - 2015, Intel Corporation. All rights reserved.
SPDX-License-Identifier: BSD-2-Clause-Patent

Definition in file DebugTimer.c.

Function Documentation

◆ InitializeDebugTimer()

UINT32 InitializeDebugTimer ( OUT UINT32 *  TimerFrequency,
IN BOOLEAN  DumpFlag 
)

Initialize CPU local APIC timer.

Parameters
[out]TimerFrequencyLocal APIC timer frequency returned.
[in]DumpFlagIf TRUE, dump Local APIC timer's parameter.
Returns
32-bit Local APIC timer init count.

Definition at line 20 of file DebugTimer.c.

◆ IsDebugTimerTimeout()

BOOLEAN IsDebugTimerTimeout ( IN UINT32  TimerCycle,
IN UINT32  Timer,
IN UINT32  TimeoutTicker 
)

Check if the timer is time out.

Parameters
[in]TimerCycleTimer initial count.
[in]TimerThe start timer from the begin.
[in]TimeoutTickerTicker number need time out.
Returns
TRUE Timer time out occurs.
Return values
FALSETimer does not time out.

Definition at line 119 of file DebugTimer.c.

◆ SaveAndSetDebugTimerInterrupt()

BOOLEAN EFIAPI SaveAndSetDebugTimerInterrupt ( IN BOOLEAN  EnableStatus)

Enable/Disable the interrupt of debug timer and return the interrupt state prior to the operation.

If EnableStatus is TRUE, enable the interrupt of debug timer. If EnableStatus is FALSE, disable the interrupt of debug timer.

Parameters
[in]EnableStatusEnable/Disable.
Return values
TRUEDebug timer interrupt were enabled on entry to this call.
FALSEDebug timer interrupt were disabled on entry to this call.

Definition at line 79 of file DebugTimer.c.