diff options
author | Eric Dong <eric.dong@intel.com> | 2019-07-22 08:19:29 +0800 |
---|---|---|
committer | Eric Dong <eric.dong@intel.com> | 2019-07-29 09:25:20 +0800 |
commit | c06a657f4fb70d7a78fd4f51ea21e7623d8350bd (patch) | |
tree | 57dc10833ceeddce2f29fbae428ef0dc3d3bde25 /UefiCpuPkg/Library/MpInitLibUp | |
parent | ee0c39fa110f80aa8c185d0b0805223e2af3b659 (diff) | |
download | edk2-c06a657f4fb70d7a78fd4f51ea21e7623d8350bd.zip edk2-c06a657f4fb70d7a78fd4f51ea21e7623d8350bd.tar.gz edk2-c06a657f4fb70d7a78fd4f51ea21e7623d8350bd.tar.bz2 |
UefiCpuPkg/MpInitLibUp: Add MpInitLibStartupAllCPUs API.
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=1973
Add new MpInitLibStartupAllCPUs API uses to start all processors
at the same time.
Cc: Ray Ni <ray.ni@intel.com>
Cc: Laszlo Ersek <lersek@redhat.com>
Cc: Chandana Kumar <chandana.c.kumar@intel.com>
Cc: Star Zeng <star.zeng@intel.com>
Signed-off-by: Eric Dong <eric.dong@intel.com>
Reviewed-by: Ray Ni <ray.ni@intel.com>
Diffstat (limited to 'UefiCpuPkg/Library/MpInitLibUp')
-rw-r--r-- | UefiCpuPkg/Library/MpInitLibUp/MpInitLibUp.c | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/UefiCpuPkg/Library/MpInitLibUp/MpInitLibUp.c b/UefiCpuPkg/Library/MpInitLibUp/MpInitLibUp.c index 36c2bb5..b4024ee 100644 --- a/UefiCpuPkg/Library/MpInitLibUp/MpInitLibUp.c +++ b/UefiCpuPkg/Library/MpInitLibUp/MpInitLibUp.c @@ -405,3 +405,38 @@ MpInitLibWhoAmI ( *ProcessorNumber = 0;
return EFI_SUCCESS;
}
+
+/**
+ This service executes a caller provided function on all enabled CPUs.
+
+ @param[in] Procedure A pointer to the function to be run on
+ enabled APs of the system. See type
+ EFI_AP_PROCEDURE.
+ @param[in] TimeoutInMicroseconds Indicates the time limit in microseconds for
+ APs to return from Procedure, either for
+ blocking or non-blocking mode. Zero means
+ infinity. TimeoutInMicroseconds is ignored
+ for BSP.
+ @param[in] ProcedureArgument The parameter passed into Procedure for
+ all APs.
+
+ @retval EFI_SUCCESS CPU have finished the procedure.
+ @retval EFI_INVALID_PARAMETER Procedure is NULL.
+
+**/
+EFI_STATUS
+EFIAPI
+MpInitLibStartupAllCPUs (
+ IN EFI_AP_PROCEDURE Procedure,
+ IN UINTN TimeoutInMicroseconds,
+ IN VOID *ProcedureArgument OPTIONAL
+ )
+{
+ if (Procedure == NULL) {
+ return EFI_INVALID_PARAMETER;
+ }
+
+ Procedure (ProcedureArgument);
+
+ return EFI_SUCCESS;
+}
|