22#define CXL_DVSEC_ID_PCIE_DVSEC_FOR_CXL_DEVICE 0x0
23#define CXL_DVSEC_ID_NON_CXL_FUNCTION_MAP 0x2
24#define CXL_DVSEC_ID_CXL20_EXTENSIONS_DVSEC_FOR_PORTS 0x3
25#define CXL_DVSEC_ID_GPF_DVSEC_FOR_CXL_PORTS 0x4
26#define CXL_DVSEC_ID_GPF_DVSEC_FOR_CXL_DEVICES 0x5
27#define CXL_DVSEC_ID_PCIE_DVSEC_FOR_FLEX_BUS_PORT 0x7
28#define CXL_DVSEC_ID_REGISTER_LOCATOR 0x8
29#define CXL_DVSEC_ID_MLD 0x9
30#define CXL_DVSEC_ID_PCIE_DVSEC_FOR_TEST_CAPABILITY 0xA
36#define CXL_REGISTER_BLOCK_ID_EMPTY 0x0
37#define CXL_REGISTER_BLOCK_ID_COMPONENT 0x1
38#define CXL_REGISTER_BLOCK_ID_BAR_VIRTUALIZATION_ACL 0x2
39#define CXL_REGISTER_BLOCK_ID_DEVICE 0x3
61#define CXL_COMPONENT_REGISTER_RANGE_OFFSET_IO 0x0
62#define CXL_COMPONENT_REGISTER_RANGE_OFFSET_CACHE_MEM 0x1000
63#define CXL_COMPONENT_REGISTER_RANGE_OFFSET_ARB_MUX 0xE000
69#define CXL_CACHE_MEM_CAPABILITY_ID_CXL 0x1
70#define CXL_CACHE_MEM_CAPABILITY_ID_RAS 0x2
71#define CXL_CACHE_MEM_CAPABILITY_ID_SECURITY 0x3
72#define CXL_CACHE_MEM_CAPABILITY_ID_LINK 0x4
73#define CXL_CACHE_MEM_CAPABILITY_ID_HDM_DECODER 0x5
74#define CXL_CACHE_MEM_CAPABILITY_ID_EXTENDED_SECURITY 0x6
75#define CXL_CACHE_MEM_CAPABILITY_ID_IDE 0x7
76#define CXL_CACHE_MEM_CAPABILITY_ID_SNOOP_FILTER 0x8
77#define CXL_CACHE_MEM_CAPABILITY_ID_MASK 0xFFFF
83#define CXL_DEVICE_CAPABILITY_ID_CAPABILITIES_ARRAY_REGISTER 0x0000
84#define CXL_DEVICE_CAPABILITY_ID_DEVICE_STATUS 0x0001
85#define CXL_DEVICE_CAPABILITY_ID_PRIMARY_MAILBOX 0x0002
86#define CXL_DEVICE_CAPABILITY_ID_SECONDARY_MAILBOX 0x0003
93#define CXL_DEVICE_CAPABILITY_ID_MEMORY_DEVICE_STATUS 0x4000
94#define CXL_DEVICE_CAPABILITY_ID_MASK 0xFFFF
100#define CXL_MEM_DEVICE_MEDIA_STATUS_NOT_READY 0x0
101#define CXL_MEM_DEVICE_MEDIA_STATUS_READY 0x1
102#define CXL_MEM_DEVICE_MEDIA_STATUS_ERROR 0x2
103#define CXL_MEM_DEVICE_MEDIA_STATUS_DISABLED 0x3
116 UINT16 CacheCapable : 1;
117 UINT16 IoCapable : 1;
118 UINT16 MemCapable : 1;
119 UINT16 MemHwInitMode : 1;
121 UINT16 CacheWriteBackAndInvalidateCapable : 1;
122 UINT16 CxlResetCapable : 1;
123 UINT16 CxlResetTimeout : 3;
124 UINT16 CxlResetMemClrCapable : 1;
126 UINT16 MultipleLogicalDevice : 1;
127 UINT16 ViralCapable : 1;
128 UINT16 PmInitCompletionReportingCapable : 1;
135 UINT16 CacheEnable : 1;
137 UINT16 MemEnable : 1;
138 UINT16 CacheSfCoverage : 5;
139 UINT16 CacheSfGranularity : 3;
140 UINT16 CacheCleanEviction : 1;
141 UINT16 Reserved1 : 2;
142 UINT16 ViralEnable : 1;
143 UINT16 Reserved2 : 1;
150 UINT16 Reserved1 : 14;
151 UINT16 ViralStatus : 1;
152 UINT16 Reserved2 : 1;
159 UINT16 DisableCaching : 1;
160 UINT16 InitiateCacheWriteBackAndInvalidate : 1;
161 UINT16 InitiateCxlReset : 1;
162 UINT16 CxlResetMemClrEnable : 1;
163 UINT16 Reserved : 12;
170 UINT16 CacheInvalid : 1;
171 UINT16 CxlResetComplete : 1;
172 UINT16 Reserved : 13;
173 UINT16 PowerManagementInitialzationComplete : 1;
180 UINT16 ConfigLock : 1;
181 UINT16 Reserved : 15;
188 UINT16 CacheSizeUnit : 4;
190 UINT16 CacheSize : 8;
197 UINT32 MemorySizeHigh : 32;
204 UINT32 MemoryInfoValid : 1;
205 UINT32 MemoryActive : 1;
206 UINT32 MediaType : 3;
207 UINT32 MemoryClass : 3;
208 UINT32 DesiredInterleave : 5;
209 UINT32 MemoryActiveTimeout : 3;
210 UINT32 Reserved : 12;
211 UINT32 MemorySizeLow : 4;
218 UINT32 MemoryBaseHigh : 32;
225 UINT32 Reserved : 28;
226 UINT32 MemoryBaseLow : 4;
252#define CXL_DVSEC_CXL_DEVICE_REVISION_1 0x1
261 UINT32 RegisterBir : 3;
263 UINT32 RegisterBlockIdentifier : 8;
264 UINT32 RegisterBlockOffsetLow : 16;
271 UINT32 RegisterBlockOffsetHigh : 32;
289#define CXL_DVSEC_REGISTER_LOCATOR_REVISION_0 0x0
297 UINT32 CxlCapabilityId : 16;
298 UINT32 CxlCapabilityVersion : 4;
299 UINT32 CxlHdmDecoderCapabilityPointer : 12;
310 UINT32 DecoderCount : 4;
311 UINT32 TargetCount : 4;
312 UINT32 InterleaveCapableA11to8 : 1;
313 UINT32 InterleaveCapableA14to12 : 1;
314 UINT32 PoisonOnDecodeErrorCapability : 1;
315 UINT32 Reserved : 21;
322 UINT32 PoisonOnDecodeErrorEnable : 1;
323 UINT32 HdmDecoderEnable : 1;
324 UINT32 Reserved : 30;
331 UINT32 Reserved : 28;
332 UINT32 MemoryBaseLow : 4;
339 UINT32 MemoryBaseHigh : 32;
346 UINT32 Reserved : 28;
347 UINT32 MemorySizeLow : 4;
354 UINT32 MemorySizeHigh : 32;
361 UINT32 InterleaveGranularity : 4;
362 UINT32 InterleaveWays : 4;
363 UINT32 LockOnCommit : 1;
365 UINT32 Committed : 1;
366 UINT32 ErrorNotCommitted : 1;
367 UINT32 TargetDeviceType : 1;
368 UINT32 Reserved : 19;
375 UINT32 TargetPortIdentiferWay0 : 8;
376 UINT32 TargetPortIdentiferWay1 : 8;
377 UINT32 TargetPortIdentiferWay2 : 8;
378 UINT32 TargetPortIdentiferWay3 : 8;
385 UINT32 Reserved : 28;
386 UINT32 DpaSkipLow : 4;
393 UINT32 TargetPortIdentiferWay4 : 8;
394 UINT32 TargetPortIdentiferWay5 : 8;
395 UINT32 TargetPortIdentiferWay6 : 8;
396 UINT32 TargetPortIdentiferWay7 : 8;
403 UINT32 DpaSkipHigh : 32;
436 UINT64 CxlDeviceCapabilityId : 16;
437 UINT64 CxlDeviceCapabilityVersion : 8;
438 UINT64 Reserved1 : 8;
439 UINT64 CxlDeviceCapabilitiesCount : 16;
440 UINT64 Reserved2 : 16;
451 UINT64 DeviceFatal : 1;
453 UINT64 MediaStatus : 2;
454 UINT64 MailboxInterfacesReady : 1;
455 UINT64 ResetNeeded : 3;
456 UINT64 Reserved : 56;