public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
From: "levi.yun" <yeoreum.yun@arm.com>
To: devel@edk2.groups.io, prabin.ca@arm.com
Cc: Ard Biesheuvel <ardb+tianocore@kernel.org>,
	Leif Lindholm <quic_llindhol@quicinc.com>,
	Sami Mujawar <sami.mujawar@arm.com>
Subject: Re: [edk2-devel] [edk2-platforms][PATCH v2 5/7] Platform/Sgi: Add support for RD-N2-Cfg3 platform
Date: Mon, 8 Jan 2024 11:08:30 +0000	[thread overview]
Message-ID: <095d6b34-12d5-47af-9bd3-6f4fa1921e11@arm.com> (raw)
In-Reply-To: <20240105153814.427009-6-prabin.ca@arm.com>

Reviewed-by: levi.yun <yeoreum.yun@arm.com>

On 05/01/2024 15:38, Prabin CA via groups.io wrote:
> The Neoverse RD-N2-Cfg3 platform is a variant of RD-N2 platform with a
> different mesh size and GIC ITS count. As part of the initial platform
> support, add the corresponding platform and flash description files.
> Use PcdPlatformVariant for the RD-N2-Cfg3 platform to specify the
> platform variant. RD-N2-Cfg3 has 12 GIC ITS blocks when compared to the
> other RD-N2 variants that have 6 GIC ITS blocks.
>
> Signed-off-by: Vijayenthiran Subramaniam <vijayenthiran.subramaniam@arm.com>
> Signed-off-by: Prabin CA <prabin.ca@arm.com>
> ---
>   Platform/ARM/SgiPkg/RdN2Cfg3/RdN2Cfg3.dsc                                     | 58 ++++++++++++++++++++
>   Platform/ARM/SgiPkg/AcpiTables/RdN2AcpiTables.inf                             |  3 +-
>   Platform/ARM/SgiPkg/AcpiTables/{RdN2AcpiTables.inf => RdN2Cfg3AcpiTables.inf} | 15 ++---
>   Platform/ARM/SgiPkg/AcpiTables/RdN2/Madt.aslc                                 | 14 ++++-
>   Platform/ARM/SgiPkg/RdN2Cfg3/RdN2Cfg3.fdf.inc                                 | 10 ++++
>   5 files changed, 88 insertions(+), 12 deletions(-)
>
> diff --git a/Platform/ARM/SgiPkg/RdN2Cfg3/RdN2Cfg3.dsc b/Platform/ARM/SgiPkg/RdN2Cfg3/RdN2Cfg3.dsc
> new file mode 100644
> index 000000000000..88293b236a32
> --- /dev/null
> +++ b/Platform/ARM/SgiPkg/RdN2Cfg3/RdN2Cfg3.dsc
> @@ -0,0 +1,58 @@
> +#
> +#  Copyright (c) 2024, ARM Limited. All rights reserved.
> +#
> +#  SPDX-License-Identifier: BSD-2-Clause-Patent
> +#
> +
> +################################################################################
> +#
> +# Defines Section - statements that will be processed to create a Makefile.
> +#
> +################################################################################
> +[Defines]
> +  PLATFORM_NAME                  = RdN2Cfg3
> +  PLATFORM_GUID                  = b890ba7d-a256-4820-9d3a-655acbb737c9
> +  PLATFORM_VERSION               = 0.1
> +  DSC_SPECIFICATION              = 0x0001001B
> +  OUTPUT_DIRECTORY               = Build/$(PLATFORM_NAME)
> +  SUPPORTED_ARCHITECTURES        = AARCH64
> +  BUILD_TARGETS                  = NOOPT|DEBUG|RELEASE
> +  SKUID_IDENTIFIER               = DEFAULT
> +  FLASH_DEFINITION               = Platform/ARM/SgiPkg/SgiPlatform.fdf
> +  BOARD_DXE_FV_COMPONENTS        = Platform/ARM/SgiPkg/RdN2Cfg3/RdN2Cfg3.fdf.inc
> +  BUILD_NUMBER                   = 1
> +
> +# include common definitions from SgiPlatform.dsc
> +!include Platform/ARM/SgiPkg/SgiPlatform.dsc.inc
> +!include Platform/ARM/SgiPkg/SgiMemoryMap2.dsc.inc
> +
> +# include common/basic libraries from MdePkg.
> +!include MdePkg/MdeLibs.dsc.inc
> +
> +################################################################################
> +#
> +# Pcd Section - list of all EDK II PCD Entries defined by this Platform
> +#
> +################################################################################
> +
> +[PcdsFixedAtBuild.common]
> +  # GIC configurations
> +  gArmTokenSpaceGuid.PcdGicDistributorBase|0x30000000
> +  gArmTokenSpaceGuid.PcdGicRedistributorsBase|0x30300000
> +  gArmSgiTokenSpaceGuid.PcdGicSize|0x400000
> +
> +  # ARM Cores and Clusters
> +  gArmPlatformTokenSpaceGuid.PcdCoreCount|1
> +  gArmPlatformTokenSpaceGuid.PcdClusterCount|16
> +
> +  # RdN2Cfg3 is the third variant from RdN2 Platform
> +  gArmSgiTokenSpaceGuid.PcdPlatformVariant|3
> +
> +################################################################################
> +#
> +# Components Section - list of all EDK II Modules needed by this Platform
> +#
> +################################################################################
> +
> +[Components.common]
> +  Platform/ARM/SgiPkg/AcpiTables/RdN2Cfg3AcpiTables.inf
> diff --git a/Platform/ARM/SgiPkg/AcpiTables/RdN2AcpiTables.inf b/Platform/ARM/SgiPkg/AcpiTables/RdN2AcpiTables.inf
> index 8025ef58171b..afc38385c051 100644
> --- a/Platform/ARM/SgiPkg/AcpiTables/RdN2AcpiTables.inf
> +++ b/Platform/ARM/SgiPkg/AcpiTables/RdN2AcpiTables.inf
> @@ -1,7 +1,7 @@
>   ## @file
>   #  ACPI table data and ASL sources required to boot the platform.
>   #
> -#  Copyright (c) 2020 - 2023, Arm Ltd. All rights reserved.
> +#  Copyright (c) 2020 - 2024, Arm Ltd. All rights reserved.
>   #
>   #  SPDX-License-Identifier: BSD-2-Clause-Patent
>   #
> @@ -67,6 +67,7 @@ [FixedPcd]
>     gArmSgiTokenSpaceGuid.PcdMaxAddressBitsPerChip
>     gArmSgiTokenSpaceGuid.PcdOscLpiEnable
>     gArmSgiTokenSpaceGuid.PcdOscCppcEnable
> +  gArmSgiTokenSpaceGuid.PcdPlatformVariant
>     gArmSgiTokenSpaceGuid.PcdSp804DualTimerBaseAddress
>     gArmSgiTokenSpaceGuid.PcdSp804DualTimerSize
>     gArmSgiTokenSpaceGuid.PcdSp804DualTimerInterrupt
> diff --git a/Platform/ARM/SgiPkg/AcpiTables/RdN2AcpiTables.inf b/Platform/ARM/SgiPkg/AcpiTables/RdN2Cfg3AcpiTables.inf
> similarity index 90%
> copy from Platform/ARM/SgiPkg/AcpiTables/RdN2AcpiTables.inf
> copy to Platform/ARM/SgiPkg/AcpiTables/RdN2Cfg3AcpiTables.inf
> index 8025ef58171b..a703d5a994f7 100644
> --- a/Platform/ARM/SgiPkg/AcpiTables/RdN2AcpiTables.inf
> +++ b/Platform/ARM/SgiPkg/AcpiTables/RdN2Cfg3AcpiTables.inf
> @@ -1,7 +1,7 @@
>   ## @file
>   #  ACPI table data and ASL sources required to boot the platform.
>   #
> -#  Copyright (c) 2020 - 2023, Arm Ltd. All rights reserved.
> +#  Copyright (c) 2024, Arm Ltd. All rights reserved.
>   #
>   #  SPDX-License-Identifier: BSD-2-Clause-Patent
>   #
> @@ -9,7 +9,7 @@
>
>   [Defines]
>     INF_VERSION                    = 0x0001001A
> -  BASE_NAME                      = RdN2AcpiTables
> +  BASE_NAME                      = RdN2Cfg3AcpiTables
>     FILE_GUID                      = c712719a-0aaf-438c-9cdd-35ab4d60207d  # gArmSgiAcpiTablesGuid
>     MODULE_TYPE                    = USER_DEFINED
>     VERSION_STRING                 = 1.0
> @@ -18,16 +18,13 @@ [Sources]
>     Dbg2.aslc
>     Fadt.aslc
>     Gtdt.aslc
> -  Iort.aslc
> -  Mcfg.aslc
>     RdN2/Dsdt.asl
>     RdN2/Madt.aslc
>     RdN2/Pptt.aslc
>     Spcr.aslc
> -  Ssdt.asl
> +  SsdtRos.asl
>     SsdtEvents.asl
>     SsdtIoVirtSocExp.asl
> -  SsdtRos.asl
>     SsdtRosVirtioP9.asl
>
>   [Packages]
> @@ -56,17 +53,17 @@ [FixedPcd]
>     gArmTokenSpaceGuid.PcdPciBusMin
>     gArmTokenSpaceGuid.PcdPciBusMax
>
> -  gArmSgiTokenSpaceGuid.PcdChipCount
>     gArmSgiTokenSpaceGuid.PcdGpioController0BaseAddress
>     gArmSgiTokenSpaceGuid.PcdGpioController0Size
>     gArmSgiTokenSpaceGuid.PcdGpioController0Interrupt
>     gArmSgiTokenSpaceGuid.PcdGtFrame0Gsiv
>     gArmSgiTokenSpaceGuid.PcdGtFrame1Gsiv
> +  gArmSgiTokenSpaceGuid.PcdOscLpiEnable
> +  gArmSgiTokenSpaceGuid.PcdOscCppcEnable
>     gArmSgiTokenSpaceGuid.PcdIoVirtSocExpBlk0Base
>     gArmSgiTokenSpaceGuid.PcdIoVirtSocExpBlkUartEnable
>     gArmSgiTokenSpaceGuid.PcdMaxAddressBitsPerChip
> -  gArmSgiTokenSpaceGuid.PcdOscLpiEnable
> -  gArmSgiTokenSpaceGuid.PcdOscCppcEnable
> +  gArmSgiTokenSpaceGuid.PcdPlatformVariant
>     gArmSgiTokenSpaceGuid.PcdSp804DualTimerBaseAddress
>     gArmSgiTokenSpaceGuid.PcdSp804DualTimerSize
>     gArmSgiTokenSpaceGuid.PcdSp804DualTimerInterrupt
> diff --git a/Platform/ARM/SgiPkg/AcpiTables/RdN2/Madt.aslc b/Platform/ARM/SgiPkg/AcpiTables/RdN2/Madt.aslc
> index cdf8b3f2e953..5fba3fa7d020 100644
> --- a/Platform/ARM/SgiPkg/AcpiTables/RdN2/Madt.aslc
> +++ b/Platform/ARM/SgiPkg/AcpiTables/RdN2/Madt.aslc
> @@ -6,7 +6,7 @@
>     CPU interface, redistributor, distributor and ITS blocks on the Rd-N2 platform
>     is included in this table.
>
> -  Copyright (c) 2020 - 2022, Arm Limited. All rights reserved.
> +  Copyright (c) 2020 - 2024, Arm Limited. All rights reserved.
>
>     SPDX-License-Identifier: BSD-2-Clause-Patent
>
> @@ -23,6 +23,8 @@
>   #define CORE_CNT   (FixedPcdGet32 (PcdClusterCount) * \
>                         FixedPcdGet32 (PcdCoreCount))
>
> +#define ITS_CNT ((FixedPcdGet32(PcdPlatformVariant) == 3) ? 12 : 6)
> +
>   // Multiple APIC Description Table
>   #pragma pack (1)
>
> @@ -31,7 +33,7 @@ typedef struct {
>     EFI_ACPI_6_4_GIC_STRUCTURE                            GicInterfaces[CORE_CNT];
>     EFI_ACPI_6_4_GIC_DISTRIBUTOR_STRUCTURE                GicDistributor;
>     EFI_ACPI_6_4_GICR_STRUCTURE                           GicRedistributor;
> -  EFI_ACPI_6_4_GIC_ITS_STRUCTURE                        GicIts[6];
> +  EFI_ACPI_6_4_GIC_ITS_STRUCTURE                        GicIts[ITS_CNT];
>   } EFI_ACPI_6_4_MULTIPLE_APIC_DESCRIPTION_TABLE;
>
>   #pragma pack ()
> @@ -134,6 +136,14 @@ STATIC EFI_ACPI_6_4_MULTIPLE_APIC_DESCRIPTION_TABLE Madt = {
>       EFI_ACPI_6_4_GIC_ITS_INIT(3, 0x30100000),
>       EFI_ACPI_6_4_GIC_ITS_INIT(4, 0x30140000),
>       EFI_ACPI_6_4_GIC_ITS_INIT(5, 0x30180000),
> +#if (FixedPcdGet32 (PcdPlatformVariant) == 3)
> +    EFI_ACPI_6_4_GIC_ITS_INIT(6, 0x301C0000),
> +    EFI_ACPI_6_4_GIC_ITS_INIT(7, 0x30200000),
> +    EFI_ACPI_6_4_GIC_ITS_INIT(8, 0x30240000),
> +    EFI_ACPI_6_4_GIC_ITS_INIT(9, 0x30280000),
> +    EFI_ACPI_6_4_GIC_ITS_INIT(10, 0x302C0000),
> +    EFI_ACPI_6_4_GIC_ITS_INIT(11, 0x30180000),
> +#endif
>     },
>   };
>
> diff --git a/Platform/ARM/SgiPkg/RdN2Cfg3/RdN2Cfg3.fdf.inc b/Platform/ARM/SgiPkg/RdN2Cfg3/RdN2Cfg3.fdf.inc
> new file mode 100644
> index 000000000000..77288ab1ad93
> --- /dev/null
> +++ b/Platform/ARM/SgiPkg/RdN2Cfg3/RdN2Cfg3.fdf.inc
> @@ -0,0 +1,10 @@
> +#
> +#  Copyright (c) 2024, ARM Limited. All rights reserved.
> +#
> +#  SPDX-License-Identifier: BSD-2-Clause-Patent
> +#
> +
> +# Per-platform additional content of the DXE phase firmware volume
> +
> +  # ACPI support
> +  INF RuleOverride=ACPITABLE Platform/ARM/SgiPkg/AcpiTables/RdN2Cfg3AcpiTables.inf

IMPORTANT NOTICE: The contents of this email and any attachments are confidential and may also be privileged. If you are not the intended recipient, please notify the sender immediately and do not disclose the contents to any other person, use it for any purpose, or store or copy the information in any medium. Thank you.


-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#113380): https://edk2.groups.io/g/devel/message/113380
Mute This Topic: https://groups.io/mt/103544573/7686176
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [rebecca@openfw.io]
-=-=-=-=-=-=-=-=-=-=-=-



  reply	other threads:[~2024-01-08 11:08 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-01-05 15:38 [edk2-devel] [edk2-platforms][PATCH v2 0/7] Platform/Sgi: Add support for RD-N2-Cfg3 and RD-V2 platform Prabin CA
2024-01-05 15:38 ` [edk2-devel] [edk2-platforms][PATCH v2 1/7] Platform/Sgi: remove +nofp gcc option flag Prabin CA
2024-01-08 10:53   ` levi.yun
2024-01-05 15:38 ` [edk2-devel] [edk2-platforms][PATCH v2 2/7] Platform/Sgi: add no-stack-protector flag for StMM builds Prabin CA
2024-01-08 10:49   ` levi.yun
2024-01-05 15:38 ` [edk2-devel] [edk2-platforms][PATCH v2 3/7] Platform/Sgi: Add VariableFlashInfoLib to fix missing dependency Prabin CA
2024-01-08 10:51   ` levi.yun
2024-01-05 15:38 ` [edk2-devel] [edk2-platforms][PATCH v2 4/7] Platform/Sgi: Add a PCD to specify platform variant Prabin CA
2024-01-08 10:53   ` levi.yun
2024-01-05 15:38 ` [edk2-devel] [edk2-platforms][PATCH v2 5/7] Platform/Sgi: Add support for RD-N2-Cfg3 platform Prabin CA
2024-01-08 11:08   ` levi.yun [this message]
2024-01-05 15:38 ` [edk2-devel] [edk2-platforms][PATCH v2 6/7] Platform/Sgi: Define RD-V2 platform id values Prabin CA
2024-01-08 11:07   ` levi.yun
2024-01-05 15:38 ` [edk2-devel] [edk2-platforms][PATCH v2 7/7] Platform/Sgi: Extend SMBIOS support for RD-V2 platform Prabin CA
2024-01-08 11:07   ` levi.yun

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-list from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=095d6b34-12d5-47af-9bd3-6f4fa1921e11@arm.com \
    --to=devel@edk2.groups.io \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox