]> git.proxmox.com Git - mirror_edk2.git/blame - EdkCompatibilityPkg/Foundation/Framework/Guid/DataHubRecords/DataHubSubClassMemory.h
Add a new line at the end of CpuLib.h for GCC build.
[mirror_edk2.git] / EdkCompatibilityPkg / Foundation / Framework / Guid / DataHubRecords / DataHubSubClassMemory.h
CommitLineData
3eb9473e 1/*++\r
2\r
3Copyright (c) 2004 - 2006, Intel Corporation \r
4All rights reserved. This program and the accompanying materials \r
5are licensed and made available under the terms and conditions of the BSD License \r
6which accompanies this distribution. The full text of the license may be found at \r
7http://opensource.org/licenses/bsd-license.php \r
8 \r
9THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, \r
10WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. \r
11\r
12Module Name:\r
13\r
14 DataHubSubClassMemory.h\r
15 \r
16Abstract:\r
17\r
18 Definitions for memory sub class data records\r
19\r
20Revision History\r
21\r
22--*/\r
23\r
24#ifndef _DATAHUB_SUBCLASS_MEMORY_H_\r
25#define _DATAHUB_SUBCLASS_MEMORY_H_\r
26\r
27#include EFI_GUID_DEFINITION (DataHubRecords)\r
28\r
29\r
30#define EFI_MEMORY_SUBCLASS_GUID \\r
31 {0x4E8F4EBB, 0x64B9, 0x4e05, 0x9B, 0x18, 0x4C, 0xFE, 0x49, 0x23, 0x50, 0x97}\r
32 \r
33#define EFI_MEMORY_SUBCLASS_VERSION 0x0100\r
34\r
35\r
36#define EFI_MEMORY_SIZE_RECORD_NUMBER 0x00000001\r
37\r
38typedef enum _EFI_MEMORY_REGION_TYPE {\r
39 EfiMemoryRegionMemory = 0x01,\r
40 EfiMemoryRegionReserved = 0x02,\r
41 EfiMemoryRegionAcpi = 0x03,\r
42 EfiMemoryRegionNvs = 0x04\r
43} EFI_MEMORY_REGION_TYPE;\r
44\r
45typedef struct {\r
46 UINT32 ProcessorNumber;\r
47 UINT16 StartBusNumber;\r
48 UINT16 EndBusNumber;\r
49 EFI_MEMORY_REGION_TYPE MemoryRegionType;\r
50 EFI_EXP_BASE2_DATA MemorySize;\r
51 EFI_PHYSICAL_ADDRESS MemoryStartAddress;\r
52} EFI_MEMORY_SIZE_DATA;\r
53\r
54\r
55#define EFI_MEMORY_ARRAY_LOCATION_RECORD_NUMBER 0x00000002\r
56\r
57typedef enum _EFI_MEMORY_ARRAY_LOCATION {\r
58 EfiMemoryArrayLocationOther = 0x01,\r
59 EfiMemoryArrayLocationUnknown = 0x02,\r
60 EfiMemoryArrayLocationSystemBoard = 0x03,\r
61 EfiMemoryArrayLocationIsaAddonCard = 0x04,\r
62 EfiMemoryArrayLocationEisaAddonCard = 0x05,\r
63 EfiMemoryArrayLocationPciAddonCard = 0x06,\r
64 EfiMemoryArrayLocationMcaAddonCard = 0x07,\r
65 EfiMemoryArrayLocationPcmciaAddonCard = 0x08,\r
66 EfiMemoryArrayLocationProprietaryAddonCard = 0x09,\r
67 EfiMemoryArrayLocationNuBus = 0x0A,\r
68 EfiMemoryArrayLocationPc98C20AddonCard = 0xA0,\r
69 EfiMemoryArrayLocationPc98C24AddonCard = 0xA1,\r
70 EfiMemoryArrayLocationPc98EAddonCard = 0xA2,\r
71 EfiMemoryArrayLocationPc98LocalBusAddonCard = 0xA3\r
72} EFI_MEMORY_ARRAY_LOCATION;\r
73\r
74typedef enum _EFI_MEMORY_ARRAY_USE {\r
75 EfiMemoryArrayUseOther = 0x01,\r
76 EfiMemoryArrayUseUnknown = 0x02,\r
77 EfiMemoryArrayUseSystemMemory = 0x03,\r
78 EfiMemoryArrayUseVideoMemory = 0x04,\r
79 EfiMemoryArrayUseFlashMemory = 0x05,\r
80 EfiMemoryArrayUseNonVolatileRam = 0x06,\r
81 EfiMemoryArrayUseCacheMemory = 0x07,\r
82} EFI_MEMORY_ARRAY_USE;\r
83\r
84typedef enum _EFI_MEMORY_ERROR_CORRECTION {\r
85 EfiMemoryErrorCorrectionOther = 0x01,\r
86 EfiMemoryErrorCorrectionUnknown = 0x02,\r
87 EfiMemoryErrorCorrectionNone = 0x03,\r
88 EfiMemoryErrorCorrectionParity = 0x04,\r
89 EfiMemoryErrorCorrectionSingleBitEcc = 0x05,\r
90 EfiMemoryErrorCorrectionMultiBitEcc = 0x06,\r
91 EfiMemoryErrorCorrectionCrc = 0x07,\r
92} EFI_MEMORY_ERROR_CORRECTION;\r
93\r
94typedef struct {\r
95 EFI_MEMORY_ARRAY_LOCATION MemoryArrayLocation;\r
96 EFI_MEMORY_ARRAY_USE MemoryArrayUse;\r
97 EFI_MEMORY_ERROR_CORRECTION MemoryErrorCorrection;\r
98 UINT32 MaximumMemoryCapacity;\r
99 UINT16 NumberMemoryDevices;\r
100} EFI_MEMORY_ARRAY_LOCATION_DATA;\r
101\r
102\r
103#define EFI_MEMORY_ARRAY_LINK_RECORD_NUMBER 0x00000003\r
104\r
105typedef enum _EFI_MEMORY_FORM_FACTOR {\r
106 EfiMemoryFormFactorOther = 0x01,\r
107 EfiMemoryFormFactorUnknown = 0x02,\r
108 EfiMemoryFormFactorSimm = 0x03,\r
109 EfiMemoryFormFactorSip = 0x04,\r
110 EfiMemoryFormFactorChip = 0x05,\r
111 EfiMemoryFormFactorDip = 0x06,\r
112 EfiMemoryFormFactorZip = 0x07,\r
113 EfiMemoryFormFactorProprietaryCard = 0x08,\r
114 EfiMemoryFormFactorDimm = 0x09,\r
115 EfiMemoryFormFactorTsop = 0x0A,\r
116 EfiMemoryFormFactorRowOfChips = 0x0B,\r
117 EfiMemoryFormFactorRimm = 0x0C,\r
118 EfiMemoryFormFactorSodimm = 0x0D,\r
119 EfiMemoryFormFactorSrimm = 0x0E,\r
120 EfiMemoryFormFactorFbDimm = 0x0F\r
121} EFI_MEMORY_FORM_FACTOR;\r
122\r
123typedef enum _EFI_MEMORY_ARRAY_TYPE {\r
124 EfiMemoryTypeOther = 0x01,\r
125 EfiMemoryTypeUnknown = 0x02,\r
126 EfiMemoryTypeDram = 0x03,\r
127 EfiMemoryTypeEdram = 0x04,\r
128 EfiMemoryTypeVram = 0x05,\r
129 EfiMemoryTypeSram = 0x06,\r
130 EfiMemoryTypeRam = 0x07,\r
131 EfiMemoryTypeRom = 0x08,\r
132 EfiMemoryTypeFlash = 0x09,\r
133 EfiMemoryTypeEeprom = 0x0A,\r
134 EfiMemoryTypeFeprom = 0x0B,\r
135 EfiMemoryTypeEprom = 0x0C,\r
136 EfiMemoryTypeCdram = 0x0D,\r
137 EfiMemoryType3Dram = 0x0E,\r
138 EfiMemoryTypeSdram = 0x0F,\r
139 EfiMemoryTypeSgram = 0x10,\r
140 EfiMemoryTypeRdram = 0x11,\r
141 EfiMemoryTypeDdr = 0x12,\r
142 EfiMemoryTypeDdr2 = 0x13,\r
143 EfiMemoryTypeDdr2FbDimm = 0x14\r
144} EFI_MEMORY_ARRAY_TYPE;\r
145\r
146typedef struct {\r
147 UINT32 Reserved :1;\r
148 UINT32 Other :1;\r
149 UINT32 Unknown :1;\r
150 UINT32 FastPaged :1;\r
151 UINT32 StaticColumn :1;\r
152 UINT32 PseudoStatic :1;\r
153 UINT32 Rambus :1;\r
154 UINT32 Synchronous :1;\r
155 UINT32 Cmos :1;\r
156 UINT32 Edo :1;\r
157 UINT32 WindowDram :1;\r
158 UINT32 CacheDram :1;\r
159 UINT32 Nonvolatile :1;\r
160 UINT32 Reserved1 :19;\r
161} EFI_MEMORY_TYPE_DETAIL;\r
162\r
163typedef enum {\r
164 EfiMemoryStateEnabled =0,\r
165 EfiMemoryStateUnknown,\r
166 EfiMemoryStateUnsupported,\r
167 EfiMemoryStateError,\r
168 EfiMemoryStateAbsent,\r
169 EfiMemoryStateDisabled,\r
170 EfiMemoryStatePartial\r
171} EFI_MEMORY_STATE;\r
172\r
173typedef struct {\r
174 EFI_STRING_TOKEN MemoryDeviceLocator;\r
175 EFI_STRING_TOKEN MemoryBankLocator;\r
176 EFI_STRING_TOKEN MemoryManufacturer;\r
177 EFI_STRING_TOKEN MemorySerialNumber;\r
178 EFI_STRING_TOKEN MemoryAssetTag;\r
179 EFI_STRING_TOKEN MemoryPartNumber;\r
180 EFI_INTER_LINK_DATA MemoryArrayLink;\r
181 EFI_INTER_LINK_DATA MemorySubArrayLink;\r
182 UINT16 MemoryTotalWidth;\r
183 UINT16 MemoryDataWidth;\r
184 UINT64 MemoryDeviceSize;\r
185 EFI_MEMORY_FORM_FACTOR MemoryFormFactor;\r
186 UINT8 MemoryDeviceSet;\r
187 EFI_MEMORY_ARRAY_TYPE MemoryType;\r
188 EFI_MEMORY_TYPE_DETAIL MemoryTypeDetail;\r
189 UINT16 MemorySpeed;\r
190 EFI_MEMORY_STATE MemoryState;\r
191} EFI_MEMORY_ARRAY_LINK;\r
192\r
193\r
194#define EFI_MEMORY_ARRAY_START_ADDRESS_RECORD_NUMBER 0x00000004\r
195\r
196typedef struct {\r
197 EFI_PHYSICAL_ADDRESS MemoryArrayStartAddress;\r
198 EFI_PHYSICAL_ADDRESS MemoryArrayEndAddress;\r
199 EFI_INTER_LINK_DATA PhysicalMemoryArrayLink;\r
200 UINT16 MemoryArrayPartitionWidth;\r
201} EFI_MEMORY_ARRAY_START_ADDRESS;\r
202\r
203\r
204#define EFI_MEMORY_DEVICE_START_ADDRESS_RECORD_NUMBER 0x00000005\r
205\r
206typedef struct {\r
207 EFI_PHYSICAL_ADDRESS MemoryDeviceStartAddress;\r
208 EFI_PHYSICAL_ADDRESS MemoryDeviceEndAddress;\r
209 EFI_INTER_LINK_DATA PhysicalMemoryDeviceLink;\r
210 EFI_INTER_LINK_DATA PhysicalMemoryArrayLink;\r
211 UINT8 MemoryDevicePartitionRowPosition;\r
212 UINT8 MemoryDeviceInterleavePosition;\r
213 UINT8 MemoryDeviceInterleaveDataDepth;\r
214} EFI_MEMORY_DEVICE_START_ADDRESS;\r
215\r
216\r
217//\r
218// Memory. Channel Device Type - SMBIOS Type 37\r
219//\r
220\r
221#define EFI_MEMORY_CHANNEL_TYPE_RECORD_NUMBER 0x00000006\r
222\r
223typedef enum _EFI_MEMORY_CHANNEL_TYPE {\r
224 EfiMemoryChannelTypeOther = 1,\r
225 EfiMemoryChannelTypeUnknown = 2,\r
226 EfiMemoryChannelTypeRambus = 3,\r
227 EfiMemoryChannelTypeSyncLink = 4\r
228} EFI_MEMORY_CHANNEL_TYPE;\r
229\r
230typedef struct {\r
231 EFI_MEMORY_CHANNEL_TYPE MemoryChannelType;\r
232 UINT8 MemoryChannelMaximumLoad;\r
233 UINT8 MemoryChannelDeviceCount;\r
234} EFI_MEMORY_CHANNEL_TYPE_DATA;\r
235\r
236#define EFI_MEMORY_CHANNEL_DEVICE_RECORD_NUMBER 0x00000007\r
237\r
238typedef struct {\r
239 UINT8 DeviceId;\r
240 EFI_INTER_LINK_DATA DeviceLink;\r
241 UINT8 MemoryChannelDeviceLoad;\r
242} EFI_MEMORY_CHANNEL_DEVICE_DATA;\r
243\r
244//\r
245// Memory. Controller Information - SMBIOS Type 5\r
246//\r
247#define EFI_MEMORY_CONTROLLER_INFORMATION_RECORD_NUMBER 0x00000008\r
248\r
249typedef enum { \r
250 EfiErrorDetectingMethodOther = 1,\r
251 EfiErrorDetectingMethodUnknown = 2,\r
252 EfiErrorDetectingMethodNone = 3,\r
253 EfiErrorDetectingMethodParity = 4,\r
254 EfiErrorDetectingMethod32Ecc = 5,\r
255 EfiErrorDetectingMethod64Ecc = 6,\r
256 EfiErrorDetectingMethod128Ecc = 7,\r
257 EfiErrorDetectingMethodCrc = 8\r
258} EFI_MEMORY_ERROR_DETECT_METHOD_TYPE;\r
259\r
260typedef struct {\r
261 UINT8 Other :1;\r
262 UINT8 Unknown :1;\r
263 UINT8 None :1;\r
264 UINT8 SingleBitErrorCorrect :1;\r
265 UINT8 DoubleBitErrorCorrect :1;\r
266 UINT8 ErrorScrubbing :1;\r
267 UINT8 Reserved :2;\r
268} EFI_MEMORY_ERROR_CORRECT_CAPABILITY;\r
269\r
270typedef enum { \r
271 EfiMemoryInterleaveOther = 1,\r
272 EfiMemoryInterleaveUnknown = 2,\r
273 EfiMemoryInterleaveOneWay = 3,\r
274 EfiMemoryInterleaveTwoWay = 4,\r
275 EfiMemoryInterleaveFourWay = 5,\r
276 EfiMemoryInterleaveEightWay = 6,\r
277 EfiMemoryInterleaveSixteenWay = 7\r
278} EFI_MEMORY_SUPPORT_INTERLEAVE_TYPE;\r
279\r
280typedef struct {\r
281 UINT16 Other :1;\r
282 UINT16 Unknown :1;\r
283 UINT16 SeventyNs :1;\r
284 UINT16 SixtyNs :1;\r
285 UINT16 FiftyNs :1;\r
286 UINT16 Reserved :11;\r
287} EFI_MEMORY_SPEED_TYPE;\r
288\r
289typedef struct {\r
290 UINT16 Other :1;\r
291 UINT16 Unknown :1;\r
292 UINT16 Standard :1;\r
293 UINT16 FastPageMode :1;\r
294 UINT16 EDO :1;\r
295 UINT16 Parity :1;\r
296 UINT16 ECC :1;\r
297 UINT16 SIMM :1;\r
298 UINT16 DIMM :1;\r
299 UINT16 BurstEdo :1;\r
300 UINT16 SDRAM :1;\r
301 UINT16 Reserved :5;\r
302} EFI_MEMORY_SUPPORTED_TYPE;\r
303\r
304typedef struct {\r
305 UINT8 Five :1;\r
306 UINT8 There :1;\r
307 UINT8 Two :1;\r
308 UINT8 Reserved :5;\r
309} EFI_MEMORY_MODULE_VOLTAGE_TYPE;\r
310\r
311typedef struct {\r
312 EFI_MEMORY_ERROR_DETECT_METHOD_TYPE ErrorDetectingMethod;\r
313 EFI_MEMORY_ERROR_CORRECT_CAPABILITY ErrorCorrectingCapability;\r
314 EFI_MEMORY_SUPPORT_INTERLEAVE_TYPE MemorySupportedInterleave;\r
315 EFI_MEMORY_SUPPORT_INTERLEAVE_TYPE MemoryCurrentInterleave;\r
316 UINT8 MaxMemoryModuleSize;\r
317 EFI_MEMORY_SPEED_TYPE MemorySpeedType;\r
318 EFI_MEMORY_SUPPORTED_TYPE MemorySupportedType;\r
319 EFI_MEMORY_MODULE_VOLTAGE_TYPE MemoryModuleVoltage;\r
320 UINT8 NumberofMemorySlot;\r
321 EFI_MEMORY_ERROR_CORRECT_CAPABILITY EnabledCorrectingCapability;\r
322 UINT16 *MemoryModuleConfigHandles;\r
323} EFI_MEMORY_CONTROLLER_INFORMATION;\r
324\r
325//\r
326// Memory. Error Information - SMBIOS Type 18\r
327//\r
328#define EFI_MEMORY_32BIT_ERROR_INFORMATION_RECORD_NUMBER 0x00000009\r
329\r
330typedef enum { \r
331 EfiMemoryErrorOther = 1,\r
332 EfiMemoryErrorUnknown = 2,\r
333 EfiMemoryErrorOk = 3,\r
334 EfiMemoryErrorBadRead = 4,\r
335 EfiMemoryErrorParity = 5,\r
336 EfiMemoryErrorSigleBit = 6,\r
337 EfiMemoryErrorDoubleBit = 7,\r
338 EfiMemoryErrorMultiBit = 8,\r
339 EfiMemoryErrorNibble = 9,\r
340 EfiMemoryErrorChecksum = 10,\r
341 EfiMemoryErrorCrc = 11,\r
342 EfiMemoryErrorCorrectSingleBit = 12,\r
343 EfiMemoryErrorCorrected = 13,\r
344 EfiMemoryErrorUnCorrectable = 14\r
345} EFI_MEMORY_ERROR_TYPE;\r
346\r
347typedef enum { \r
348 EfiMemoryGranularityOther = 1,\r
349 EfiMemoryGranularityOtherUnknown = 2,\r
350 EfiMemoryGranularityDeviceLevel = 3,\r
351 EfiMemoryGranularityMemPartitionLevel = 4\r
352} EFI_MEMORY_ERROR_GRANULARITY_TYPE;\r
353\r
354typedef enum { \r
355 EfiMemoryErrorOperationOther = 1,\r
356 EfiMemoryErrorOperationUnknown = 2,\r
357 EfiMemoryErrorOperationRead = 3,\r
358 EfiMemoryErrorOperationWrite = 4,\r
359 EfiMemoryErrorOperationPartialWrite = 5\r
360} EFI_MEMORY_ERROR_OPERATION_TYPE;\r
361\r
362typedef struct {\r
363 EFI_MEMORY_ERROR_TYPE MemoryErrorType;\r
364 EFI_MEMORY_ERROR_GRANULARITY_TYPE MemoryErrorGranularity;\r
365 EFI_MEMORY_ERROR_OPERATION_TYPE MemoryErrorOperation;\r
366 UINT32 VendorSyndrome;\r
367 UINT32 MemoryArrayErrorAddress;\r
368 UINT32 DeviceErrorAddress;\r
369 UINT32 DeviceErrorResolution;\r
370} EFI_MEMORY_32BIT_ERROR_INFORMATION;\r
371\r
372//\r
373// Memory. Error Information - SMBIOS Type 33\r
374//\r
375#define EFI_MEMORY_64BIT_ERROR_INFORMATION_RECORD_NUMBER 0x0000000A\r
376\r
377typedef struct {\r
378 EFI_MEMORY_ERROR_TYPE MemoryErrorType;\r
379 EFI_MEMORY_ERROR_GRANULARITY_TYPE MemoryErrorGranularity;\r
380 EFI_MEMORY_ERROR_OPERATION_TYPE MemoryErrorOperation;\r
381 UINT32 VendorSyndrome;\r
382 UINT64 MemoryArrayErrorAddress;\r
383 UINT64 DeviceErrorAddress;\r
384 UINT32 DeviceErrorResolution;\r
385} EFI_MEMORY_64BIT_ERROR_INFORMATION;\r
386\r
387\r
388typedef union _EFI_MEMORY_SUBCLASS_RECORDS {\r
389 EFI_MEMORY_SIZE_DATA SizeData;\r
390 EFI_MEMORY_ARRAY_LOCATION_DATA ArrayLocationData;\r
391 EFI_MEMORY_ARRAY_LINK ArrayLink;\r
392 EFI_MEMORY_ARRAY_START_ADDRESS ArrayStartAddress;\r
393 EFI_MEMORY_DEVICE_START_ADDRESS DeviceStartAddress;\r
394 EFI_MEMORY_CHANNEL_TYPE_DATA ChannelTypeData;\r
395 EFI_MEMORY_CHANNEL_DEVICE_DATA ChannelDeviceData;\r
396 EFI_MEMORY_CONTROLLER_INFORMATION MemoryControllerInfo;\r
397 EFI_MEMORY_32BIT_ERROR_INFORMATION Memory32bitErrorInfo;\r
398 EFI_MEMORY_64BIT_ERROR_INFORMATION Memory64bitErrorInfo;\r
399} EFI_MEMORY_SUBCLASS_RECORDS;\r
400\r
401typedef struct {\r
402 EFI_SUBCLASS_TYPE1_HEADER Header;\r
403 EFI_MEMORY_SUBCLASS_RECORDS Record;\r
404} EFI_MEMORY_SUBCLASS_DRIVER_DATA;\r
405\r
406\r
407\r
408#endif\r