Re: [edk2-platforms] [PATCH 1/1] Platform/Sgi: Add support to disable isolated cpus
This code is shared between all the variants of the Sgi platform.
Depending upon the variant, there will be a different number of CPUs present on it. To handle this I have written the code in a generic way.
The Dsdt containing AML code describing Cluster topology does not have any field for CPU state.
AFAIK, the MADT table is used to check if the CPU is enabled and to get its MPID number.
I have tested this code and cat /proc/cpuinfo does not show disabled CPUs in the list.
linux/processor_core.c at master · torvalds/linux (github.com) this is the code that maps the logical id to the MPID number.
From: Sami Mujawar <Sami.Mujawar@...>
Sent: Monday, August 8, 2022 10:11 AM
To: Nishant Sharma <Nishant.Sharma@...>; email@example.com <firstname.lastname@example.org>
Subject: Re: [edk2-devel] [edk2-platforms] [PATCH 1/1] Platform/Sgi: Add support to disable isolated cpus
The parsing code would be much clear if you define a GIC substructure header (if not already present) and then traverse the data.
To add to this your patch does not address the AML code which still says that the CPU is enabled. You would need to update the AML code in this patch otherwise you end up having inconsistent view of the CPU state.
From: Nishant Sharma <nishant.sharma@...>
Please find my response inline
On Thu, Jul 28, 2022 at 06:12 PM, Sami Mujawar wrote: