From: "Rebecca Cran" <quic_rcran@quicinc.com>
To: <devel@edk2.groups.io>, <kuqin12@gmail.com>,
<quic_rcran@quicinc.com>,
Leif Lindholm <quic_llindhol@quicinc.com>,
Ard Biesheuvel <ardb+tianocore@kernel.org>,
Sami Mujawar <sami.mujawar@arm.com>,
Jian J Wang <jian.j.wang@intel.com>,
Liming Gao <gaoliming@byosoft.com.cn>
Subject: Re: [edk2-devel] [PATCH 1/2] ArmPkg: implement EFI_MP_SERVICES_PROTOCOL based on PSCI calls
Date: Mon, 28 Nov 2022 16:59:02 -0700 [thread overview]
Message-ID: <a7784b84-e54a-08d0-57bb-cd9407529ecc@quicinc.com> (raw)
In-Reply-To: <25c22db8-2974-44c3-9482-3972af6cd08c@gmail.com>
Sorry, I missed this originally. I've added my replies inline.][
On 9/29/22 12:45, Kun Qin wrote:
> Hi Rebecca,
>
> Thanks for sending this patch. I have a few questions inline "[KQ]".
> Could you please help me to
> understand the patch better? Thanks in advance.
>
> Regards,
> Kun
>
> On 8/29/2022 8:59 AM, Rebecca Cran wrote:
>> +#define GET_MPIDR_AFFINITY_BITS(x) ((x) & 0xFF00FFFFFF)
>> +
>> +#define MPIDR_MT_BIT BIT24
> [KQ]: Is there any reason why this is not defined in a more formal
> place? I think that will allow the platform to use as well.
That's a good point. I can certainly move it somewhere more proper.
>> + BOOLEAN IsBsp;
> [KQ]: Can we add a check to see if BSP is found during this routine? I
> think failing to identify a BSP might cause other issues in the
> following services?
We could certainly log an error and abort if IsBsp is never set to TRUE.
>> + for (Index = 0; Index < mCpuMpData.NumberOfProcessors; Index++) {
>> + if (GET_MPIDR_AFFINITY_BITS (ArmReadMpidr ()) ==
>> CoreInfo[Index].Mpidr) {
> [KQ]: Does this mean BSP should never set the `MPIDR_MT_BIT` in the
> gArmMpCoreInfoGuid HOB data? Otherwise, this logic will never be able to
> find the BSP?
No, here we assume we're running on the BSP, and the code is looking for
the entry in the CoreInfo array that matches the BSP's affinity fields.
>> + switch (GetApState (CpuData)) {
>> + case CpuStateReady:
>> + SetApProcedure (CpuData, Procedure, ProcedureArgument);
>> + Status = DispatchCpu (Index);
>> + if (EFI_ERROR (Status)) {
>> + CpuData->State = CpuStateIdle;
>> + Status = EFI_NOT_READY;
>> + goto Done;
> [KQ]: Is it really necessary to use "goto Done"? This might cause all
> the CPUs after this failing index to not reset the CPU state.
> That way, all the subsequent "StartupAllAps" will fail due to
> "CheckAllCpusReady" returning FALSE on those "dirty cores". Please
> let me know if that is by design or not.
Good point. I'll fix it.
--
Rebecca Cran
next prev parent reply other threads:[~2022-11-28 23:59 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-08-29 15:59 [PATCH 0/2] Add support EFI_MP_SERVICES_PROTOCOL on AARCH64 Rebecca Cran
2022-08-29 15:59 ` [PATCH 1/2] ArmPkg: implement EFI_MP_SERVICES_PROTOCOL based on PSCI calls Rebecca Cran
2022-09-29 18:45 ` [edk2-devel] " Kun Qin
2022-11-28 22:59 ` Kun Qin
2022-11-29 0:04 ` Rebecca Cran
2022-11-30 0:15 ` Kun Qin
2022-11-28 23:59 ` Rebecca Cran [this message]
2022-08-29 15:59 ` [PATCH 2/2] MdeModulePkg: Add new Application/MpServicesTest application Rebecca Cran
2022-08-30 16:29 ` Rebecca Cran
2022-09-05 10:57 ` [edk2-devel] [PATCH 0/2] Add support EFI_MP_SERVICES_PROTOCOL on AARCH64 Ard Biesheuvel
2022-09-05 15:51 ` Rebecca Cran
2022-09-05 15:55 ` Ard Biesheuvel
2022-09-06 16:53 ` Ard Biesheuvel
2022-09-06 17:01 ` Rebecca Cran
2022-09-06 17:53 ` Ard Biesheuvel
2022-09-06 18:17 ` Rebecca Cran
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-list from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=a7784b84-e54a-08d0-57bb-cd9407529ecc@quicinc.com \
--to=devel@edk2.groups.io \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox