summaryrefslogtreecommitdiff
path: root/Core/CORE_DXE/EfiPerf.h
blob: c5d16379bfaa2ac9bb683fb944dde6e7a1c55347 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
//**********************************************************************
//**********************************************************************
//**                                                                  **
//**        (C)Copyright 1985-2008, American Megatrends, Inc.         **
//**                                                                  **
//**                       All Rights Reserved.                       **
//**                                                                  **
//**             6145-F Northbelt Pkwy, Norcross, GA 30071            **
//**                                                                  **
//**                       Phone: (770)-246-8600                      **
//**                                                                  **
//**********************************************************************
//**********************************************************************

//**********************************************************************
// $Header: /Alaska/SOURCE/Core/EDK/DxeMain/EfiPerf.h 3     5/06/08 10:07a Felixp $
//
// $Revision: 3 $
//
// $Date: 5/06/08 10:07a $
//**********************************************************************
// Revision History
// ----------------
// $Log: /Alaska/SOURCE/Core/EDK/DxeMain/EfiPerf.h $
// 
// 3     5/06/08 10:07a Felixp
// 
// 2     5/05/08 4:12p Felixp
// 
//**********************************************************************
//<AMI_FHDR_START>
//
// Name:	EfiPerf.h
//
// Description:	This file provides performance API definitions used by DXE Core.
//
//<AMI_FHDR_END>
//**********************************************************************
#ifndef _EFI_PERF_H_
#define _EFI_PERF_H_

#include <AmiDxeLib.h>
#include <Protocol/Performance.h>

#define DXE_PHASE 0
#define SHELL_PHASE 1
#define PEI_PHASE 2

EFI_STATUS
GetTimerValue (
  OUT UINT64    *TimerValue
  );

EFI_STATUS
InitializePerformanceInfrastructure (
  IN EFI_HANDLE         ImageHandle,
  IN EFI_SYSTEM_TABLE   *SystemTable,
  IN UINT64             Ticker
  );

EFI_STATUS
UpdateMeasure (
  IN EFI_HANDLE      Handle,
  IN UINT16          *Token,
  IN UINT16          *Host,
  IN EFI_HANDLE      HandleNew,
  IN UINT16          *TokenNew,
  IN UINT16          *HostNew
  );

#ifdef EFI_DXE_PERFORMANCE
#define PERF_ENABLE(handle, table, ticker)      InitializePerformanceInfrastructure (handle, table, ticker)
#define PERF_UPDATE(handle, token, host, handlenew, tokennew, hostnew) \
  UpdateMeasure (handle, \
                 token, \
                 host, \
                 handlenew, \
                 tokennew, \
                 hostnew \
      )
#else
#define PERF_ENABLE(handle, table, ticker)
#define PERF_UPDATE(handle, token, host, handlenew, tokennew, hostnew)
#endif

#endif
//**********************************************************************
//**********************************************************************
//**                                                                  **
//**        (C)Copyright 1985-2008, American Megatrends, Inc.         **
//**                                                                  **
//**                       All Rights Reserved.                       **
//**                                                                  **
//**             6145-F Northbelt Pkwy, Norcross, GA 30071            **
//**                                                                  **
//**                       Phone: (770)-246-8600                      **
//**                                                                  **
//**********************************************************************
//**********************************************************************