From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by mx.groups.io with SMTP id smtpd.web09.12520.1659267968928038228 for ; Sun, 31 Jul 2022 04:46:09 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=jfTRsjnl; spf=pass (domain: kernel.org, ip: 139.178.84.217, mailfrom: ardb@kernel.org) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 4B7E960C8B for ; Sun, 31 Jul 2022 11:46:08 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id A23D9C43470 for ; Sun, 31 Jul 2022 11:46:07 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1659267967; bh=QYw6CUMCGg2bNY9Ozdkd+c+fgXrF1GVaUlqJP8J5EOw=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=jfTRsjnlavRi8Qlzwmbp+ZJ7Av8cqXI6Lbaaia5y3lOQgUsOe3PTjYfF15/kqGMuq H3wZix3/Fkyju9F+ZhQrMpEQyk4LbABAaimMIiVZPjZbF1VXL+mwNo1sCU2EEXWaog KtDoq8foocAY32TgG7UtewSTxBvC62wOO9DPTVfY1WWnMm7+AsE4BZ7f4g9j38tmio 8xmKm5SQgNkTp2SkGbv3o2k4ngDgGKhZOMDgtinaUpZcTrWzlnAR8x3ZYzpJGq5Zyu uSct6AJWxyGV2JU/hERJiEl9GLC0WpQFbTas1lgi8Pb5SfrMIPeehMl8GlyTv+rM++ d/njNrMZU/0vA== Received: by mail-oa1-f41.google.com with SMTP id 586e51a60fabf-10ec41637b3so2440488fac.4 for ; Sun, 31 Jul 2022 04:46:07 -0700 (PDT) X-Gm-Message-State: AJIora9FtCB5ksfunrK8FhSGqq3CQVWp4NKu0Ve+U9xRqa9yMHzRXmwN qY8CyhvvotT/BYDkMsIRsJdcwCXdiP/7QJna6/U= X-Google-Smtp-Source: AGRyM1uEOl5HcTWJFADsqc/SeSk5HZxmSuEBPh0+wK85y6ieBcbnjgQLBB9YDTfmiAGej5cAZfpI2jDN/J1cLuhazkQ= X-Received: by 2002:a05:6870:a90a:b0:10d:9e83:98a6 with SMTP id eq10-20020a056870a90a00b0010d9e8398a6mr5481608oab.228.1659267966767; Sun, 31 Jul 2022 04:46:06 -0700 (PDT) MIME-Version: 1.0 References: <20220729210719.19324-1-sami.mujawar@arm.com> In-Reply-To: <20220729210719.19324-1-sami.mujawar@arm.com> From: "Ard Biesheuvel" Date: Sun, 31 Jul 2022 13:45:55 +0200 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [edk2-devel] [PATCH edk2-platforms v1 1/1] Platform/Ampere: Fix build break in JadePkg To: edk2-devel-groups-io , Sami Mujawar Cc: Ard Biesheuvel , Nhi Pham , Vu Nguyen , Thang Nguyen , Chuong Tran , Leif Lindholm , Akanksha Jain , Matteo Carlini , Ben Adderson , nd Content-Type: text/plain; charset="UTF-8" On Fri, 29 Jul 2022 at 23:07, Sami Mujawar wrote: > > The definition for ARM_PROCESSOR_TABLE has been removed by > commit c8af26627a4e9a3659255dc147d75596da08248e > as it is a pseudo ACPI table. > > This causes the JadePkg builds to fail. Therefore, update > Ampere/JadePkg to reflect this change. > > Signed-off-by: Sami Mujawar Apologies for missing this usage. Reviewed-by: Ard Biesheuvel Pushed as f00b553b101c..7986a26aefad > --- > Platform/Ampere/JadePkg/Drivers/AcpiPlatformDxe/AcpiSrat.c | 22 +++++++++++--------- > 1 file changed, 12 insertions(+), 10 deletions(-) > > diff --git a/Platform/Ampere/JadePkg/Drivers/AcpiPlatformDxe/AcpiSrat.c b/Platform/Ampere/JadePkg/Drivers/AcpiPlatformDxe/AcpiSrat.c > index d5bc732b08bbfc61a24781f82f575b33b17d75d8..93dabce0e68ab090ac86ec8066ab1b40372e4746 100644 > --- a/Platform/Ampere/JadePkg/Drivers/AcpiPlatformDxe/AcpiSrat.c > +++ b/Platform/Ampere/JadePkg/Drivers/AcpiPlatformDxe/AcpiSrat.c > @@ -1,6 +1,7 @@ > /** @file > > Copyright (c) 2020 - 2021, Ampere Computing LLC. All rights reserved.
> + Copyright (c) 2022, ARM Ltd. All rights reserved.
> > SPDX-License-Identifier: BSD-2-Clause-Patent > > @@ -115,7 +116,8 @@ SratAddGiccAffinity ( > EFI_ACPI_6_3_GICC_AFFINITY_STRUCTURE *SratGiccAffinity > ) > { > - ARM_PROCESSOR_TABLE *ArmProcessorTable; > + VOID *Hob; > + UINTN NumberOfEntries; > ARM_CORE_INFO *ArmCoreInfoTable; > UINTN Count, NumNode, Idx; > UINT32 AcpiProcessorUid; > @@ -123,22 +125,22 @@ SratAddGiccAffinity ( > UINT8 Core; > UINT8 Cpm; > > - for (Idx = 0; Idx < gST->NumberOfTableEntries; Idx++) { > - if (CompareGuid (&gArmMpCoreInfoGuid, &(gST->ConfigurationTable[Idx].VendorGuid))) { > - ArmProcessorTable = (ARM_PROCESSOR_TABLE *)gST->ConfigurationTable[Idx].VendorTable; > - ArmCoreInfoTable = ArmProcessorTable->ArmCpus; > - break; > - } > + Hob = GetFirstGuidHob (&gArmMpCoreInfoGuid); > + if (Hob == NULL) { > + return EFI_NOT_FOUND; > } > > - if (Idx == gST->NumberOfTableEntries) { > + ArmCoreInfoTable = (ARM_CORE_INFO*)GET_GUID_HOB_DATA (Hob); > + NumberOfEntries = GET_GUID_HOB_DATA_SIZE (Hob)/sizeof (ARM_CORE_INFO); > + > + if (NumberOfEntries == 0) { > return EFI_INVALID_PARAMETER; > } > > Count = 0; > NumNode = 0; > - while (Count != ArmProcessorTable->NumberOfEntries) { > - for (Idx = 0; Idx < ArmProcessorTable->NumberOfEntries; Idx++ ) { > + while (Count != NumberOfEntries) { > + for (Idx = 0; Idx < NumberOfEntries; Idx++ ) { > Socket = GET_MPIDR_AFF1 (ArmCoreInfoTable[Idx].Mpidr); > Core = GET_MPIDR_AFF0 (ArmCoreInfoTable[Idx].Mpidr); > Cpm = Core >> PLATFORM_CPM_UID_BIT_OFFSET; > -- > 'Guid(CE165669-3EF3-493F-B85D-6190EE5B9759)' > > > > > >