]> git.proxmox.com Git - mirror_edk2.git/blame - EdkCompatibilityPkg/Foundation/Framework/Guid/DataHubRecords/DataHubSubClassMemory.h
Update the copyright notice format
[mirror_edk2.git] / EdkCompatibilityPkg / Foundation / Framework / Guid / DataHubRecords / DataHubSubClassMemory.h
CommitLineData
3eb9473e 1/*++\r
2\r
f57387d5
HT
3Copyright (c) 2004 - 2007, Intel Corporation. All rights reserved.<BR>\r
4This program and the accompanying materials \r
3eb9473e 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
7ccf38a3 31 {0x4E8F4EBB, 0x64B9, 0x4e05, {0x9B, 0x18, 0x4C, 0xFE, 0x49, 0x23, 0x50, 0x97}}\r
3eb9473e 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
4cb43192 81 EfiMemoryArrayUseCacheMemory = 0x07\r
3eb9473e 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
4cb43192 91 EfiMemoryErrorCorrectionCrc = 0x07\r
3eb9473e 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
2c40a813 191 UINT8 MemoryAttributes;\r
3eb9473e 192} EFI_MEMORY_ARRAY_LINK;\r
193\r
194\r
195#define EFI_MEMORY_ARRAY_START_ADDRESS_RECORD_NUMBER 0x00000004\r
196\r
197typedef struct {\r
198 EFI_PHYSICAL_ADDRESS MemoryArrayStartAddress;\r
199 EFI_PHYSICAL_ADDRESS MemoryArrayEndAddress;\r
200 EFI_INTER_LINK_DATA PhysicalMemoryArrayLink;\r
201 UINT16 MemoryArrayPartitionWidth;\r
202} EFI_MEMORY_ARRAY_START_ADDRESS;\r
203\r
204\r
205#define EFI_MEMORY_DEVICE_START_ADDRESS_RECORD_NUMBER 0x00000005\r
206\r
207typedef struct {\r
208 EFI_PHYSICAL_ADDRESS MemoryDeviceStartAddress;\r
209 EFI_PHYSICAL_ADDRESS MemoryDeviceEndAddress;\r
210 EFI_INTER_LINK_DATA PhysicalMemoryDeviceLink;\r
211 EFI_INTER_LINK_DATA PhysicalMemoryArrayLink;\r
212 UINT8 MemoryDevicePartitionRowPosition;\r
213 UINT8 MemoryDeviceInterleavePosition;\r
214 UINT8 MemoryDeviceInterleaveDataDepth;\r
215} EFI_MEMORY_DEVICE_START_ADDRESS;\r
216\r
217\r
218//\r
219// Memory. Channel Device Type - SMBIOS Type 37\r
220//\r
221\r
222#define EFI_MEMORY_CHANNEL_TYPE_RECORD_NUMBER 0x00000006\r
223\r
224typedef enum _EFI_MEMORY_CHANNEL_TYPE {\r
225 EfiMemoryChannelTypeOther = 1,\r
226 EfiMemoryChannelTypeUnknown = 2,\r
227 EfiMemoryChannelTypeRambus = 3,\r
228 EfiMemoryChannelTypeSyncLink = 4\r
229} EFI_MEMORY_CHANNEL_TYPE;\r
230\r
231typedef struct {\r
232 EFI_MEMORY_CHANNEL_TYPE MemoryChannelType;\r
233 UINT8 MemoryChannelMaximumLoad;\r
234 UINT8 MemoryChannelDeviceCount;\r
235} EFI_MEMORY_CHANNEL_TYPE_DATA;\r
236\r
237#define EFI_MEMORY_CHANNEL_DEVICE_RECORD_NUMBER 0x00000007\r
238\r
239typedef struct {\r
240 UINT8 DeviceId;\r
241 EFI_INTER_LINK_DATA DeviceLink;\r
242 UINT8 MemoryChannelDeviceLoad;\r
243} EFI_MEMORY_CHANNEL_DEVICE_DATA;\r
244\r
245//\r
246// Memory. Controller Information - SMBIOS Type 5\r
247//\r
248#define EFI_MEMORY_CONTROLLER_INFORMATION_RECORD_NUMBER 0x00000008\r
249\r
250typedef enum { \r
251 EfiErrorDetectingMethodOther = 1,\r
252 EfiErrorDetectingMethodUnknown = 2,\r
253 EfiErrorDetectingMethodNone = 3,\r
254 EfiErrorDetectingMethodParity = 4,\r
255 EfiErrorDetectingMethod32Ecc = 5,\r
256 EfiErrorDetectingMethod64Ecc = 6,\r
257 EfiErrorDetectingMethod128Ecc = 7,\r
258 EfiErrorDetectingMethodCrc = 8\r
259} EFI_MEMORY_ERROR_DETECT_METHOD_TYPE;\r
260\r
261typedef struct {\r
262 UINT8 Other :1;\r
263 UINT8 Unknown :1;\r
264 UINT8 None :1;\r
265 UINT8 SingleBitErrorCorrect :1;\r
266 UINT8 DoubleBitErrorCorrect :1;\r
267 UINT8 ErrorScrubbing :1;\r
268 UINT8 Reserved :2;\r
269} EFI_MEMORY_ERROR_CORRECT_CAPABILITY;\r
270\r
271typedef enum { \r
272 EfiMemoryInterleaveOther = 1,\r
273 EfiMemoryInterleaveUnknown = 2,\r
274 EfiMemoryInterleaveOneWay = 3,\r
275 EfiMemoryInterleaveTwoWay = 4,\r
276 EfiMemoryInterleaveFourWay = 5,\r
277 EfiMemoryInterleaveEightWay = 6,\r
278 EfiMemoryInterleaveSixteenWay = 7\r
279} EFI_MEMORY_SUPPORT_INTERLEAVE_TYPE;\r
280\r
281typedef struct {\r
282 UINT16 Other :1;\r
283 UINT16 Unknown :1;\r
284 UINT16 SeventyNs :1;\r
285 UINT16 SixtyNs :1;\r
286 UINT16 FiftyNs :1;\r
287 UINT16 Reserved :11;\r
288} EFI_MEMORY_SPEED_TYPE;\r
289\r
290typedef struct {\r
291 UINT16 Other :1;\r
292 UINT16 Unknown :1;\r
293 UINT16 Standard :1;\r
294 UINT16 FastPageMode :1;\r
295 UINT16 EDO :1;\r
296 UINT16 Parity :1;\r
297 UINT16 ECC :1;\r
298 UINT16 SIMM :1;\r
299 UINT16 DIMM :1;\r
300 UINT16 BurstEdo :1;\r
301 UINT16 SDRAM :1;\r
302 UINT16 Reserved :5;\r
303} EFI_MEMORY_SUPPORTED_TYPE;\r
304\r
305typedef struct {\r
306 UINT8 Five :1;\r
307 UINT8 There :1;\r
308 UINT8 Two :1;\r
309 UINT8 Reserved :5;\r
310} EFI_MEMORY_MODULE_VOLTAGE_TYPE;\r
311\r
312typedef struct {\r
313 EFI_MEMORY_ERROR_DETECT_METHOD_TYPE ErrorDetectingMethod;\r
314 EFI_MEMORY_ERROR_CORRECT_CAPABILITY ErrorCorrectingCapability;\r
315 EFI_MEMORY_SUPPORT_INTERLEAVE_TYPE MemorySupportedInterleave;\r
316 EFI_MEMORY_SUPPORT_INTERLEAVE_TYPE MemoryCurrentInterleave;\r
317 UINT8 MaxMemoryModuleSize;\r
318 EFI_MEMORY_SPEED_TYPE MemorySpeedType;\r
319 EFI_MEMORY_SUPPORTED_TYPE MemorySupportedType;\r
320 EFI_MEMORY_MODULE_VOLTAGE_TYPE MemoryModuleVoltage;\r
321 UINT8 NumberofMemorySlot;\r
322 EFI_MEMORY_ERROR_CORRECT_CAPABILITY EnabledCorrectingCapability;\r
323 UINT16 *MemoryModuleConfigHandles;\r
324} EFI_MEMORY_CONTROLLER_INFORMATION;\r
325\r
326//\r
327// Memory. Error Information - SMBIOS Type 18\r
328//\r
329#define EFI_MEMORY_32BIT_ERROR_INFORMATION_RECORD_NUMBER 0x00000009\r
330\r
331typedef enum { \r
332 EfiMemoryErrorOther = 1,\r
333 EfiMemoryErrorUnknown = 2,\r
334 EfiMemoryErrorOk = 3,\r
335 EfiMemoryErrorBadRead = 4,\r
336 EfiMemoryErrorParity = 5,\r
337 EfiMemoryErrorSigleBit = 6,\r
338 EfiMemoryErrorDoubleBit = 7,\r
339 EfiMemoryErrorMultiBit = 8,\r
340 EfiMemoryErrorNibble = 9,\r
341 EfiMemoryErrorChecksum = 10,\r
342 EfiMemoryErrorCrc = 11,\r
343 EfiMemoryErrorCorrectSingleBit = 12,\r
344 EfiMemoryErrorCorrected = 13,\r
345 EfiMemoryErrorUnCorrectable = 14\r
346} EFI_MEMORY_ERROR_TYPE;\r
347\r
348typedef enum { \r
349 EfiMemoryGranularityOther = 1,\r
350 EfiMemoryGranularityOtherUnknown = 2,\r
351 EfiMemoryGranularityDeviceLevel = 3,\r
352 EfiMemoryGranularityMemPartitionLevel = 4\r
353} EFI_MEMORY_ERROR_GRANULARITY_TYPE;\r
354\r
355typedef enum { \r
356 EfiMemoryErrorOperationOther = 1,\r
357 EfiMemoryErrorOperationUnknown = 2,\r
358 EfiMemoryErrorOperationRead = 3,\r
359 EfiMemoryErrorOperationWrite = 4,\r
360 EfiMemoryErrorOperationPartialWrite = 5\r
361} EFI_MEMORY_ERROR_OPERATION_TYPE;\r
362\r
363typedef struct {\r
364 EFI_MEMORY_ERROR_TYPE MemoryErrorType;\r
365 EFI_MEMORY_ERROR_GRANULARITY_TYPE MemoryErrorGranularity;\r
366 EFI_MEMORY_ERROR_OPERATION_TYPE MemoryErrorOperation;\r
367 UINT32 VendorSyndrome;\r
368 UINT32 MemoryArrayErrorAddress;\r
369 UINT32 DeviceErrorAddress;\r
370 UINT32 DeviceErrorResolution;\r
371} EFI_MEMORY_32BIT_ERROR_INFORMATION;\r
372\r
373//\r
374// Memory. Error Information - SMBIOS Type 33\r
375//\r
376#define EFI_MEMORY_64BIT_ERROR_INFORMATION_RECORD_NUMBER 0x0000000A\r
377\r
378typedef struct {\r
379 EFI_MEMORY_ERROR_TYPE MemoryErrorType;\r
380 EFI_MEMORY_ERROR_GRANULARITY_TYPE MemoryErrorGranularity;\r
381 EFI_MEMORY_ERROR_OPERATION_TYPE MemoryErrorOperation;\r
382 UINT32 VendorSyndrome;\r
383 UINT64 MemoryArrayErrorAddress;\r
384 UINT64 DeviceErrorAddress;\r
385 UINT32 DeviceErrorResolution;\r
386} EFI_MEMORY_64BIT_ERROR_INFORMATION;\r
387\r
388\r
389typedef union _EFI_MEMORY_SUBCLASS_RECORDS {\r
390 EFI_MEMORY_SIZE_DATA SizeData;\r
391 EFI_MEMORY_ARRAY_LOCATION_DATA ArrayLocationData;\r
392 EFI_MEMORY_ARRAY_LINK ArrayLink;\r
393 EFI_MEMORY_ARRAY_START_ADDRESS ArrayStartAddress;\r
394 EFI_MEMORY_DEVICE_START_ADDRESS DeviceStartAddress;\r
395 EFI_MEMORY_CHANNEL_TYPE_DATA ChannelTypeData;\r
396 EFI_MEMORY_CHANNEL_DEVICE_DATA ChannelDeviceData;\r
397 EFI_MEMORY_CONTROLLER_INFORMATION MemoryControllerInfo;\r
398 EFI_MEMORY_32BIT_ERROR_INFORMATION Memory32bitErrorInfo;\r
399 EFI_MEMORY_64BIT_ERROR_INFORMATION Memory64bitErrorInfo;\r
400} EFI_MEMORY_SUBCLASS_RECORDS;\r
401\r
402typedef struct {\r
403 EFI_SUBCLASS_TYPE1_HEADER Header;\r
404 EFI_MEMORY_SUBCLASS_RECORDS Record;\r
405} EFI_MEMORY_SUBCLASS_DRIVER_DATA;\r
406\r
407\r
408\r
409#endif\r