DynamicTablesPkg/Acpi: Add LoongArch64 MADT generator

Add a MADT generator for LoongArch64 Core, LIO, HT, EIO, MSI, BIO,
and LPC interrupt controllers. Validate required objects, structure
versions, identifiers, reserved flags, invalid physical CoreIds,
address ranges, MSI vector ranges, and table size before writing the
ACPI table.

Support MADT revisions from ACPI 6.5, where the LoongArch64 interrupt
controller structures were introduced, through ACPI 6.6.

Signed-off-by: Dongyan Qian <qiandongyan@loongson.cn>
This commit is contained in:
Dongyan Qian 2026-07-28 20:52:00 +08:00 committed by pierregondois
parent 56afe75e74
commit a9fa6918d7
3 changed files with 1126 additions and 0 deletions

View file

@ -230,6 +230,11 @@
}
[Components.LOONGARCH64]
#
# Generators (LoongArch64 specific)
#
DynamicTablesPkg/Library/Acpi/LoongArch64/AcpiMadtLibLoongArch64/AcpiMadtLibLoongArch64.inf
#
# Dynamic Table Factory Dxe
#
@ -242,6 +247,8 @@
NULL|DynamicTablesPkg/Library/Acpi/Common/AcpiPpttLib/AcpiPpttLib.inf
NULL|DynamicTablesPkg/Library/Acpi/Common/AcpiRawLib/AcpiRawLib.inf
NULL|DynamicTablesPkg/Library/Acpi/Common/AcpiSlitLib/AcpiSlitLib.inf
# LoongArch64 specific
NULL|DynamicTablesPkg/Library/Acpi/LoongArch64/AcpiMadtLibLoongArch64/AcpiMadtLibLoongArch64.inf
NULL|DynamicTablesPkg/Library/Smbios/SmbiosType0Lib/SmbiosType0Lib.inf
NULL|DynamicTablesPkg/Library/Smbios/SmbiosType4Lib/SmbiosType4Lib.inf

View file

@ -0,0 +1,29 @@
## @file
# LoongArch64 MADT Table Generator
#
# Copyright (c) 2026, Loongson Technology Corporation Limited. All rights reserved.<BR>
#
# SPDX-License-Identifier: BSD-2-Clause-Patent
##
[Defines]
INF_VERSION = 0x00010019
BASE_NAME = AcpiMadtLibLoongArch64
FILE_GUID = 019B6DB8-92C5-4C96-9085-85DA15F5E568
VERSION_STRING = 1.0
MODULE_TYPE = DXE_DRIVER
LIBRARY_CLASS = NULL|DXE_DRIVER
CONSTRUCTOR = AcpiMadtLibConstructor
DESTRUCTOR = AcpiMadtLibDestructor
[Sources]
MadtGenerator.c
[Packages]
DynamicTablesPkg/DynamicTablesPkg.dec
MdePkg/MdePkg.dec
[LibraryClasses]
BaseMemoryLib
DebugLib
MemoryAllocationLib

File diff suppressed because it is too large Load diff