summaryrefslogtreecommitdiff
path: root/Include/ACPI50.h
blob: 56a2dd20a4e77ca56eb0995e434584e8bf165900 (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
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
//**********************************************************************
//**********************************************************************
//**                                                                  **
//**        (C)Copyright 1985-2010, American Megatrends, Inc.         **
//**                                                                  **
//**                       All Rights Reserved.                       **
//**                                                                  **
//**      5555 Oakbrook Parkway, Suite 200, Norcross, GA 30093        **
//**                                                                  **
//**                       Phone: (770)-246-8600                      **
//**                                                                  **
//**********************************************************************
//**********************************************************************

//**********************************************************************
// $Header: /Alaska/BIN/Core/Include/ACPI50.h 3     6/11/12 4:24p Oleksiyy $
//
// $Revision: 3 $
//
// $Date: 6/11/12 4:24p $
//**********************************************************************
// Revision History
// ----------------
// $Log: /Alaska/BIN/Core/Include/ACPI50.h $
// 
// 3     6/11/12 4:24p Oleksiyy
// [TAG]  		EIP88889
// [Category]  	Improvement
// [Description]  	FACP ver 5.0 structure added.
// [Files]  		ACPI50.h, AcpiCore.c
// 
// 2     12/01/11 2:54p Oleksiyy
// [TAG]  		EIP76919
// [Category]  	Bug Fix
// [Severity]  	Normal
// [Symptom]  	ACPI Performance Table is in incorrect location due to
// compiler assumption
// [RootCause]  	Structure alligment.
// [Solution]  	pragma pack added to structure declaration.
// [Files]  		ACPI50.h
// 
// 1     11/11/11 4:10p Oleksiyy
// [TAG]  		EIP64296 
// [Category]  	New Feature
// [Description]  	Creation and filling of Firmware Performance Data Table
// is added. FirmPerfDataTab.h renamed to ACPI50.h
// [Files]  		AcpiCore.c, EfiLib.c, S3Resume.c and ACPI50.h added.
// 
// 6     1/13/10 2:13p Felixp
// 
//**********************************************************************
//<AMI_FHDR_START>
//
// Name:  <ACPI50.h>
//
// Description: Defenitions introduced in ACPI 5.0
//
//<AMI_FHDR_END>
//**********************************************************************
#ifndef __ACPI50__H__
#define __ACPI50__H__
#ifdef __cplusplus
extern "C" {
#endif
#include <ACPI30.h>
#pragma	pack(push, 1)
#define FPDT_SIG 0x54445046  //"FPDT" Firmware Performance Data Table
#define EFI_FPDT_VARIABLE   L"FPDT_Variable"

typedef	struct _EFI_FPDT_STRUCTURE {
    EFI_PHYSICAL_ADDRESS    S3Pointer;
    EFI_PHYSICAL_ADDRESS    BasBootPointer;
    UINT64                  NanoFreq;
} EFI_FPDT_STRUCTURE;

typedef	struct _FPDT_PERF_RECORD {	
	UINT16			        PerfRecType;		//0
	UINT8			        Length;				//2
	UINT8			        Revision;			//3
	UINT32                  Reserved;           //4
    EFI_PHYSICAL_ADDRESS    Pointer;            //8
} FPDT_PERF_RECORD,*PFPDT_PERF_RECORD;

typedef struct _FPDT_50 {
	ACPI_HDR		    Header;
	FPDT_PERF_RECORD    BasS3Rec; 
    FPDT_PERF_RECORD    BasBootRec; 		
} FPDT_50,*PFPDT_50;

typedef	struct _PERF_TAB_HEADER {	
	UINT32			        Signature;		    //0
	UINT32			        Length;			    //4        
} PERF_TAB_HEADER,*PPERF_TAB_HEADER;

typedef	struct _PERF_REC_HEADER {	
	UINT16			        PerfRecType;		//0
	UINT8			        RecLength;			//2
    UINT8                   Revision;           //3
} PERF_REC_HEADER,*PPERF_REC_HEADER;

typedef struct _BASIC_S3_RESUME_PERF_REC {
	PERF_REC_HEADER			Header;             //0
	UINT32			        ResumeCount;		//4
	UINT64			        FullResume;			//8
    UINT64                  AverageResume;      //16
} BASIC_S3_RESUME_PERF_REC,*PBASIC_S3_RESUME_PERF_REC;

typedef struct _BASIC_S3_SUSPEND_PERF_REC {
	PERF_REC_HEADER			Header;             //0
	UINT64			        SuspendStart;		//4
	UINT64			        SuspendEnd;			//12
} BASIC_S3_SUSPEND_PERF_REC,*PBASIC_S3_SUSPEND_PERF_REC;

typedef struct _BASIC_BOOT_PERF_REC {
	PERF_REC_HEADER			Header;                     //0
	UINT32			        Reserved;		            //4
	UINT64			        ResetEnd;			        //8
    UINT64                  OsLoaderLoadImageStart;     //16
    UINT64                  OsLoaderStartImageStart;    //24
    UINT64                  ExitBootServicesEntry;      //32
    UINT64                  ExitBootServicesExit;       //40
} BASIC_BOOT_PERF_REC,*PBASIC_BOOT_PERF_REC;

//======================================================
//  FADT Fixed ACPI Description Table 
//======================================================
typedef struct _FACP_50 {
   	ACPI_HDR Header;              //0..35
   	UINT32		FIRMWARE_CTRL;       //36  Phisical memory address (0-4G) of FACS
   	UINT32		DSDT;                //40  Phisical memory address (0-4G) of DSDT
   	UINT8		Reserved1;			 //44  (Was INT_MODEL 0 Dual PIC;1 Multipy APIC) 
									 //	   can be 0 or 1 for ACPI 1.0  
   	UINT8  		PM_PPROF;			 //45  Preffered PM Profile (was Reserved)
   	UINT16		SCI_INT;             //46  SCI int Pin should be Shareble/Level/Act Low

   	UINT32		SMI_CMD;             //48  Port Addr of ACPI Command reg
   	UINT8		ACPI_ENABLE_CMD;         //52  Value to write in SMI_CMD reg
	UINT8		ACPI_DISABLE_CMD;        //53  Value to write in SMI_CMD reg    
	UINT8		S4BIOS_REQ;          //54  Value to write in SMI_CMD reg
   	UINT8		PSTATE_CNT;          //55  Was Reserved2 now 
									 //	   Value that OSPM writes in SCI_CMD to assume 
									 //	   Processor Perfomance State control responsibility
   	UINT32		PM1a_EVT_BLK;        //56
   	UINT32		PM1b_EVT_BLK;        //60
   	UINT32		PM1a_CNT_BLK;        //64
   	UINT32		PM1b_CNT_BLK;        //68
   	UINT32		PM2_CNT_BLK;         //72
   	UINT32		PM_TMR_BLK;          //76
   	UINT32		GPE0_BLK;            //80
   	UINT32		GPE1_BLK;            //84    
	UINT8		PM1_EVT_LEN;         //88
   	UINT8		PM1_CNT_LEN;         //89
   	UINT8		PM2_CNT_LEN;         //90
   	UINT8		PM_TM_LEN;           //91
   	UINT8		GPE0_BLK_LEN;        //92
   	UINT8		GPE1_BLK_LEN;        //93
   	UINT8		GPE1_BASE;           //94
   	UINT8		CST_CNT;			 //95 Was Reserved3 
   	UINT16		P_LVL2_LAT;          //96
   	UINT16		P_LVL3_LAT;          //98
   	UINT16		FLUSH_SIZE;          //100
   	UINT16		FLUSH_STRIDE;        //102
   	UINT8		DUTY_OFFSET;         //104
   	UINT8		DUTY_WIDTH;          //105
   	UINT8		DAY_ALRM;            //106
   	UINT8		MON_ALRM;            //107
   	UINT8		CENTURY;             //108
   	UINT16		IAPC_BOOT_ARCH;      //109	
	UINT8		Reserved2;           //111    
   	UINT32		FLAGS;               //112
//That was 32 bit part of a FADT Here follows 64bit part
	GAS_30			RESET_REG;			 //116
	UINT8		RESET_VAL;			 //128
	UINT8		Reserved[3];		 //129
   	UINT64		X_FIRMWARE_CTRL;     //132  Phisical memory address (0-4G) of FACS
   	UINT64		X_DSDT;              //140  Phisical memory address (0-4G) of DSDT
   	GAS_30	    X_PM1a_EVT_BLK;      //148
   	GAS_30		X_PM1b_EVT_BLK;      //160
   	GAS_30		X_PM1a_CNT_BLK;      //172
   	GAS_30		X_PM1b_CNT_BLK;      //184
   	GAS_30		X_PM2_CNT_BLK;       //196
   	GAS_30		X_PM_TMR_BLK;        //208
 	GAS_30		X_GPE0_BLK;          //220
   	GAS_30		X_GPE1_BLK;          //232    
    GAS_30		SLEEP_CONTROL_REG;   //244
    GAS_30		SLEEP_STATUS_REG;    //256
    
}FACP_50,*PFACP_50;

#pragma pack(pop)
/****** DO NOT WRITE BELOW THIS LINE *******/
#ifdef __cplusplus
}
#endif
#endif
//**********************************************************************
//**********************************************************************
//**                                                                  **
//**        (C)Copyright 1985-2010, American Megatrends, Inc.         **
//**                                                                  **
//**                       All Rights Reserved.                       **
//**                                                                  **
//**      5555 Oakbrook Parkway, Suite 200, Norcross, GA 30093        **
//**                                                                  **
//**                       Phone: (770)-246-8600                      **
//**                                                                  **
//**********************************************************************
//**********************************************************************