From nobody Thu Apr 25 22:24:35 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of groups.io designates 66.175.222.12 as permitted sender) client-ip=66.175.222.12; envelope-from=bounce+27952+54290+1787277+3901457@groups.io; helo=web01.groups.io; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.12 as permitted sender) smtp.mailfrom=bounce+27952+54290+1787277+3901457@groups.io Received: from web01.groups.io (web01.groups.io [66.175.222.12]) by mx.zohomail.com with SMTPS id 1581514179581468.38956208064656; Wed, 12 Feb 2020 05:29:39 -0800 (PST) Return-Path: X-Received: by 127.0.0.2 with SMTP id 3lgSYY1788612xEV2kBQKHgL; Wed, 12 Feb 2020 05:29:38 -0800 X-Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by mx.groups.io with SMTP id smtpd.web11.4542.1581514178269512857 for ; Wed, 12 Feb 2020 05:29:38 -0800 X-Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id BEE26328; Wed, 12 Feb 2020 05:29:37 -0800 (PST) X-Received: from usa.arm.com (a074939-lin.blr.arm.com [10.162.16.42]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPA id E43713F6CF; Wed, 12 Feb 2020 05:29:35 -0800 (PST) From: "Vijayenthiran Subramaniam" To: devel@edk2.groups.io, leif@nuviainc.com, michael.d.kinney@intel.com, Ard.Biesheuvel@arm.com Cc: thomas.abraham@arm.com Subject: [edk2-devel] [edk2-platforms] [PATCH v2 1/5] Platform/ARM/SgiPkg: Disable use of deprecated APIs Date: Wed, 12 Feb 2020 18:59:23 +0530 Message-Id: <1581514167-1340-2-git-send-email-vijayenthiran.subramaniam@arm.com> In-Reply-To: <1581514167-1340-1-git-send-email-vijayenthiran.subramaniam@arm.com> References: <1581514167-1340-1-git-send-email-vijayenthiran.subramaniam@arm.com> Precedence: Bulk List-Unsubscribe: Sender: devel@edk2.groups.io List-Id: Mailing-List: list devel@edk2.groups.io; contact devel+owner@edk2.groups.io Reply-To: devel@edk2.groups.io,vijayenthiran.subramaniam@arm.com X-Gm-Message-State: Ta04sAHhSxD65XjcdnphSuHBx1787277AA= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1581514178; bh=X8HPhIGtYj1f88a0pQRH07ZdqZAbwFzpCI3pW4hUtBc=; h=Cc:Date:From:Reply-To:Subject:To; b=cWAEEQxfanpIdjuMgdzBr67I13Ns6DCTc4Ha/kU58efAHghcnZqiC5GOF4tMiQ7KSPF YTXr/A3+FAA5ij3SG9k/VJf48qcwh3FIVlcrVXQ2VcAFqas/s+kogZrrFpAJU15UMO5px oi1gt2boDRR3uPe7MDUXYAhgj0mG5m+NLhA= X-ZohoMail-DKIM: pass (identity @groups.io) Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Add the `DISABLE_NEW_DEPRECATED_INTERFACES` build option in DSC file to make sure that the deprecated APIs are not used SgiPkg. Signed-off-by: Vijayenthiran Subramaniam Reviewed-by: Leif Lindholm --- Platform/ARM/SgiPkg/PlatformStandaloneMm.dsc | 3 +++ Platform/ARM/SgiPkg/SgiPlatform.dsc | 3 +++ 2 files changed, 6 insertions(+) diff --git a/Platform/ARM/SgiPkg/PlatformStandaloneMm.dsc b/Platform/ARM/Sg= iPkg/PlatformStandaloneMm.dsc index 7ae19560eaca..38bf6020ba4c 100644 --- a/Platform/ARM/SgiPkg/PlatformStandaloneMm.dsc +++ b/Platform/ARM/SgiPkg/PlatformStandaloneMm.dsc @@ -132,3 +132,6 @@ [Components.AARCH64] ##########################################################################= ######################### [BuildOptions.AARCH64] GCC:*_*_*_DLINK_FLAGS =3D -z common-page-size=3D0x1000 -march=3Darmv8-a+= nofp + +[BuildOptions] + *_*_*_CC_FLAGS =3D -D DISABLE_NEW_DEPRECATED_INTERFACES diff --git a/Platform/ARM/SgiPkg/SgiPlatform.dsc b/Platform/ARM/SgiPkg/SgiP= latform.dsc index a5b7eea1d3a8..e38cc7da52a5 100644 --- a/Platform/ARM/SgiPkg/SgiPlatform.dsc +++ b/Platform/ARM/SgiPkg/SgiPlatform.dsc @@ -23,6 +23,9 @@ [Defines] =20 !include Platform/ARM/VExpressPkg/ArmVExpress.dsc.inc =20 +[BuildOptions] + *_*_*_CC_FLAGS =3D -D DISABLE_NEW_DEPRECATED_INTERFACES + [LibraryClasses.common] ArmLib|ArmPkg/Library/ArmLib/ArmBaseLib.inf ArmMmuLib|ArmPkg/Library/ArmMmuLib/ArmMmuBaseLib.inf --=20 2.7.4 -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#54290): https://edk2.groups.io/g/devel/message/54290 Mute This Topic: https://groups.io/mt/71211938/1787277 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org] -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- From nobody Thu Apr 25 22:24:35 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of groups.io designates 66.175.222.12 as permitted sender) client-ip=66.175.222.12; envelope-from=bounce+27952+54291+1787277+3901457@groups.io; helo=web01.groups.io; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.12 as permitted sender) smtp.mailfrom=bounce+27952+54291+1787277+3901457@groups.io Received: from web01.groups.io (web01.groups.io [66.175.222.12]) by mx.zohomail.com with SMTPS id 1581514181610202.31471485741883; Wed, 12 Feb 2020 05:29:41 -0800 (PST) Return-Path: X-Received: by 127.0.0.2 with SMTP id WpGtYY1788612xCsrMQ7GYtc; Wed, 12 Feb 2020 05:29:40 -0800 X-Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by mx.groups.io with SMTP id smtpd.web09.4429.1581514180336430174 for ; Wed, 12 Feb 2020 05:29:40 -0800 X-Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 13060FEC; Wed, 12 Feb 2020 05:29:40 -0800 (PST) X-Received: from usa.arm.com (a074939-lin.blr.arm.com [10.162.16.42]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPA id 3811F3F6CF; Wed, 12 Feb 2020 05:29:38 -0800 (PST) From: "Vijayenthiran Subramaniam" To: devel@edk2.groups.io, leif@nuviainc.com, michael.d.kinney@intel.com, Ard.Biesheuvel@arm.com Cc: thomas.abraham@arm.com Subject: [edk2-devel] [edk2-platforms] [PATCH v2 2/5] Platform/ARM/SgiPkg: Use lookup table to install ACPI table Date: Wed, 12 Feb 2020 18:59:24 +0530 Message-Id: <1581514167-1340-3-git-send-email-vijayenthiran.subramaniam@arm.com> In-Reply-To: <1581514167-1340-1-git-send-email-vijayenthiran.subramaniam@arm.com> References: <1581514167-1340-1-git-send-email-vijayenthiran.subramaniam@arm.com> Precedence: Bulk List-Unsubscribe: Sender: devel@edk2.groups.io List-Id: Mailing-List: list devel@edk2.groups.io; contact devel+owner@edk2.groups.io Reply-To: devel@edk2.groups.io,vijayenthiran.subramaniam@arm.com X-Gm-Message-State: 04dkSXuTV9TnIAxOmWoknyfbx1787277AA= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1581514180; bh=YoAC9rR7eOF4qhhDnW65E1gymS+/Zx7fvec4VlH6o9Y=; h=Cc:Date:From:Reply-To:Subject:To; b=hq1hwSv0PnimXsMRBqqaa+GjyPHldphoWS7ngwQdQIB8Dyy/pEvIiAapu62aPDODJn9 rXF9+vEkvyfd2GUnh54ggkdhGsGaY4t636CxGeBqx1atRT8HFESFIBNxC/iHiiBFX9ZOV pgveLQCbNb8asF/oOE+EeQjiuT2MgA3BXDg= X-ZohoMail-DKIM: pass (identity @groups.io) Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Use lookup table to identify the platform and install corresponding ACPI tables. As the number of supported platforms grow, the existing platform identification using if..else does not scale well. Signed-off-by: Vijayenthiran Subramaniam --- Platform/ARM/SgiPkg/Drivers/PlatformDxe/PlatformDxe.c | 49 +++++++++++++++= +---- 1 file changed, 39 insertions(+), 10 deletions(-) diff --git a/Platform/ARM/SgiPkg/Drivers/PlatformDxe/PlatformDxe.c b/Platfo= rm/ARM/SgiPkg/Drivers/PlatformDxe/PlatformDxe.c index 09e00e5d538b..4ab0dd768cd1 100644 --- a/Platform/ARM/SgiPkg/Drivers/PlatformDxe/PlatformDxe.c +++ b/Platform/ARM/SgiPkg/Drivers/PlatformDxe/PlatformDxe.c @@ -11,6 +11,35 @@ #include #include =20 +typedef struct { + SGI_PLATFORM_DESCRIPTOR SgiPlafromDescriptor; + CONST EFI_GUID* AcpiTableGuid; +} SGI_PLATFORM_ACPI_TABLE_GUID_LOOKUP; + +// Macro to construct the SGI_PLATFORM_ACPI_TABLE_GUID_LOOKUP structure +#define ACPI_GUID_LOOKUP(PART_NUM, CONFIG_NUM, GUID) = \ +{ = \ + { = \ + PART_NUM, CONFIG_NUM = \ + }, = \ + GUID = \ +} = \ + +STATIC SGI_PLATFORM_ACPI_TABLE_GUID_LOOKUP AcpiTableGuidLookup[] =3D { + ACPI_GUID_LOOKUP ( + SGI575_PART_NUM, + SGI575_CONF_NUM, + &gSgi575AcpiTablesFileGuid), + ACPI_GUID_LOOKUP ( + RD_N1E1_EDGE_PART_NUM, + RD_N1_EDGE_CONF_ID, + &gRdN1EdgeAcpiTablesFileGuid), + ACPI_GUID_LOOKUP ( + RD_N1E1_EDGE_PART_NUM, + RD_E1_EDGE_CONF_ID, + &gRdE1EdgeAcpiTablesFileGuid), +}; + VOID InitVirtioDevices ( VOID @@ -26,6 +55,7 @@ ArmSgiPkgEntryPoint ( EFI_STATUS Status; VOID *SystemIdHob; SGI_PLATFORM_DESCRIPTOR *HobData; + UINT8 i; UINT32 ConfigId; UINT32 PartNum; =20 @@ -40,16 +70,15 @@ ArmSgiPkgEntryPoint ( PartNum =3D HobData->PlatformId; ConfigId =3D HobData->ConfigId; =20 - if ((PartNum =3D=3D SGI575_PART_NUM) && (ConfigId =3D=3D SGI575_CONF_NUM= )) { - Status =3D LocateAndInstallAcpiFromFv (&gSgi575AcpiTablesFileGuid); - } else if ((PartNum =3D=3D RD_N1E1_EDGE_PART_NUM) && - (ConfigId =3D=3D RD_N1_EDGE_CONF_ID)) { - Status =3D LocateAndInstallAcpiFromFv (&gRdN1EdgeAcpiTablesFileGuid); - } else if ((PartNum =3D=3D RD_N1E1_EDGE_PART_NUM) && - (ConfigId =3D=3D RD_E1_EDGE_CONF_ID)) { - Status =3D LocateAndInstallAcpiFromFv (&gRdE1EdgeAcpiTablesFileGuid); - } else { - Status =3D EFI_UNSUPPORTED; + Status =3D EFI_UNSUPPORTED; + + // Walk through the AcpiTableGuidLookup lookup array + for (i =3D 0; i < ARRAY_SIZE (AcpiTableGuidLookup); i++) { + if ((PartNum =3D=3D AcpiTableGuidLookup[i].SgiPlafromDescriptor.Platfo= rmId) && + (ConfigId =3D=3D AcpiTableGuidLookup[i].SgiPlafromDescriptor.Confi= gId)) { + Status =3D LocateAndInstallAcpiFromFv (AcpiTableGuidLookup[i].AcpiTa= bleGuid); + break; + } } =20 if (EFI_ERROR (Status)) { --=20 2.7.4 -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#54291): https://edk2.groups.io/g/devel/message/54291 Mute This Topic: https://groups.io/mt/71211940/1787277 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org] -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- From nobody Thu Apr 25 22:24:35 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of groups.io designates 66.175.222.12 as permitted sender) client-ip=66.175.222.12; envelope-from=bounce+27952+54292+1787277+3901457@groups.io; helo=web01.groups.io; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.12 as permitted sender) smtp.mailfrom=bounce+27952+54292+1787277+3901457@groups.io Received: from web01.groups.io (web01.groups.io [66.175.222.12]) by mx.zohomail.com with SMTPS id 1581514185257715.0922043374841; Wed, 12 Feb 2020 05:29:45 -0800 (PST) Return-Path: X-Received: by 127.0.0.2 with SMTP id weaIYY1788612xhBsPPAddPu; Wed, 12 Feb 2020 05:29:43 -0800 X-Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by mx.groups.io with SMTP id smtpd.web09.4430.1581514182761098719 for ; Wed, 12 Feb 2020 05:29:42 -0800 X-Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 5CC99328; Wed, 12 Feb 2020 05:29:42 -0800 (PST) X-Received: from usa.arm.com (a074939-lin.blr.arm.com [10.162.16.42]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPA id 812A03F6CF; Wed, 12 Feb 2020 05:29:40 -0800 (PST) From: "Vijayenthiran Subramaniam" To: devel@edk2.groups.io, leif@nuviainc.com, michael.d.kinney@intel.com, Ard.Biesheuvel@arm.com Cc: thomas.abraham@arm.com Subject: [edk2-devel] [edk2-platforms] [PATCH v2 3/5] Platform/ARM/SgiPkg: Add MultiChipMode to Platform Descriptor Date: Wed, 12 Feb 2020 18:59:25 +0530 Message-Id: <1581514167-1340-4-git-send-email-vijayenthiran.subramaniam@arm.com> In-Reply-To: <1581514167-1340-1-git-send-email-vijayenthiran.subramaniam@arm.com> References: <1581514167-1340-1-git-send-email-vijayenthiran.subramaniam@arm.com> Precedence: Bulk List-Unsubscribe: Sender: devel@edk2.groups.io List-Id: Mailing-List: list devel@edk2.groups.io; contact devel+owner@edk2.groups.io Reply-To: devel@edk2.groups.io,vijayenthiran.subramaniam@arm.com X-Gm-Message-State: wn8LnKiz9TIZPl43TjimGC0jx1787277AA= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1581514183; bh=sq/6Z2plhv4OBg+MpOMb3+P3ISbEcGwkDOj1OOvi4HI=; h=Cc:Date:From:Reply-To:Subject:To; b=Y9OmCCiVXWZehg2wi1IhWb9UxK1hYvNAP/AdeSwzlMgkYlfqt3jkaWLaOh0HnVkHoFH Ra318oHmj0gCf8B3IOK6YhoRvlqMVSt3SdfoxbVsha6v7+FVNeJFA0ff0GnyKudMq+FRR YDUiAPF5owyEH1wOBCLSRjcmUGpzDmuPLeM= X-ZohoMail-DKIM: pass (identity @groups.io) Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" The 'system-id' node of HW_CONFIG device tree has been updated to have a new property 'multi-chip-mode' which holds the information about the multi-chip-mode support. To adapt to this change, add 'MultiChipMode' member to SGI_PLATFORM_DESCRIPTOR structure to get 'multi-chip-mode' property from fdt. Signed-off-by: Vijayenthiran Subramaniam Reviewed-by: Leif Lindholm --- Platform/ARM/SgiPkg/Include/SgiPlatform.h | 4 ++++ Platform/ARM/SgiPkg/Drivers/PlatformDxe/PlatformDxe.c | 13 ++++++++= ++--- Platform/ARM/SgiPkg/Library/SgiPlatformPei/SgiPlatformPeim.c | 8 ++++++++ 3 files changed, 22 insertions(+), 3 deletions(-) diff --git a/Platform/ARM/SgiPkg/Include/SgiPlatform.h b/Platform/ARM/SgiPk= g/Include/SgiPlatform.h index e4a2e8cc0971..7c9322d1cda9 100644 --- a/Platform/ARM/SgiPkg/Include/SgiPlatform.h +++ b/Platform/ARM/SgiPkg/Include/SgiPlatform.h @@ -79,10 +79,14 @@ #define SGI_CONFIG_SHIFT 0x1C #define SGI_PART_NUM_MASK 0xFFF =20 +#define MULTI_CHIP_MODE_DISABLED 0x0 +#define MULTI_CHIP_MODE_ENABLED 0x1 + // ARM platform description data. typedef struct { UINTN PlatformId; UINTN ConfigId; + UINTN MultiChipMode; } SGI_PLATFORM_DESCRIPTOR; =20 #endif // __SGI_PLATFORM_H__ diff --git a/Platform/ARM/SgiPkg/Drivers/PlatformDxe/PlatformDxe.c b/Platfo= rm/ARM/SgiPkg/Drivers/PlatformDxe/PlatformDxe.c index 4ab0dd768cd1..a2250a37bb57 100644 --- a/Platform/ARM/SgiPkg/Drivers/PlatformDxe/PlatformDxe.c +++ b/Platform/ARM/SgiPkg/Drivers/PlatformDxe/PlatformDxe.c @@ -17,10 +17,10 @@ typedef struct { } SGI_PLATFORM_ACPI_TABLE_GUID_LOOKUP; =20 // Macro to construct the SGI_PLATFORM_ACPI_TABLE_GUID_LOOKUP structure -#define ACPI_GUID_LOOKUP(PART_NUM, CONFIG_NUM, GUID) = \ +#define ACPI_GUID_LOOKUP(PART_NUM, CONFIG_NUM, MULTI_CHIP_MODE, GUID) = \ { = \ { = \ - PART_NUM, CONFIG_NUM = \ + PART_NUM, CONFIG_NUM, MULTI_CHIP_MODE = \ }, = \ GUID = \ } = \ @@ -29,14 +29,17 @@ STATIC SGI_PLATFORM_ACPI_TABLE_GUID_LOOKUP AcpiTableGui= dLookup[] =3D { ACPI_GUID_LOOKUP ( SGI575_PART_NUM, SGI575_CONF_NUM, + MULTI_CHIP_MODE_DISABLED, &gSgi575AcpiTablesFileGuid), ACPI_GUID_LOOKUP ( RD_N1E1_EDGE_PART_NUM, RD_N1_EDGE_CONF_ID, + MULTI_CHIP_MODE_DISABLED, &gRdN1EdgeAcpiTablesFileGuid), ACPI_GUID_LOOKUP ( RD_N1E1_EDGE_PART_NUM, RD_E1_EDGE_CONF_ID, + MULTI_CHIP_MODE_DISABLED, &gRdE1EdgeAcpiTablesFileGuid), }; =20 @@ -58,6 +61,7 @@ ArmSgiPkgEntryPoint ( UINT8 i; UINT32 ConfigId; UINT32 PartNum; + UINT32 MultiChipMode; =20 SystemIdHob =3D GetFirstGuidHob (&gArmSgiPlatformIdDescriptorGuid); if (SystemIdHob =3D=3D NULL) { @@ -69,13 +73,16 @@ ArmSgiPkgEntryPoint ( =20 PartNum =3D HobData->PlatformId; ConfigId =3D HobData->ConfigId; + MultiChipMode =3D HobData->MultiChipMode; =20 Status =3D EFI_UNSUPPORTED; =20 // Walk through the AcpiTableGuidLookup lookup array for (i =3D 0; i < ARRAY_SIZE (AcpiTableGuidLookup); i++) { if ((PartNum =3D=3D AcpiTableGuidLookup[i].SgiPlafromDescriptor.Platfo= rmId) && - (ConfigId =3D=3D AcpiTableGuidLookup[i].SgiPlafromDescriptor.Confi= gId)) { + (ConfigId =3D=3D AcpiTableGuidLookup[i].SgiPlafromDescriptor.Confi= gId) && + (MultiChipMode =3D=3D + AcpiTableGuidLookup[i].SgiPlafromDescriptor.MultiChipMode)) { Status =3D LocateAndInstallAcpiFromFv (AcpiTableGuidLookup[i].AcpiTa= bleGuid); break; } diff --git a/Platform/ARM/SgiPkg/Library/SgiPlatformPei/SgiPlatformPeim.c b= /Platform/ARM/SgiPkg/Library/SgiPlatformPei/SgiPlatformPeim.c index 4daa1832dfaf..7df52cc4fd7c 100644 --- a/Platform/ARM/SgiPkg/Library/SgiPlatformPei/SgiPlatformPeim.c +++ b/Platform/ARM/SgiPkg/Library/SgiPlatformPei/SgiPlatformPeim.c @@ -75,6 +75,14 @@ GetSgiSystemId ( =20 HobData->ConfigId =3D fdt32_to_cpu (*Property); =20 + Property =3D fdt_getprop (NtFwCfgDtBlob, Offset, "multi-chip-mode", NULL= ); + if (Property =3D=3D NULL) { + DEBUG ((DEBUG_WARN, "multi-chip-mode property not found\n")); + HobData->MultiChipMode =3D 0; + } else { + HobData->MultiChipMode =3D fdt32_to_cpu (*Property); + } + return EFI_SUCCESS; } =20 --=20 2.7.4 -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#54292): https://edk2.groups.io/g/devel/message/54292 Mute This Topic: https://groups.io/mt/71211943/1787277 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org] -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- From nobody Thu Apr 25 22:24:35 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of groups.io designates 66.175.222.12 as permitted sender) client-ip=66.175.222.12; envelope-from=bounce+27952+54293+1787277+3901457@groups.io; helo=web01.groups.io; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.12 as permitted sender) smtp.mailfrom=bounce+27952+54293+1787277+3901457@groups.io Received: from web01.groups.io (web01.groups.io [66.175.222.12]) by mx.zohomail.com with SMTPS id 1581514187092973.6800851155158; Wed, 12 Feb 2020 05:29:47 -0800 (PST) Return-Path: X-Received: by 127.0.0.2 with SMTP id R090YY1788612xfUC7UCKy1c; Wed, 12 Feb 2020 05:29:46 -0800 X-Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by mx.groups.io with SMTP id smtpd.web10.4363.1581514185316289826 for ; Wed, 12 Feb 2020 05:29:45 -0800 X-Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id E6ACCFEC; Wed, 12 Feb 2020 05:29:44 -0800 (PST) X-Received: from usa.arm.com (a074939-lin.blr.arm.com [10.162.16.42]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPA id CB4523F6CF; Wed, 12 Feb 2020 05:29:42 -0800 (PST) From: "Vijayenthiran Subramaniam" To: devel@edk2.groups.io, leif@nuviainc.com, michael.d.kinney@intel.com, Ard.Biesheuvel@arm.com Cc: thomas.abraham@arm.com Subject: [edk2-devel] [edk2-platforms] [PATCH v2 4/5] Platform/ARM/Sgi: Add ACPI tables for dual-chip RD-N1-Edge platform Date: Wed, 12 Feb 2020 18:59:26 +0530 Message-Id: <1581514167-1340-5-git-send-email-vijayenthiran.subramaniam@arm.com> In-Reply-To: <1581514167-1340-1-git-send-email-vijayenthiran.subramaniam@arm.com> References: <1581514167-1340-1-git-send-email-vijayenthiran.subramaniam@arm.com> Precedence: Bulk List-Unsubscribe: Sender: devel@edk2.groups.io List-Id: Mailing-List: list devel@edk2.groups.io; contact devel+owner@edk2.groups.io Reply-To: devel@edk2.groups.io,vijayenthiran.subramaniam@arm.com X-Gm-Message-State: mLd64ed575Q0imqfSDDD1lqvx1787277AA= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1581514186; bh=9YIvvwbx4um5v7rcvhzZ8svM12j26oDk8eD+Eedgigo=; h=Cc:Date:From:Reply-To:Subject:To; b=EY9HGPFmyiZxNaP+m4YQsJ1/fJI1rRp3Wlv5MD0EJjgHmgVyHF9g2S/vFQrh2C82AS5 3UPMdyWZkyJl76+yrGOtJiRTM4yboufDhIZKdT/ln4I3SMktN6M9oGoZGviFf8ZAmSUTr 1mdq2IV16YMwcaI28QG5ZT1ywMs4qnMsn7g= X-ZohoMail-DKIM: pass (identity @groups.io) Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" RD-N1-Edge supports a dual-chip configuration in which two RD-N1-Edge platforms are connected through high speed CCIX link. In this dual-chip configuration, the CPU and core GIC Redistributors count are doubled. Add ACPI tables for dual-chip RD-N1-Edge platform. Signed-off-by: Vijayenthiran Subramaniam Reviewed-by: Leif Lindholm --- Platform/ARM/SgiPkg/SgiPlatform.dec | 1 + Platform/ARM/SgiPkg/SgiPlatform.dsc | 1 + Platform/ARM/SgiPkg/SgiPlatform.fdf | 1 + Platform/ARM/SgiPkg/AcpiTables/RdN1EdgeX2AcpiTables.inf | 59 ++++++ Platform/ARM/SgiPkg/Include/SgiPlatform.h | 3 + Platform/ARM/SgiPkg/AcpiTables/RdN1EdgeX2/Madt.aslc | 198 ++++++++++++= ++++++++ 6 files changed, 263 insertions(+) diff --git a/Platform/ARM/SgiPkg/SgiPlatform.dec b/Platform/ARM/SgiPkg/SgiP= latform.dec index 229552ea7842..9d70ec677776 100644 --- a/Platform/ARM/SgiPkg/SgiPlatform.dec +++ b/Platform/ARM/SgiPkg/SgiPlatform.dec @@ -28,6 +28,7 @@ [Guids.common] gArmSgiTokenSpaceGuid =3D { 0x577d6941, 0xaea1, 0x40b4, { 0x90, 0x9= 3, 0x2a, 0x86, 0x61, 0x72, 0x5a, 0x57 } } gSgi575AcpiTablesFileGuid =3D { 0xc712719a, 0x0aaf, 0x438c, { 0x9c, 0xd= d, 0x35, 0xab, 0x4d, 0x60, 0x20, 0x7d } } gRdN1EdgeAcpiTablesFileGuid =3D { 0x4b0b91d0, 0x4a05, 0x45c4, { 0x88, 0x= a7, 0x88, 0xe1, 0x70, 0xe7, 0x66, 0x94 } } + gRdN1EdgeX2AcpiTablesFileGuid =3D { 0x82a34150, 0x0fc6, 0x45f4, { 0x8e, = 0xa0, 0xf0, 0xa4, 0x66, 0x0c, 0xf3, 0x5d } } gRdE1EdgeAcpiTablesFileGuid =3D { 0x2af40815, 0xa84e, 0x4de9, { 0x8c, 0x= 38, 0x91, 0x40, 0xb3, 0x54, 0x40, 0x73 } } =20 [PcdsFeatureFlag.common] diff --git a/Platform/ARM/SgiPkg/SgiPlatform.dsc b/Platform/ARM/SgiPkg/SgiP= latform.dsc index e38cc7da52a5..5226c5751e98 100644 --- a/Platform/ARM/SgiPkg/SgiPlatform.dsc +++ b/Platform/ARM/SgiPkg/SgiPlatform.dsc @@ -279,6 +279,7 @@ [Components.common] MdeModulePkg/Universal/Acpi/AcpiTableDxe/AcpiTableDxe.inf Platform/ARM/SgiPkg/AcpiTables/Sgi575AcpiTables.inf Platform/ARM/SgiPkg/AcpiTables/RdN1EdgeAcpiTables.inf + Platform/ARM/SgiPkg/AcpiTables/RdN1EdgeX2AcpiTables.inf Platform/ARM/SgiPkg/AcpiTables/RdE1EdgeAcpiTables.inf MdeModulePkg/Universal/HiiDatabaseDxe/HiiDatabaseDxe.inf =20 diff --git a/Platform/ARM/SgiPkg/SgiPlatform.fdf b/Platform/ARM/SgiPkg/SgiP= latform.fdf index 44e571a184bf..3d13998015b9 100644 --- a/Platform/ARM/SgiPkg/SgiPlatform.fdf +++ b/Platform/ARM/SgiPkg/SgiPlatform.fdf @@ -101,6 +101,7 @@ [FV.FvMain] INF MdeModulePkg/Universal/Acpi/AcpiTableDxe/AcpiTableDxe.inf INF RuleOverride=3DACPITABLE Platform/ARM/SgiPkg/AcpiTables/Sgi575AcpiTa= bles.inf INF RuleOverride=3DACPITABLE Platform/ARM/SgiPkg/AcpiTables/RdN1EdgeAcpi= Tables.inf + INF RuleOverride=3DACPITABLE Platform/ARM/SgiPkg/AcpiTables/RdN1EdgeX2Ac= piTables.inf INF RuleOverride=3DACPITABLE Platform/ARM/SgiPkg/AcpiTables/RdE1EdgeAcpi= Tables.inf INF MdeModulePkg/Universal/HiiDatabaseDxe/HiiDatabaseDxe.inf =20 diff --git a/Platform/ARM/SgiPkg/AcpiTables/RdN1EdgeX2AcpiTables.inf b/Plat= form/ARM/SgiPkg/AcpiTables/RdN1EdgeX2AcpiTables.inf new file mode 100644 index 000000000000..1b584b152455 --- /dev/null +++ b/Platform/ARM/SgiPkg/AcpiTables/RdN1EdgeX2AcpiTables.inf @@ -0,0 +1,59 @@ +## @file +# ACPI table data and ASL sources required to boot the platform. +# +# Copyright (c) 2020, ARM Ltd. All rights reserved. +# +# SPDX-License-Identifier: BSD-2-Clause-Patent +# +## + +[Defines] + INF_VERSION =3D 0x0001001A + BASE_NAME =3D RdN1EdgeX2AcpiTables + FILE_GUID =3D 82a34150-0fc6-45f4-8ea0-f0a4660cf35d + MODULE_TYPE =3D USER_DEFINED + VERSION_STRING =3D 1.0 + +[Sources] + Dbg2.aslc + Fadt.aslc + Gtdt.aslc + Iort.aslc + Mcfg.aslc + RdN1Edge/Dsdt.asl + RdN1EdgeX2/Madt.aslc + Spcr.aslc + Ssdt.asl + +[Packages] + ArmPkg/ArmPkg.dec + ArmPlatformPkg/ArmPlatformPkg.dec + EmbeddedPkg/EmbeddedPkg.dec + MdePkg/MdePkg.dec + Platform/ARM/SgiPkg/SgiPlatform.dec + +[FixedPcd] + gArmPlatformTokenSpaceGuid.PcdCoreCount + gArmPlatformTokenSpaceGuid.PcdClusterCount + gArmPlatformTokenSpaceGuid.PcdSerialDbgRegisterBase + gArmPlatformTokenSpaceGuid.PL011UartInterrupt + + gArmTokenSpaceGuid.PcdArmArchTimerSecIntrNum + gArmTokenSpaceGuid.PcdArmArchTimerIntrNum + gArmTokenSpaceGuid.PcdArmArchTimerHypIntrNum + gArmTokenSpaceGuid.PcdArmArchTimerVirtIntrNum + gArmTokenSpaceGuid.PcdGicDistributorBase + gArmTokenSpaceGuid.PcdGicRedistributorsBase + gArmTokenSpaceGuid.PcdGenericWatchdogControlBase + gArmTokenSpaceGuid.PcdGenericWatchdogRefreshBase + gArmTokenSpaceGuid.PcdPciBusMin + gArmTokenSpaceGuid.PcdPciBusMax + + gArmSgiTokenSpaceGuid.PcdVirtioBlkBaseAddress + gArmSgiTokenSpaceGuid.PcdVirtioBlkSize + gArmSgiTokenSpaceGuid.PcdVirtioBlkInterrupt + gArmSgiTokenSpaceGuid.PcdVirtioNetBaseAddress + gArmSgiTokenSpaceGuid.PcdVirtioNetSize + gArmSgiTokenSpaceGuid.PcdVirtioNetInterrupt + + gEfiMdePkgTokenSpaceGuid.PcdPciExpressBaseAddress diff --git a/Platform/ARM/SgiPkg/Include/SgiPlatform.h b/Platform/ARM/SgiPk= g/Include/SgiPlatform.h index 7c9322d1cda9..e36a412155ff 100644 --- a/Platform/ARM/SgiPkg/Include/SgiPlatform.h +++ b/Platform/ARM/SgiPkg/Include/SgiPlatform.h @@ -82,6 +82,9 @@ #define MULTI_CHIP_MODE_DISABLED 0x0 #define MULTI_CHIP_MODE_ENABLED 0x1 =20 +// Remote chip address offset (4TB per chip) +#define SGI_REMOTE_CHIP_MEM_OFFSET(n) ((1ULL << 42) * (n)) + // ARM platform description data. typedef struct { UINTN PlatformId; diff --git a/Platform/ARM/SgiPkg/AcpiTables/RdN1EdgeX2/Madt.aslc b/Platform= /ARM/SgiPkg/AcpiTables/RdN1EdgeX2/Madt.aslc new file mode 100644 index 000000000000..d4538233d760 --- /dev/null +++ b/Platform/ARM/SgiPkg/AcpiTables/RdN1EdgeX2/Madt.aslc @@ -0,0 +1,198 @@ +/** @file +* Multiple APIC Description Table (MADT) +* +* Copyright (c) 2019, ARM Limited. All rights reserved. +* +* SPDX-License-Identifier: BSD-2-Clause-Patent +* +**/ + +#include "SgiPlatform.h" +#include "SgiAcpiHeader.h" +#include +#include +#include +#include + +#define CORE_CNT (FixedPcdGet32 (PcdClusterCount) * \ + FixedPcdGet32 (PcdCoreCount)) + +#define CHIP_CNT 2 + +// EFI_ACPI_6_2_GIC_STRUCTURE +#define EFI_ACPI_6_2_GICC_STRUCTURE_INIT(GicId, AcpiCpuUid, Mpidr, Flags, = \ + PmuIrq, GicBase, GicVBase, GicHBase, GsivId, GicRBase, Efficiency) = \ + { = \ + EFI_ACPI_6_2_GIC, /* Type */ = \ + sizeof (EFI_ACPI_6_2_GIC_STRUCTURE), /* Length */ = \ + EFI_ACPI_RESERVED_WORD, /* Reserved */ = \ + GicId, /* CPUInterfaceNumber */ = \ + AcpiCpuUid, /* AcpiProcessorUid */ = \ + Flags, /* Flags */ = \ + 0, /* ParkingProtocolVersion */ = \ + PmuIrq, /* PerformanceInterruptGsiv */ = \ + 0, /* ParkedAddress */ = \ + GicBase, /* PhysicalBaseAddress */ = \ + GicVBase, /* GICV */ = \ + GicHBase, /* GICH */ = \ + GsivId, /* VGICMaintenanceInterrupt */ = \ + GicRBase, /* GICRBaseAddress */ = \ + Mpidr, /* MPIDR */ = \ + Efficiency, /* ProcessorPowerEfficiencyClass= */ \ + { = \ + EFI_ACPI_RESERVED_BYTE, /* Reserved2[0] */ = \ + EFI_ACPI_RESERVED_BYTE, /* Reserved2[1] */ = \ + EFI_ACPI_RESERVED_BYTE /* Reserved2[2] */ = \ + } = \ + } + +// EFI_ACPI_6_2_GIC_DISTRIBUTOR_STRUCTURE +#define EFI_ACPI_6_2_GIC_DISTRIBUTOR_INIT(GicDistHwId, GicDistBase, = \ + GicDistVector, GicVersion) = \ + { = \ + EFI_ACPI_6_2_GICD, /* Type */ = \ + sizeof (EFI_ACPI_6_2_GIC_DISTRIBUTOR_STRUCTURE), = \ + EFI_ACPI_RESERVED_WORD, /* Reserved1 */ = \ + GicDistHwId, /* GicId */ = \ + GicDistBase, /* PhysicalBaseAddress */ = \ + GicDistVector, /* SystemVectorBase */ = \ + GicVersion, /* GicVersion */ = \ + { = \ + EFI_ACPI_RESERVED_BYTE, /* Reserved2[0] */ = \ + EFI_ACPI_RESERVED_BYTE, /* Reserved2[1] */ = \ + EFI_ACPI_RESERVED_BYTE /* Reserved2[2] */ = \ + } = \ + } + +// EFI_ACPI_6_2_GICR_STRUCTURE +#define EFI_ACPI_6_2_GIC_REDISTRIBUTOR_INIT(RedisRegionAddr, RedisDiscLeng= th) \ + { = \ + EFI_ACPI_6_2_GICR, /* Type */ = \ + sizeof (EFI_ACPI_6_2_GICR_STRUCTURE), /* Length */ = \ + EFI_ACPI_RESERVED_WORD, /* Reserved */ = \ + RedisRegionAddr, /* DiscoveryRangeBaseAddress */ = \ + RedisDiscLength /* DiscoveryRangeLength */ = \ + } + +// Multiple APIC Description Table +#pragma pack (1) + +typedef struct { + EFI_ACPI_6_2_MULTIPLE_APIC_DESCRIPTION_TABLE_HEADER Header; + EFI_ACPI_6_2_GIC_STRUCTURE GicInterfaces[CORE_= CNT * CHIP_CNT]; + EFI_ACPI_6_2_GIC_DISTRIBUTOR_STRUCTURE GicDistributor; + EFI_ACPI_6_2_GICR_STRUCTURE GicRedistributor[CH= IP_CNT]; +} EFI_ACPI_6_2_MULTIPLE_APIC_DESCRIPTION_TABLE; + +#pragma pack () + +STATIC EFI_ACPI_6_2_MULTIPLE_APIC_DESCRIPTION_TABLE Madt =3D { + { + ARM_ACPI_HEADER ( + EFI_ACPI_6_2_MULTIPLE_APIC_DESCRIPTION_TABLE_SIGNATURE, + EFI_ACPI_6_2_MULTIPLE_APIC_DESCRIPTION_TABLE, + EFI_ACPI_6_2_MULTIPLE_APIC_DESCRIPTION_TABLE_REVISION + ), + // MADT specific fields + 0, // LocalApicAddress + 0 // Flags + }, + { + // Format: EFI_ACPI_6_2_GICC_STRUCTURE_INIT(GicId, AcpiCpuUid, Mpidr, = Flags, + // PmuIrq, GicBase, GicVBase, + // GicHBase, GsivId, GicRBase, + // Efficiency) + // Note: The GIC Structure of the primary CPU must be the first entry + // (see note in 5.2.12.14 GICC Structure of ACPI v6.2). + + // Chip - 0 CPUs + + EFI_ACPI_6_2_GICC_STRUCTURE_INIT( // Neoverse-N1-0 + 0, 0, GET_MPID(0x0, 0x0), EFI_ACPI_6_2_GIC_ENABLED, 23, + FixedPcdGet32 (PcdGicDistributorBase), + 0x2c020000, 0x2c010000, 25, 0 /* GicRBase */, 0 /* Efficiency */), + EFI_ACPI_6_2_GICC_STRUCTURE_INIT( // Neoverse-N1-1 + 0, 1, GET_MPID(0x0, 0x100), EFI_ACPI_6_2_GIC_ENABLED, 23, + FixedPcdGet32 (PcdGicDistributorBase), + 0x2c020000, 0x2c010000, 25, 0 /* GicRBase */, 0 /* Efficiency */), + EFI_ACPI_6_2_GICC_STRUCTURE_INIT( // Neoverse-N1-2 + 0, 2, GET_MPID(0x0, 0x200), EFI_ACPI_6_2_GIC_ENABLED, 23, + FixedPcdGet32 (PcdGicDistributorBase), + 0x2c020000, 0x2c010000, 25, 0 /* GicRBase */, 0 /* Efficiency */), + EFI_ACPI_6_2_GICC_STRUCTURE_INIT( // Neoverse-N1-3 + 0, 3, GET_MPID(0x0, 0x300), EFI_ACPI_6_2_GIC_ENABLED, 23, + FixedPcdGet32 (PcdGicDistributorBase), + 0x2c020000, 0x2c010000, 25, 0 /* GicRBase */, 0 /* Efficiency */), + + EFI_ACPI_6_2_GICC_STRUCTURE_INIT( // Neoverse-N1-4 + 0, 4, GET_MPID(0x100, 0x00), EFI_ACPI_6_2_GIC_ENABLED, 23, + FixedPcdGet32 (PcdGicDistributorBase), + 0x2c020000, 0x2c010000, 25, 0 /* GicRBase */, 0 /* Efficiency */), + EFI_ACPI_6_2_GICC_STRUCTURE_INIT( // Neoverse-N1-5 + 0, 5, GET_MPID(0x100, 0x100), EFI_ACPI_6_2_GIC_ENABLED, 23, + FixedPcdGet32 (PcdGicDistributorBase), + 0x2c020000, 0x2c010000, 25, 0 /* GicRBase */, 0 /* Efficiency */), + EFI_ACPI_6_2_GICC_STRUCTURE_INIT( // Neoverse-N1-6 + 0, 6, GET_MPID(0x100, 0x200), EFI_ACPI_6_2_GIC_ENABLED, 23, + FixedPcdGet32 (PcdGicDistributorBase), + 0x2c020000, 0x2c010000, 25, 0 /* GicRBase */, 0 /* Efficiency */), + EFI_ACPI_6_2_GICC_STRUCTURE_INIT( // Neoverse-N1-7 + 0, 7, GET_MPID(0x100, 0x300), EFI_ACPI_6_2_GIC_ENABLED, 23, + FixedPcdGet32 (PcdGicDistributorBase), + 0x2c020000, 0x2c010000, 25, 0 /* GicRBase */, 0 /* Efficiency */), + + // Chip - 1 CPUs + + EFI_ACPI_6_2_GICC_STRUCTURE_INIT( // Neoverse-N1-8 + 0, 8, GET_MPID(0x01000000ULL, 0x0), EFI_ACPI_6_2_GIC_ENABLED, 23, + FixedPcdGet32 (PcdGicDistributorBase), + 0x2c020000, 0x2c010000, 25, 0 /* GicRBase */, 0 /* Efficiency */), + EFI_ACPI_6_2_GICC_STRUCTURE_INIT( // Neoverse-N1-9 + 0, 9, GET_MPID(0x01000000ULL, 0x100), EFI_ACPI_6_2_GIC_ENABLED, 23, + FixedPcdGet32 (PcdGicDistributorBase), + 0x2c020000, 0x2c010000, 25, 0 /* GicRBase */, 0 /* Efficiency */), + EFI_ACPI_6_2_GICC_STRUCTURE_INIT( // Neoverse-N1-10 + 0, 10, GET_MPID(0x01000000ULL, 0x200), EFI_ACPI_6_2_GIC_ENABLED, 23, + FixedPcdGet32 (PcdGicDistributorBase), + 0x2c020000, 0x2c010000, 25, 0 /* GicRBase */, 0 /* Efficiency */), + EFI_ACPI_6_2_GICC_STRUCTURE_INIT( // Neoverse-N1-11 + 0, 11, GET_MPID(0x01000000ULL, 0x300), EFI_ACPI_6_2_GIC_ENABLED, 23, + FixedPcdGet32 (PcdGicDistributorBase), + 0x2c020000, 0x2c010000, 25, 0 /* GicRBase */, 0 /* Efficiency */), + + EFI_ACPI_6_2_GICC_STRUCTURE_INIT( // Neoverse-N1-12 + 0, 12, GET_MPID(0x01000100ULL, 0x00ULL), EFI_ACPI_6_2_GIC_ENABLED, 2= 3, + FixedPcdGet32 (PcdGicDistributorBase), + 0x2c020000, 0x2c010000, 25, 0 /* GicRBase */, 0 /* Efficiency */), + EFI_ACPI_6_2_GICC_STRUCTURE_INIT( // Neoverse-N1-13 + 0, 13, GET_MPID(0x01000100ULL, 0x100), EFI_ACPI_6_2_GIC_ENABLED, 23, + FixedPcdGet32 (PcdGicDistributorBase), + 0x2c020000, 0x2c010000, 25, 0 /* GicRBase */, 0 /* Efficiency */), + EFI_ACPI_6_2_GICC_STRUCTURE_INIT( // Neoverse-N1-14 + 0, 14, GET_MPID(0x01000100ULL, 0x200), EFI_ACPI_6_2_GIC_ENABLED, 23, + FixedPcdGet32 (PcdGicDistributorBase), + 0x2c020000, 0x2c010000, 25, 0 /* GicRBase */, 0 /* Efficiency */), + EFI_ACPI_6_2_GICC_STRUCTURE_INIT( // Neoverse-N1-15 + 0, 15, GET_MPID(0x01000100ULL, 0x300), EFI_ACPI_6_2_GIC_ENABLED, 23, + FixedPcdGet32 (PcdGicDistributorBase), + 0x2c020000, 0x2c010000, 25, 0 /* GicRBase */, 0 /* Efficiency */) + }, + // GIC Distributor Entry + EFI_ACPI_6_2_GIC_DISTRIBUTOR_INIT(0, FixedPcdGet32 (PcdGicDistributorBas= e), + 0, 3), + { + // GIC Redistributor for Chip 0 + EFI_ACPI_6_2_GIC_REDISTRIBUTOR_INIT(FixedPcdGet32 (PcdGicRedistributor= sBase), + SIZE_1MB), + // GIC Redistributor for Chip 1 + EFI_ACPI_6_2_GIC_REDISTRIBUTOR_INIT(FixedPcdGet32 (PcdGicRedistributor= sBase) + + SGI_REMOTE_CHIP_MEM_OFFSET(1), + SIZE_1MB) + } +}; + +// +// Reference the table being generated to prevent the optimizer from remov= ing +// the data structure from the executable +// +VOID* CONST ReferenceAcpiTable =3D &Madt; --=20 2.7.4 -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#54293): https://edk2.groups.io/g/devel/message/54293 Mute This Topic: https://groups.io/mt/71211948/1787277 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org] -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- From nobody Thu Apr 25 22:24:35 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of groups.io designates 66.175.222.12 as permitted sender) client-ip=66.175.222.12; envelope-from=bounce+27952+54294+1787277+3901457@groups.io; helo=web01.groups.io; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.12 as permitted sender) smtp.mailfrom=bounce+27952+54294+1787277+3901457@groups.io Received: from web01.groups.io (web01.groups.io [66.175.222.12]) by mx.zohomail.com with SMTPS id 158151418879112.423036892958976; Wed, 12 Feb 2020 05:29:48 -0800 (PST) Return-Path: X-Received: by 127.0.0.2 with SMTP id bw1WYY1788612xR3WjPJ6Nwo; Wed, 12 Feb 2020 05:29:48 -0800 X-Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by mx.groups.io with SMTP id smtpd.web11.4545.1581514187584310189 for ; Wed, 12 Feb 2020 05:29:47 -0800 X-Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 3C7E8FEC; Wed, 12 Feb 2020 05:29:47 -0800 (PST) X-Received: from usa.arm.com (a074939-lin.blr.arm.com [10.162.16.42]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPA id 60CAD3F6CF; Wed, 12 Feb 2020 05:29:45 -0800 (PST) From: "Vijayenthiran Subramaniam" To: devel@edk2.groups.io, leif@nuviainc.com, michael.d.kinney@intel.com, Ard.Biesheuvel@arm.com Cc: thomas.abraham@arm.com Subject: [edk2-devel] [edk2-platforms] [PATCH v2 5/5] Platform/ARM/Sgi: Add initial support for RD-N1-Edge-Dual platform Date: Wed, 12 Feb 2020 18:59:27 +0530 Message-Id: <1581514167-1340-6-git-send-email-vijayenthiran.subramaniam@arm.com> In-Reply-To: <1581514167-1340-1-git-send-email-vijayenthiran.subramaniam@arm.com> References: <1581514167-1340-1-git-send-email-vijayenthiran.subramaniam@arm.com> Precedence: Bulk List-Unsubscribe: Sender: devel@edk2.groups.io List-Id: Mailing-List: list devel@edk2.groups.io; contact devel+owner@edk2.groups.io Reply-To: devel@edk2.groups.io,vijayenthiran.subramaniam@arm.com X-Gm-Message-State: pv15UfJR1Aha4N9gjNifFf1jx1787277AA= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1581514188; bh=MatYyRp18odl5tmHqzcGDzxbOqCV3V2/NYgRtB+8oF4=; h=Cc:Date:From:Reply-To:Subject:To; b=cRNpy0xsKW2rR31u+Hs+tGxthyY8BbSY4iOwd+6sAeGvkmYl7S2DL6/Dv61KynP9u9K wLSsYqqB9Mio8C9b3sBnZXEIQiKmYqxhGyaQVKqtS00KtrJvZcyLUi5/hkp6dHpN5hvIO peQ8xkqC0rK79BdyAxxllk24bXqwLLX4/ZE= X-ZohoMail-DKIM: pass (identity @groups.io) Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" For RD-N1-Edge platforms, use multi-chip-mode information from the SGI platform descriptor HOB to pick the correct ACPI table to be installed. Signed-off-by: Vijayenthiran Subramaniam Reviewed-by: Leif Lindholm --- Platform/ARM/SgiPkg/Drivers/PlatformDxe/PlatformDxe.inf | 1 + Platform/ARM/SgiPkg/Drivers/PlatformDxe/PlatformDxe.c | 5 +++++ 2 files changed, 6 insertions(+) diff --git a/Platform/ARM/SgiPkg/Drivers/PlatformDxe/PlatformDxe.inf b/Plat= form/ARM/SgiPkg/Drivers/PlatformDxe/PlatformDxe.inf index a95c0d1dddd6..741dcc75ed6a 100644 --- a/Platform/ARM/SgiPkg/Drivers/PlatformDxe/PlatformDxe.inf +++ b/Platform/ARM/SgiPkg/Drivers/PlatformDxe/PlatformDxe.inf @@ -32,6 +32,7 @@ [Guids] gArmSgiPlatformIdDescriptorGuid gSgi575AcpiTablesFileGuid gRdN1EdgeAcpiTablesFileGuid + gRdN1EdgeX2AcpiTablesFileGuid gRdE1EdgeAcpiTablesFileGuid =20 [FeaturePcd] diff --git a/Platform/ARM/SgiPkg/Drivers/PlatformDxe/PlatformDxe.c b/Platfo= rm/ARM/SgiPkg/Drivers/PlatformDxe/PlatformDxe.c index a2250a37bb57..3ef775187ac6 100644 --- a/Platform/ARM/SgiPkg/Drivers/PlatformDxe/PlatformDxe.c +++ b/Platform/ARM/SgiPkg/Drivers/PlatformDxe/PlatformDxe.c @@ -38,6 +38,11 @@ STATIC SGI_PLATFORM_ACPI_TABLE_GUID_LOOKUP AcpiTableGuid= Lookup[] =3D { &gRdN1EdgeAcpiTablesFileGuid), ACPI_GUID_LOOKUP ( RD_N1E1_EDGE_PART_NUM, + RD_N1_EDGE_CONF_ID, + MULTI_CHIP_MODE_ENABLED, + &gRdN1EdgeX2AcpiTablesFileGuid), + ACPI_GUID_LOOKUP ( + RD_N1E1_EDGE_PART_NUM, RD_E1_EDGE_CONF_ID, MULTI_CHIP_MODE_DISABLED, &gRdE1EdgeAcpiTablesFileGuid), --=20 2.7.4 -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#54294): https://edk2.groups.io/g/devel/message/54294 Mute This Topic: https://groups.io/mt/71211949/1787277 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org] -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-