TianoCore EDK2 master
Loading...
Searching...
No Matches
PpttGenerator.h File Reference

Go to the source code of this file.

Data Structures

struct  PpttNodeIndexer
 
struct  AcpiPpttGenerator
 

Macros

#define PPTT_ARM_CCIDX_CACHE_NUMBER_OF_SETS_MAX   (1 << 24)
 
#define PPTT_ARM_CCIDX_CACHE_ASSOCIATIVITY_MAX   (1 << 21)
 
#define PPTT_ARM_CACHE_NUMBER_OF_SETS_MAX   (1 << 15)
 
#define PPTT_ARM_CACHE_ASSOCIATIVITY_MAX   (1 << 10)
 
#define PPTT_ARM_CACHE_LINE_SIZE_MAX   (1 << 11)
 
#define PPTT_ARM_CACHE_LINE_SIZE_MIN   (1 << 4)
 
#define IS_PROC_NODE_LEAF(Node)   ((Node->Flags & BIT3) != 0)
 
#define IS_ACPI_PROC_ID_VALID(Node)   ((Node->Flags & BIT1) != 0)
 
#define GET_SIZE_OF_PPTT_STRUCTS( PpttObjName, PpttObjSize, CmObjectType)
 

Typedefs

typedef struct PpttNodeIndexer PPTT_NODE_INDEXER
 
typedef struct AcpiPpttGenerator ACPI_PPTT_GENERATOR
 

Detailed Description

Header file for the dynamic PPTT generator

Copyright (c) 2019, ARM Limited. All rights reserved. SPDX-License-Identifier: BSD-2-Clause-Patent

Reference(s):
  • ACPI 6.3 Specification, January 2019
  • ARM Architecture Reference Manual ARMv8 (D.a)
Glossary:
  • Cm or CM - Configuration Manager
  • Obj or OBJ - Object

Definition in file PpttGenerator.h.

Macro Definition Documentation

◆ GET_SIZE_OF_PPTT_STRUCTS

#define GET_SIZE_OF_PPTT_STRUCTS (   PpttObjName,
  PpttObjSize,
  CmObjectType 
)

The GET_SIZE_OF_PPTT_STRUCTS macro expands to a function that is used to calculate the total memory requirement for the PPTT structures represented by the given list of Configuration Manager Objects of the same type. This function also indexes the input CM objects so that various other CM objects (possibly of different type) can reference them.

The size of memory needed for the specified type of PPTT structures is based on the number and type of CM objects provided. The macro assumes that the ACPI object PpttObjName has fixed size.

The macro expands to a function which has the following prototype:

STATIC UINT32 EFIAPI GetSizeof<PpttObjName> ( IN CONST UINT32 StartOffset, IN CONST CmObjectType * Nodes, IN UINT32 NodeCount, IN OUT PPTT_NODE_INDEXER ** CONST NodeIndexer )

Generated function parameters:

Parameters
[in]StartOffsetOffset from the start of PPTT to where the PPTT structures will be placed.
[in]NodesToIndexPointer to the list of CM objects to be indexed and size-estimated.
[out]NodeCountNumber of CM objects in NodesToIndex.
[in,out]NodeIndexerPointer to the list of Node Indexer elements to populate.
Return values
SizeTotal memory requirement for the PPTT structures described in NodesToIndex.

Macro Parameters:

Parameters
[in]PpttObjNameName for the type of PPTT structures which size is estimated.
[in]PpttObjSizeExpression to use to calculate the size of of a single instance of the PPTT structure which corresponds to the CM object being indexed.
[in]CmObjectTypeData type of the CM nodes in NodesToIndex.

Definition at line 92 of file PpttGenerator.h.

◆ IS_ACPI_PROC_ID_VALID

#define IS_ACPI_PROC_ID_VALID (   Node)    ((Node->Flags & BIT1) != 0)

Test if the given Processor Hierarchy Info object has the 'ACPI Processor ID valid' flag set

Definition at line 47 of file PpttGenerator.h.

◆ IS_PROC_NODE_LEAF

#define IS_PROC_NODE_LEAF (   Node)    ((Node->Flags & BIT3) != 0)

Test if the given Processor Hierarchy Info object has the 'Node is a Leaf' flag set

Definition at line 43 of file PpttGenerator.h.

◆ PPTT_ARM_CACHE_ASSOCIATIVITY_MAX

#define PPTT_ARM_CACHE_ASSOCIATIVITY_MAX   (1 << 10)

Definition at line 31 of file PpttGenerator.h.

◆ PPTT_ARM_CACHE_LINE_SIZE_MAX

#define PPTT_ARM_CACHE_LINE_SIZE_MAX   (1 << 11)

Common cache parameters Derived from CCSIDR_EL1 The LineSize is represented by bits 2:0 (Log2(Number of bytes in cache line)) - 4 is used to represent the LineSize bits.

Definition at line 38 of file PpttGenerator.h.

◆ PPTT_ARM_CACHE_LINE_SIZE_MIN

#define PPTT_ARM_CACHE_LINE_SIZE_MIN   (1 << 4)

Definition at line 39 of file PpttGenerator.h.

◆ PPTT_ARM_CACHE_NUMBER_OF_SETS_MAX

#define PPTT_ARM_CACHE_NUMBER_OF_SETS_MAX   (1 << 15)

Cache parameters allowed by the architecture without ARMv8.3-CCIDX (Cache extended number of sets) Derived from CCSIDR_EL1 when ID_AA64MMFR2_EL1.CCIDX==0000

Definition at line 30 of file PpttGenerator.h.

◆ PPTT_ARM_CCIDX_CACHE_ASSOCIATIVITY_MAX

#define PPTT_ARM_CCIDX_CACHE_ASSOCIATIVITY_MAX   (1 << 21)

Definition at line 25 of file PpttGenerator.h.

◆ PPTT_ARM_CCIDX_CACHE_NUMBER_OF_SETS_MAX

#define PPTT_ARM_CCIDX_CACHE_NUMBER_OF_SETS_MAX   (1 << 24)

Cache parameters allowed by the architecture with ARMv8.3-CCIDX (Cache extended number of sets) Derived from CCSIDR_EL1 when ID_AA64MMFR2_EL1.CCIDX==0001

Definition at line 24 of file PpttGenerator.h.

Typedef Documentation

◆ PPTT_NODE_INDEXER

A structure for indexing CM objects (nodes) used in PPTT generation.

PPTT_NODE_INDEXER is a wrapper around CM objects which augments these objects with additional information that enables generating PPTT structures with correct cross-references.

PPTT_NODE_INDEXER keeps track of each structure's offset from the base address of the generated table. It also caches certain information and makes PPTT cyclic reference detection possible.