Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DynamicTablesPkg; Reorg with FADT table updates #2

Open
wants to merge 4 commits into
base: pg/dyntables_libraries_reorg
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion DynamicTablesPkg/DynamicTables.dsc.inc
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,12 @@
#
# Dynamic Table Factory Dxe
#
DynamicTablesPkg/Drivers/DynamicTableFactoryDxe/DynamicTableFactoryDxe.inf
DynamicTablesPkg/Drivers/DynamicTableFactoryDxe/DynamicTableFactoryDxe.inf {
<LibraryClasses>
# Generators
# Common
NULL|DynamicTablesPkg/Library/Acpi/Common/AcpiFadtLib/AcpiFadtLib.inf
}

[Components.ARM, Components.AARCH64]
#
Expand Down
6 changes: 6 additions & 0 deletions DynamicTablesPkg/Include/AcpiTableGenerator.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
/** @file

Copyright (c) 2017 - 2022, Arm Limited. All rights reserved.<BR>
Copyright (C) 2024 Advanced Micro Devices, Inc. All rights reserved.

SPDX-License-Identifier: BSD-2-Clause-Patent

Expand Down Expand Up @@ -159,6 +160,11 @@ typedef enum StdAcpiTableId {
*/
#define TABLE_GENERATOR_CREATOR_ID_ARM SIGNATURE_32('A', 'R', 'M', 'H')

/** The Generic Creator ID for the ACPI tables generated using
the standard ACPI table generators.
*/
#define TABLE_GENERATOR_CREATOR_ID SIGNATURE_32('D', 'Y', 'N', 'T')

/** A macro to initialise the common header part of EFI ACPI tables as
defined by the EFI_ACPI_DESCRIPTION_HEADER structure.

Expand Down
143 changes: 143 additions & 0 deletions DynamicTablesPkg/Include/ArchCommonNameSpaceObjects.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
/** @file

Copyright (c) 2024, Arm Limited. All rights reserved.<BR>
Copyright (C) 2024 Advanced Micro Devices, Inc. All rights reserved.

SPDX-License-Identifier: BSD-2-Clause-Patent

Expand Down Expand Up @@ -46,6 +47,15 @@ typedef enum ArchCommonObjectID {
EArchCommonObjPccSubspaceType4Info, ///< 23 - Pcc Subspace Type 4 Info
EArchCommonObjPccSubspaceType5Info, ///< 24 - Pcc Subspace Type 5 Info
EArchCommonObjPsdInfo, ///< 25 - P-State Dependency (PSD) Info
EArchCommonObjFadtSciInterrupt, ///< 26 - FADT SCI Interrupt information
EArchCommonObjFadtSciCmdInfo, ///< 27 - FADT SCI CMD information
EArchCommonObjFadtPmBlockInfo, ///< 28 - FADT Power management block info
EArchCommonObjFadtGpeBlockInfo, ///< 29 - FADT GPE block info
EArchCommonObjFadtXpmBlockInfo, ///< 30 - FADT 64-bit Power Management block info
EArchCommonObjFadtXgpeBlockInfo, ///< 31 - FADT 64-bit GPE block info
EArchCommonObjFadtSleepBlockInfo, ///< 32 - FADT Sleep block info
EArchCommonObjFadtResetBlockInfo, ///< 33 - FADT Reset block info
EArchCommonObjFadtMiscInfo, ///< 34 - FADT Legacy fields info
EArchCommonObjMax
} EARCH_COMMON_OBJECT_ID;

Expand Down Expand Up @@ -652,6 +662,139 @@ typedef struct CmArchCommonPccSubspaceType5Info {
*/
typedef AML_PSD_INFO CM_ARCH_COMMON_PSD_INFO;

/** A structure that describes the
SCI interrupt Information for the Platform.

ID: EArchCommonObjFadtSciInterrupt
*/
typedef struct CmArchCommonSciInterrupt {
/** This is the SCI interrupt field of the FADT Table
described in the ACPI Specification
*/
UINT16 SciInterrupt;
} CM_ARCH_COMMON_FADT_SCI_INTERRUPT;

/** A structure that describes the
SCI CMD Information for the Platform.

ID: EArchCommonObjFadtSciCmdInfo
*/
typedef struct CmArchCommonSciCmdInfo {
/** This is the System control interrupt command information of the FADT Table
described in the ACPI Specification
*/
UINT32 SciCmd;
UINT8 AcpiEnable;
UINT8 AcpiDisable;
UINT8 S4BiosReq;
UINT8 PstateCnt;
UINT8 CstCnt;
} CM_ARCH_COMMON_FADT_SCI_CMD_INFO;

/** A structure that describes the
power management block information.

ID: EArchCommonObjFadtPmBlockInfo
*/
typedef struct CmArchCommonPmBlockInfo {
/** This is the PM event block information of the FADT Table
described in the ACPI Specification
*/
UINT32 Pm1aEvtBlk;
UINT32 Pm1bEvtBlk;
UINT32 Pm1aCntBlk;
UINT32 Pm1bCntBlk;
UINT32 Pm2CntBlk;
UINT32 PmTmrBlk;
UINT8 Pm1EvtLen;
UINT8 Pm1CntLen;
UINT8 Pm2CntLen;
UINT8 PmTmrLen;
} CM_ARCH_COMMON_FADT_PM_BLOCK_INFO;

/** A structure that describes the
GPE block information.

ID: EArchCommonObjFadtGpeBlockInfo
*/
typedef struct CmArchCommonGpeBlockInfo {
/** This is the GPE Block information of the FADT Table
described in the ACPI Specification
*/
UINT32 Gpe0Blk;
UINT32 Gpe1Blk;
UINT8 Gpe0BlkLen;
UINT8 Gpe1BlkLen;
UINT8 Gpe1Base;
} CM_ARCH_COMMON_FADT_GPE_BLOCK_INFO;

/** A structure that describes the
64bit power management block information.

ID: EArchCommonObjFadtXpmBlockInfo
*/
typedef struct CmArchCommonXpmBlockInfo {
/** This is the System control interrupt command information of the FADT Table
described in the ACPI Specification
*/
EFI_ACPI_6_5_GENERIC_ADDRESS_STRUCTURE XPm1aEvtBlk;
EFI_ACPI_6_5_GENERIC_ADDRESS_STRUCTURE XPm1bEvtBlk;
EFI_ACPI_6_5_GENERIC_ADDRESS_STRUCTURE XPm1aCntBlk;
EFI_ACPI_6_5_GENERIC_ADDRESS_STRUCTURE XPm1bCntBlk;
EFI_ACPI_6_5_GENERIC_ADDRESS_STRUCTURE XPm2CntBlk;
EFI_ACPI_6_5_GENERIC_ADDRESS_STRUCTURE XPmTmrBlk;
} CM_ARCH_COMMON_FADT_X_PM_BLOCK_INFO;

/** A structure that describes the
64-bit GPE block information.

ID: EArchCommonObjFadtXgpeBlockInfo
*/
typedef struct CmArchCommonXgpeBlockInfo {
/** This is the GPE Block information of the FADT Table
described in the ACPI Specification
*/
EFI_ACPI_6_5_GENERIC_ADDRESS_STRUCTURE XGpe0Blk;
EFI_ACPI_6_5_GENERIC_ADDRESS_STRUCTURE XGpe1Blk;
} CM_ARCH_COMMON_FADT_X_GPE_BLOCK_INFO;

/** A structure that describes the
sleep control block information.

ID: EArchCommonObjFadtSleepBlockInfo
*/
typedef struct CmArchCommonSleepBlockInfo {
EFI_ACPI_6_5_GENERIC_ADDRESS_STRUCTURE SleepControlReg;
EFI_ACPI_6_5_GENERIC_ADDRESS_STRUCTURE SleepStatusReg;
} CM_ARCH_COMMON_FADT_SLEEP_BLOCK_INFO;

/** A structure that describes the
Reset control block information.

ID: EArchCommonObjFadtResetBlockInfo
*/
typedef struct CmArchCommonResetBlockInfo {
EFI_ACPI_6_5_GENERIC_ADDRESS_STRUCTURE ResetReg;
UINT8 ResetValue;
} CM_ARCH_COMMON_FADT_RESET_BLOCK_INFO;

/** A structure that describes the
miscellaneous FADT fields information.

ID: EArchCommonObjFadtMiscInfo
*/
typedef struct CmArchCommonFadtMiscInfo {
UINT16 PLvl2Lat;
UINT16 PLvl3Lat;
UINT16 FlushSize;
UINT16 FlushStride;
UINT8 DutyOffset;
UINT8 DutyWidth;
UINT8 DayAlrm;
UINT8 MonAlrm;
UINT8 Century;
} CM_ARCH_COMMON_FADT_MISC_INFO;

#pragma pack()

#endif // ARCH_COMMON_NAMESPACE_OBJECTS_H_
Loading