Coverage Report

Created: 2024-10-17 06:29

/src/hbfa-fl/HBFA/UefiHostTestPkg/Library/BaseTimerLibHost/BaseTimerLibHost.c
Line
Count
Source (jump to first uncovered line)
1
/** @file
2
3
  Copyright (c) 2018, Intel Corporation. All rights reserved.<BR>
4
  SPDX-License-Identifier: BSD-2-Clause-Patent
5
6
**/
7
8
#include <Base.h>
9
#include <Library/TimerLib.h>
10
#include <Library/DebugLib.h>
11
12
/**
13
  Stalls the CPU for at least the given number of microseconds.
14
15
  Stalls the CPU for the number of microseconds specified by MicroSeconds.
16
17
  @param  MicroSeconds  The minimum number of microseconds to delay.
18
19
  @return The value of MicroSeconds inputted.
20
21
**/
22
UINTN
23
EFIAPI
24
MicroSecondDelay (
25
  IN      UINTN                     MicroSeconds
26
  )
27
193
{
28
193
  return MicroSeconds;
29
193
}
30
31
/**
32
  Stalls the CPU for at least the given number of nanoseconds.
33
34
  Stalls the CPU for the number of nanoseconds specified by NanoSeconds.
35
36
  @param  NanoSeconds The minimum number of nanoseconds to delay.
37
38
  @return The value of NanoSeconds inputted.
39
40
**/
41
UINTN
42
EFIAPI
43
NanoSecondDelay (
44
  IN      UINTN                     NanoSeconds
45
  )
46
0
{
47
0
  return 0;
48
0
}
49
50
/**
51
  Retrieves the current value of a 64-bit free running performance counter.
52
53
  The counter can either count up by 1 or count down by 1. If the physical
54
  performance counter counts by a larger increment, then the counter values
55
  must be translated. The properties of the counter can be retrieved from
56
  GetPerformanceCounterProperties().
57
58
  @return The current value of the free running performance counter.
59
60
**/
61
UINT64
62
EFIAPI
63
GetPerformanceCounter (
64
  VOID
65
  )
66
0
{
67
0
  return 0;
68
0
}
69
70
/**
71
  Retrieves the 64-bit frequency in Hz and the range of performance counter
72
  values.
73
74
  If StartValue is not NULL, then the value that the performance counter starts
75
  with immediately after is it rolls over is returned in StartValue. If
76
  EndValue is not NULL, then the value that the performance counter end with
77
  immediately before it rolls over is returned in EndValue. The 64-bit
78
  frequency of the performance counter in Hz is always returned. If StartValue
79
  is less than EndValue, then the performance counter counts up. If StartValue
80
  is greater than EndValue, then the performance counter counts down. For
81
  example, a 64-bit free running counter that counts up would have a StartValue
82
  of 0 and an EndValue of 0xFFFFFFFFFFFFFFFF. A 24-bit free running counter
83
  that counts down would have a StartValue of 0xFFFFFF and an EndValue of 0.
84
85
  @param  StartValue  The value the performance counter starts with when it
86
                      rolls over.
87
  @param  EndValue    The value that the performance counter ends with before
88
                      it rolls over.
89
90
  @return The frequency in Hz.
91
92
**/
93
UINT64
94
EFIAPI
95
GetPerformanceCounterProperties (
96
  OUT      UINT64                    *StartValue,  OPTIONAL
97
  OUT      UINT64                    *EndValue     OPTIONAL
98
  )
99
0
{
100
0
  return (UINT64)(-1);
101
0
}
102
103
/**
104
  Converts elapsed ticks of performance counter to time in nanoseconds.
105
106
  This function converts the elapsed ticks of running performance counter to
107
  time value in unit of nanoseconds.
108
109
  @param  Ticks     The number of elapsed ticks of running performance counter.
110
111
  @return The elapsed time in nanoseconds.
112
113
**/
114
UINT64
115
EFIAPI
116
GetTimeInNanoSecond (
117
  IN      UINT64                     Ticks
118
  )
119
0
{
120
0
  return 0;
121
0
}