* [PATCH edk2-platforms v1 1/1] Platform/Ampere: Fix build break in JadePkg
@ 2022-07-29 21:07 Sami Mujawar
2022-07-31 11:45 ` [edk2-devel] " Ard Biesheuvel
0 siblings, 1 reply; 2+ messages in thread
From: Sami Mujawar @ 2022-07-29 21:07 UTC (permalink / raw)
To: devel
Cc: Sami Mujawar, ardb+tianocore, nhi, vunguyen, thang, chuong,
quic_llindhol, Akanksha.Jain2, Matteo.Carlini, Ben.Adderson, nd
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 <sami.mujawar@arm.com>
---
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.<BR>
+ Copyright (c) 2022, ARM Ltd. All rights reserved.<BR>
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)'
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [edk2-devel] [PATCH edk2-platforms v1 1/1] Platform/Ampere: Fix build break in JadePkg
2022-07-29 21:07 [PATCH edk2-platforms v1 1/1] Platform/Ampere: Fix build break in JadePkg Sami Mujawar
@ 2022-07-31 11:45 ` Ard Biesheuvel
0 siblings, 0 replies; 2+ messages in thread
From: Ard Biesheuvel @ 2022-07-31 11:45 UTC (permalink / raw)
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
On Fri, 29 Jul 2022 at 23:07, Sami Mujawar <sami.mujawar@arm.com> 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 <sami.mujawar@arm.com>
Apologies for missing this usage.
Reviewed-by: Ard Biesheuvel <ardb@kernel.org>
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.<BR>
> + Copyright (c) 2022, ARM Ltd. All rights reserved.<BR>
>
> 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)'
>
>
>
>
>
>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2022-07-31 11:46 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-07-29 21:07 [PATCH edk2-platforms v1 1/1] Platform/Ampere: Fix build break in JadePkg Sami Mujawar
2022-07-31 11:45 ` [edk2-devel] " Ard Biesheuvel
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox