Re: [edk2-devel] [PATCH v4 2/3] ArmPkg: implement EFI_MP_SERVICES_PROTOCOL based on PSCI calls

2023-01-16 Thread Rebecca Cran
On 1/12/23 19:01, Kun Qin wrote: On 1/4/2023 7:37 AM, Rebecca Cran wrote: +  if (WaitEvent != NULL) { +    // Non Blocking +    if (Finished != NULL) { +  mCpuMpData.SingleApFinished = Finished; +  *Finished   = FALSE; +    } + +    mCpuMpData.WaitEvent = WaitEvent; [KQ-

Re: [edk2-devel] [PATCH v4 2/3] ArmPkg: implement EFI_MP_SERVICES_PROTOCOL based on PSCI calls

2023-01-16 Thread Rebecca Cran
On 1/6/23 15:16, Kun Qin wrote: +  // Blocking +  while (TRUE) { +    if (GetApState (CpuData) == CpuStateFinished) { +  CpuData->State = CpuStateIdle; +  break; +    } + +    if ((TimeoutInMicroseconds != 0) && (Timeout == 0)) { [KQ-2] This will make the core never being able to accept

Re: [edk2-devel] [PATCH v4 2/3] ArmPkg: implement EFI_MP_SERVICES_PROTOCOL based on PSCI calls

2023-01-16 Thread Rebecca Cran
On 1/6/23 15:11, Kun Qin wrote: On 1/4/2023 7:37 AM, Rebecca Cran wrote: +  mCpuMpData.Timeout   = TimeoutInMicroseconds; +  mCpuMpData.TimeTaken = 0; +  mCpuMpData.TimeoutActive = (BOOLEAN)(TimeoutInMicroseconds != 0); [KQ] Adding a timeout active flag is correct. However, I think ea

Re: [edk2-devel] [PATCH v4 2/3] ArmPkg: implement EFI_MP_SERVICES_PROTOCOL based on PSCI calls

2023-01-12 Thread Kun Qin
Hi Rebecca, Thanks for working through the feedback as you mentioned on the other thread. But hopefully this email finds you before the v5 gets published. I ran through some more tests and found a few extra comments on this specific patch, which you might have found during v5 preparation. I

Re: [edk2-devel] [PATCH v4 2/3] ArmPkg: implement EFI_MP_SERVICES_PROTOCOL based on PSCI calls

2023-01-06 Thread Kun Qin
Sorry, hit the send button too soon... One more comment under [KQ-2]. Thanks, Kun On 1/6/2023 2:11 PM, Kun Qin via groups.io wrote: Hi Rebecca, I have tried to use this for a few different scenarios and below is a few minor issues I have found and potential changes (marked with [KQ]). Please

Re: [edk2-devel] [PATCH v4 2/3] ArmPkg: implement EFI_MP_SERVICES_PROTOCOL based on PSCI calls

2023-01-06 Thread Kun Qin
Hi Rebecca, I have tried to use this for a few different scenarios and below is a few minor issues I have found and potential changes (marked with [KQ]). Please let me know if I have any misunderstanding on the protocol itself. Thanks, Kun On 1/4/2023 7:37 AM, Rebecca Cran wrote: Add suppor

[edk2-devel] [PATCH v4 2/3] ArmPkg: implement EFI_MP_SERVICES_PROTOCOL based on PSCI calls

2023-01-06 Thread Rebecca Cran
Add support for EFI_MP_SERVICES_PROTOCOL during the DXE phase under AArch64. PSCI_CPU_ON is called to power on the core, the supplied procedure is executed and PSCI_CPU_OFF is called to power off the core. Fixes contributed by Ard Biesheuvel. Signed-off-by: Rebecca Cran --- ArmPkg/ArmPkg.dsc