From nobody Thu Apr 25 12:04:04 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+54217+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+54217+1787277+3901457@groups.io Received: from web01.groups.io (web01.groups.io [66.175.222.12]) by mx.zohomail.com with SMTPS id 1581436490166121.47999223620184; Tue, 11 Feb 2020 07:54:50 -0800 (PST) Return-Path: X-Received: by 127.0.0.2 with SMTP id weGvYY1788612xRslgnaBF6Q; Tue, 11 Feb 2020 07:54:49 -0800 X-Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by mx.groups.io with SMTP id smtpd.web10.11613.1581434761345166329 for ; Tue, 11 Feb 2020 07:26:01 -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 DBCB730E; Tue, 11 Feb 2020 07:26:00 -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 3C4A63F68E; Tue, 11 Feb 2020 07:25:59 -0800 (PST) From: "Vijayenthiran Subramaniam" To: devel@edk2.groups.io, leif@nuviainc.com, michael.d.kinney@intel.com Cc: thomas.abraham@arm.com Subject: [edk2-devel] [PATCH edk2-platforms 3/5] Platform/ARM/SgiPkg: Add MultiChipMode to Platform Descriptor Date: Tue, 11 Feb 2020 20:55:35 +0530 Message-Id: <1581434737-11371-4-git-send-email-vijayenthiran.subramaniam@arm.com> In-Reply-To: <1581434737-11371-1-git-send-email-vijayenthiran.subramaniam@arm.com> References: <1581434737-11371-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: G3zLLhcSUIXuFa1052eGi0Gjx1787277AA= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1581436489; bh=UWd6Vx/4eGQ/uQC5soqZUPor3dqBLJvhBkU0OnlspcU=; h=Cc:Date:From:Reply-To:Subject:To; b=tnMD1741wj1iObOIkjuIbZF8huDmKFdKKMk4TZe0YieNjBWJzWPUOcacmfyO6cn1RQS HTOBHXa73hFsmzIaAGk5NJzHGbbqJGmVi3pv42JlFTShFKKggG1q8QuyN47wW/pIsEI08 jlXYWAt9xbXMruZuEdRZJfs+e7SHDNwJ8B8= 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 --- Platform/ARM/SgiPkg/Include/SgiPlatform.h | 4 ++++ Platform/ARM/SgiPkg/Drivers/PlatformDxe/PlatformDxe.c | 9 +++++++-- Platform/ARM/SgiPkg/Library/SgiPlatformPei/SgiPlatformPeim.c | 8 ++++++++ 3 files changed, 19 insertions(+), 2 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..d988a23b8093 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,6 +73,7 @@ ArmSgiPkgEntryPoint ( =20 PartNum =3D HobData->PlatformId; ConfigId =3D HobData->ConfigId; + MultiChipMode =3D HobData->MultiChipMode; =20 Status =3D EFI_UNSUPPORTED; =20 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 (#54217): https://edk2.groups.io/g/devel/message/54217 Mute This Topic: https://groups.io/mt/71170112/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-