On 10/19/15 09:44, Michael Kinney wrote:
> Use PcdCpuApInitTimeOutInMicroSeconds instead of hardcoded 100ms for
> the time to wait for all APs to respond to first INIT SIPI SIPI
> wake request.
>
> Contributed-under: TianoCore Contribution Agreement 1.0
> Signed-off-by: Michael Kinney
> Cc: Jeff Fan
> Cc: Laszlo Ersek
> ---
> UefiCpuPkg/CpuDxe/ApStartup.c | 4 ++--
> UefiCpuPkg/CpuDxe/CpuDxe.inf | 5 +++--
> 2 files changed, 5 insertions(+), 4 deletions(-)
>
> diff --git a/UefiCpuPkg/CpuDxe/ApStartup.c b/UefiCpuPkg/CpuDxe/ApStartup.c
> index 38a9c0e..78fb26f 100644
> --- a/UefiCpuPkg/CpuDxe/ApStartup.c
> +++ b/UefiCpuPkg/CpuDxe/ApStartup.c
> @@ -452,9 +452,9 @@ StartApsStackless (
> {
>SendInitSipiSipiAllExcludingSelf ((UINT32)(UINTN)(VOID*) StartupCode);
>//
> - // Wait 100 milliseconds for APs to arrive at the ApEntryPoint routine
> + // Wait for APs to arrive at the ApEntryPoint routine
>//
> - MicroSecondDelay (100 * 1000);
> + MicroSecondDelay (PcdGet32 (PcdCpuApInitTimeOutInMicroSeconds));
>
>return EFI_SUCCESS;
> }
> diff --git a/UefiCpuPkg/CpuDxe/CpuDxe.inf b/UefiCpuPkg/CpuDxe/CpuDxe.inf
> index a251922..9db5303 100644
> --- a/UefiCpuPkg/CpuDxe/CpuDxe.inf
> +++ b/UefiCpuPkg/CpuDxe/CpuDxe.inf
> @@ -84,8 +84,9 @@
>gEfiSecPlatformInformationPpiGuid ## UNDEFINED # HOB
>
> [Pcd]
> - gUefiCpuPkgTokenSpaceGuid.PcdCpuMaxLogicalProcessorNumber ## CONSUMES
> - gUefiCpuPkgTokenSpaceGuid.PcdCpuApStackSize ## CONSUMES
> + gUefiCpuPkgTokenSpaceGuid.PcdCpuMaxLogicalProcessorNumber## CONSUMES
> + gUefiCpuPkgTokenSpaceGuid.PcdCpuApStackSize ## CONSUMES
> + gUefiCpuPkgTokenSpaceGuid.PcdCpuApInitTimeOutInMicroSeconds ## CONSUMES
>
> [Depex]
>TRUE
>
This changes the value to 50 ms (as per DEC), but the same is used in
the corresponding PEIM, so it should be fine for hw platforms.
I'll write a patch for OVMF that sets the PCD to 1 full second (which
worked in Xiao Guangrong's testing).
Reviewed-by: Laszlo Ersek
Thanks
Laszlo
___
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel