hc
2024-03-25 edb30157bad0c0001c32b854271ace01d3b9a16a
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
/*++
 
  Copyright (c) 2004  - 2014, Intel Corporation. All rights reserved.<BR>
                                                                                   
  SPDX-License-Identifier: BSD-2-Clause-Patent
 
                                                                                   
 
 
 
Module Name:
 
  EnhancedSpeedstep.h
 
Abstract:
 
  Enhanced Speedstep protocol
 
  The Enhanced Speedstep Protocol support.
 
**/
 
#ifndef _ENHANCED_SPEEDSTEP_H_
#define _ENHANCED_SPEEDSTEP_H_
 
#define ENHANCED_SPEEDSTEP_PROTOCOL_GUID \
  { \
    0x91a1ddcf, 0x5374, 0x4939, 0x89, 0x51, 0xd7, 0x29, 0x3f, 0x1a, 0x78, 0x6f \
  }
 
typedef struct _ENHANCED_SPEEDSTEP_PROTOCOL ENHANCED_SPEEDSTEP_PROTOCOL;
 
typedef struct {
  UINT8   Version;      // EIST State format
  UINT8   Size;         // Size of element
  UINT32  RatioStep;    // Step
  UINT32  MinRatio;     // Calculated min ratio
  UINT32  MaxRatio;     // Calculated max ratio
  UINT32  MinCoreFreq;  // Calculated min freq
  UINT32  MaxCoreFreq;  // Calculated max freq
  UINT32  MinPower;     // Calculated min power
  UINT32  MaxPower;     // Calculated max power
  UINT32  NumStates;    // Number of states
} EIST_INFORMATION;
 
typedef struct {
  UINT32  CoreFrequency;
  UINT32  Power;
  UINT32  TransitionLatency;
  UINT32  BusMasterLatency;
  UINT32  Control;
  UINT32  Status;
} EFI_ACPI_CPU_PSS_STATE;
 
typedef
EFI_STATUS
(EFIAPI *GET_EIST_TABLE) (
  IN    ENHANCED_SPEEDSTEP_PROTOCOL    *This,
  OUT   EIST_INFORMATION               **EistInformation,
  OUT   VOID                           **PssStates
  );
 
struct _ENHANCED_SPEEDSTEP_PROTOCOL {
  UINT32              ProcApicId;
  GET_EIST_TABLE      GetEistTable;
};
 
//
// There will be an instance of this protocol for every processor
// in the system.  ProcNumber is used to manage all the different
// processors in the system and passed into the MP protocol
// to run code streams on application processors
//
extern EFI_GUID gEnhancedSpeedstepProtocolGuid;
 
#endif