TianoCore EDK2 master
Loading...
Searching...
No Matches
PpttGenerator.h
Go to the documentation of this file.
1
16#ifndef PPTT_GENERATOR_H_
17#define PPTT_GENERATOR_H_
18
19#pragma pack(1)
20
24#define PPTT_ARM_CCIDX_CACHE_NUMBER_OF_SETS_MAX (1 << 24)
25#define PPTT_ARM_CCIDX_CACHE_ASSOCIATIVITY_MAX (1 << 21)
26
30#define PPTT_ARM_CACHE_NUMBER_OF_SETS_MAX (1 << 15)
31#define PPTT_ARM_CACHE_ASSOCIATIVITY_MAX (1 << 10)
32
38#define PPTT_ARM_CACHE_LINE_SIZE_MAX (1 << 11)
39#define PPTT_ARM_CACHE_LINE_SIZE_MIN (1 << 4)
40
43#define IS_PROC_NODE_LEAF(Node) ((Node->Flags & BIT3) != 0)
44
47#define IS_ACPI_PROC_ID_VALID(Node) ((Node->Flags & BIT1) != 0)
48
92#define GET_SIZE_OF_PPTT_STRUCTS( \
93 PpttObjName, \
94 PpttObjSize, \
95 CmObjectType \
96 ) \
97STATIC \
98UINT32 \
99GetSizeof##PpttObjName ( \
100 IN CONST UINT32 StartOffset, \
101 IN CONST CmObjectType * NodesToIndex, \
102 IN UINT32 NodeCount, \
103 IN OUT PPTT_NODE_INDEXER ** CONST NodeIndexer \
104 ) \
105{ \
106 UINT32 Size; \
107 \
108 ASSERT ( \
109 (NodesToIndex != NULL) && \
110 (NodeIndexer != NULL) \
111 ); \
112 \
113 Size = 0; \
114 while (NodeCount-- != 0) { \
115 (*NodeIndexer)->Token = NodesToIndex->Token; \
116 (*NodeIndexer)->Object = (VOID*)NodesToIndex; \
117 (*NodeIndexer)->Offset = Size + StartOffset; \
118 (*NodeIndexer)->CycleDetectionStamp = 0; \
119 (*NodeIndexer)->TopologyParent = NULL; \
120 DEBUG (( \
121 DEBUG_INFO, \
122 "PPTT: Node Indexer = %p, Token = %p, Object = %p, Offset = 0x%x\n", \
123 *NodeIndexer, \
124 (*NodeIndexer)->Token, \
125 (*NodeIndexer)->Object, \
126 (*NodeIndexer)->Offset \
127 )); \
128 \
129 Size += PpttObjSize; \
130 (*NodeIndexer)++; \
131 NodesToIndex++; \
132 } \
133 return Size; \
134}
135
147typedef struct PpttNodeIndexer {
151 VOID *Object;
154 UINT32 Offset;
164
165typedef struct AcpiPpttGenerator {
182
183#pragma pack()
184
185#endif // PPTT_GENERATOR_H_
struct PpttNodeIndexer PPTT_NODE_INDEXER
UINTN CM_OBJECT_TOKEN
ACPI_TABLE_GENERATOR Header
ACPI Table generator header.
PPTT_NODE_INDEXER * NodeIndexer
List of indexed CM objects for PPTT generation.
PPTT_NODE_INDEXER * ProcHierarchyNodeIndexedList
UINT32 ProcTopologyStructCount
PPTT structure count.
UINT32 ProcHierarchyNodeCount
Count of Processor Hierarchy Nodes.
PPTT_NODE_INDEXER * CacheStructIndexedList
Pointer to the start of Cache Structures in the Node Indexer array.
UINT32 CacheStructCount
Count of Cache Structures.
struct PpttNodeIndexer * TopologyParent
CM_OBJECT_TOKEN Token
Unique identifier for the node.
VOID * Object
Pointer to the CM object being indexed.
UINT32 CycleDetectionStamp