DynamicTablesPkg: Add CXL CEDT namespace objects
- Add objects for CEDT CHBS and CEDT CFMWS. These describe CXL host bridges and CXL fixed memory windows, respectively. Signed-off-by: Nick Graves <nicholasgraves@google.com>
This commit is contained in:
committed by
mergify[bot]
parent
ee6a2bfc2c
commit
1668fd54aa
57
DynamicTablesPkg/Include/ArchCommonNameSpaceObjects.h
Executable file → Normal file
57
DynamicTablesPkg/Include/ArchCommonNameSpaceObjects.h
Executable file → Normal file
@@ -62,6 +62,8 @@ typedef enum ArchCommonObjectID {
|
||||
EArchCommonObjStaInfo, ///< 34 - _STA (Device Status) Info
|
||||
EArchCommonObjMemoryRangeDescriptor, ///< 35 - Memory Range Descriptor
|
||||
EArchCommonObjGenericDbg2DeviceInfo, ///< 36 - Generic DBG2 Device Info
|
||||
EArchCommonObjCxlHostBridgeInfo, ///< 37 - CXL Host Bridge Info
|
||||
EArchCommonObjCxlFixedMemoryWindowInfo, ///< 38 - CXL Fixed Memory Window Info
|
||||
EArchCommonObjMax
|
||||
} EARCH_COMMON_OBJECT_ID;
|
||||
|
||||
@@ -850,6 +852,61 @@ typedef struct CmArchCommonDbg2DeviceInfo {
|
||||
CHAR8 ObjectName[AML_NAME_SEG_SIZE + 1];
|
||||
} CM_ARCH_COMMON_DBG2_DEVICE_INFO;
|
||||
|
||||
/** A structure that describes a CXL Host Bridge Structure (Type 0).
|
||||
|
||||
ID: EArchCommonObjCxlHostBridgeInfo
|
||||
*/
|
||||
|
||||
typedef struct CmArchCommonCxlHostBridgeInfo {
|
||||
/// Token to identify this object.
|
||||
CM_OBJECT_TOKEN Token;
|
||||
|
||||
/// Unique id to associate with a host bridge instance.
|
||||
UINT32 Uid;
|
||||
|
||||
/// CXL version.
|
||||
UINT32 Version;
|
||||
|
||||
/// Base address of the component registers.
|
||||
UINT64 ComponentRegisterBase;
|
||||
} CM_ARCH_COMMON_CXL_HOST_BRIDGE_INFO;
|
||||
|
||||
// Maximum interleave ways is defined in the CXL spec section 8.2.4.19.7.
|
||||
#define CFMWS_MAX_INTERLEAVE_WAYS (16)
|
||||
|
||||
/** A structure that describes the CXL Fixed Memory Window Structure (Type 1).
|
||||
|
||||
ID: EArchCommonObjCxlFixedMemoryWindowInfo
|
||||
*/
|
||||
typedef struct CmArchCommonCxlFixedMemoryWindowInfo {
|
||||
/// Base host physical address. Should be 256 MB aligned.
|
||||
UINT64 BaseHostPhysicalAddress;
|
||||
|
||||
/// Size of the window in bytes. Should be 256 MB aligned.
|
||||
UINT64 WindowSizeBytes;
|
||||
|
||||
/// Number of ways the memory region is interleaved.
|
||||
UINT8 NumberOfInterleaveWays;
|
||||
|
||||
/// Interleave arithmetic method.
|
||||
UINT8 InterleaveArithmetic;
|
||||
|
||||
/// Number of consecutive bytes per interleave.
|
||||
UINT32 HostBridgeInterleaveGranularity;
|
||||
|
||||
/// Bit vector of window restriction settings.
|
||||
UINT16 WindowRestrictions;
|
||||
|
||||
/// ID of Quality of Service Throttling Group for this window.
|
||||
UINT16 QtgId;
|
||||
|
||||
/// Host bridge UIDs that are part of the interleave configuration.
|
||||
/// The number of InterleaveTargetTokens is equal to NumberOfInterleaveWays.
|
||||
/// Each array element identifies a CM_ARCH_COMMON_CXL_HOST_BRIDGE_INFO
|
||||
/// structure via token matching.
|
||||
CM_OBJECT_TOKEN InterleaveTargetTokens[CFMWS_MAX_INTERLEAVE_WAYS];
|
||||
} CM_ARCH_COMMON_CXL_FIXED_MEMORY_WINDOW_INFO;
|
||||
|
||||
#pragma pack()
|
||||
|
||||
#endif // ARCH_COMMON_NAMESPACE_OBJECTS_H_
|
||||
|
||||
49
DynamicTablesPkg/Library/Common/TableHelperLib/ConfigurationManagerObjectParser.c
Executable file → Normal file
49
DynamicTablesPkg/Library/Common/TableHelperLib/ConfigurationManagerObjectParser.c
Executable file → Normal file
@@ -11,6 +11,7 @@
|
||||
#include <Library/BaseLib.h>
|
||||
#include <Library/DebugLib.h>
|
||||
#include <ConfigurationManagerObject.h>
|
||||
#include "ArchCommonNameSpaceObjects.h"
|
||||
#include "ConfigurationManagerObjectParser.h"
|
||||
|
||||
STATIC
|
||||
@@ -774,6 +775,52 @@ STATIC CONST CM_OBJ_PARSER CmArchCommonObjDbg2DeviceInfo[] = {
|
||||
{ "ObjectName", AML_NAME_SEG_SIZE + 1, NULL, PrintString }
|
||||
};
|
||||
|
||||
/** A parser for EArchCommonObjCxlHostBridgeInfo.
|
||||
*/
|
||||
STATIC CONST CM_OBJ_PARSER CmArchCommonObjCxlHostBridgeInfo[] = {
|
||||
{ "Token", sizeof (CM_OBJECT_TOKEN), "0x%p", NULL },
|
||||
{ "Uid", sizeof (UINT32), "0x%x", NULL },
|
||||
{ "Version", sizeof (UINT32), "0x%x", NULL },
|
||||
{ "ComponentRegisterBase", sizeof (UINT64), "0x%llx", NULL },
|
||||
};
|
||||
|
||||
STATIC CONST CM_OBJ_PARSER CmArchCommonObjInterleaveTargetTokenParser[] = {
|
||||
{ "InterleaveTargetToken[0]", sizeof (CM_OBJECT_TOKEN), "0x%p", NULL },
|
||||
{ "InterleaveTargetToken[1]", sizeof (CM_OBJECT_TOKEN), "0x%p", NULL },
|
||||
{ "InterleaveTargetToken[2]", sizeof (CM_OBJECT_TOKEN), "0x%p", NULL },
|
||||
{ "InterleaveTargetToken[3]", sizeof (CM_OBJECT_TOKEN), "0x%p", NULL },
|
||||
{ "InterleaveTargetToken[4]", sizeof (CM_OBJECT_TOKEN), "0x%p", NULL },
|
||||
{ "InterleaveTargetToken[5]", sizeof (CM_OBJECT_TOKEN), "0x%p", NULL },
|
||||
{ "InterleaveTargetToken[6]", sizeof (CM_OBJECT_TOKEN), "0x%p", NULL },
|
||||
{ "InterleaveTargetToken[7]", sizeof (CM_OBJECT_TOKEN), "0x%p", NULL },
|
||||
{ "InterleaveTargetToken[8]", sizeof (CM_OBJECT_TOKEN), "0x%p", NULL },
|
||||
{ "InterleaveTargetToken[9]", sizeof (CM_OBJECT_TOKEN), "0x%p", NULL },
|
||||
{ "InterleaveTargetToken[10]", sizeof (CM_OBJECT_TOKEN), "0x%p", NULL },
|
||||
{ "InterleaveTargetToken[11]", sizeof (CM_OBJECT_TOKEN), "0x%p", NULL },
|
||||
{ "InterleaveTargetToken[12]", sizeof (CM_OBJECT_TOKEN), "0x%p", NULL },
|
||||
{ "InterleaveTargetToken[13]", sizeof (CM_OBJECT_TOKEN), "0x%p", NULL },
|
||||
{ "InterleaveTargetToken[14]", sizeof (CM_OBJECT_TOKEN), "0x%p", NULL },
|
||||
{ "InterleaveTargetToken[15]", sizeof (CM_OBJECT_TOKEN), "0x%p", NULL },
|
||||
};
|
||||
|
||||
/** A parser for EArchCommonObjCxlFixedMemoryWindowInfo
|
||||
*/
|
||||
STATIC CONST CM_OBJ_PARSER CmArchCommonObjCxlFixedMemoryWindowInfo[] = {
|
||||
{ "BaseHostPhysicalAddress", sizeof (UINT64), "0x%llx", NULL },
|
||||
{ "WindowSizeBytes", sizeof (UINT64), "0x%llx", NULL },
|
||||
{ "NumberOfInterleaveWays", sizeof (UINT8), "%d", NULL },
|
||||
{ "InterleaveArithmetic", sizeof (UINT8), "%d", NULL },
|
||||
{ "HostBridgeInterleaveGranularity", sizeof (UINT32), "0x%x", NULL },
|
||||
{ "WindowRestrictions", sizeof (UINT16), "0x%x", NULL },
|
||||
{ "QtgId", sizeof (UINT16), "%d", NULL },
|
||||
{ "InterleaveTargetTokens",
|
||||
sizeof (CM_OBJECT_TOKEN) * CFMWS_MAX_INTERLEAVE_WAYS,
|
||||
NULL,
|
||||
NULL,
|
||||
CmArchCommonObjInterleaveTargetTokenParser,
|
||||
ARRAY_SIZE (CmArchCommonObjInterleaveTargetTokenParser) },
|
||||
};
|
||||
|
||||
/** A parser for Arch Common namespace objects.
|
||||
*/
|
||||
STATIC CONST CM_OBJ_PARSER_ARRAY ArchCommonNamespaceObjectParser[] = {
|
||||
@@ -814,6 +861,8 @@ STATIC CONST CM_OBJ_PARSER_ARRAY ArchCommonNamespaceObjectParser[] = {
|
||||
CM_PARSER_ADD_OBJECT (EArchCommonObjStaInfo, CmArchCommonStaInfoParser),
|
||||
CM_PARSER_ADD_OBJECT (EArchCommonObjMemoryRangeDescriptor, CmArchCommonObjMemoryRangeDescriptor),
|
||||
CM_PARSER_ADD_OBJECT (EArchCommonObjGenericDbg2DeviceInfo, CmArchCommonObjDbg2DeviceInfo),
|
||||
CM_PARSER_ADD_OBJECT (EArchCommonObjCxlHostBridgeInfo, CmArchCommonObjCxlHostBridgeInfo),
|
||||
CM_PARSER_ADD_OBJECT (EArchCommonObjCxlFixedMemoryWindowInfo, CmArchCommonObjCxlFixedMemoryWindowInfo),
|
||||
CM_PARSER_ADD_OBJECT_RESERVED (EArchCommonObjMax)
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user