X-Git-Url: https://git.proxmox.com/?p=mirror_edk2.git;a=blobdiff_plain;f=UefiCpuPkg%2FCpuDxe%2FCpuMp.h;h=d530149d7e00964bbdd9ce975e6196c830541b15;hp=a6478c087c607752f4a25e325c3949fe0c020250;hb=c1cab54ce57c2608b8b3ea051c7041f036f21153;hpb=b302a9784cc0926d1870cabf95f272cf2f4ce345 diff --git a/UefiCpuPkg/CpuDxe/CpuMp.h b/UefiCpuPkg/CpuDxe/CpuMp.h index a6478c087c..d530149d7e 100644 --- a/UefiCpuPkg/CpuDxe/CpuMp.h +++ b/UefiCpuPkg/CpuDxe/CpuMp.h @@ -1,7 +1,7 @@ /** @file CPU DXE MP support - Copyright (c) 2006 - 2014, Intel Corporation. All rights reserved.
+ Copyright (c) 2006 - 2016, Intel Corporation. All rights reserved.
This program and the accompanying materials are licensed and made available under the terms and conditions of the BSD License which accompanies this distribution. The full text of the license may be found at @@ -15,9 +15,6 @@ #ifndef _CPU_MP_H_ #define _CPU_MP_H_ -#include -#include - /** Initialize Multi-processor support. @@ -27,119 +24,6 @@ InitializeMpSupport ( VOID ); -typedef -VOID -(EFIAPI *STACKLESS_AP_ENTRY_POINT)( - VOID - ); - -/** - Starts the Application Processors and directs them to jump to the - specified routine. - - The processor jumps to this code in flat mode, but the processor's - stack is not initialized. - - @retval EFI_SUCCESS The APs were started - -**/ -EFI_STATUS -StartApsStackless ( - VOID - ); - -/** - The AP entry point that the Startup-IPI target code will jump to. - - The processor jumps to this code in flat mode, but the processor's - stack is not initialized. - -**/ -VOID -EFIAPI -AsmApEntryPoint ( - VOID - ); - -/** - Releases the lock preventing other APs from using the shared AP - stack. - - Once the AP has transitioned to using a new stack, it can call this - function to allow another AP to proceed with using the shared stack. - -**/ -VOID -EFIAPI -AsmApDoneWithCommonStack ( - VOID - ); - -typedef enum { - CpuStateIdle, - CpuStateBlocked, - CpuStateReady, - CpuStateBusy, - CpuStateFinished -} CPU_STATE; - -/** - Define Individual Processor Data block. - -**/ -typedef struct { - EFI_PROCESSOR_INFORMATION Info; - SPIN_LOCK CpuDataLock; - INTN LockSelf; - volatile CPU_STATE State; - - EFI_AP_PROCEDURE Procedure; - VOID *Parameter; - BOOLEAN *Finished; - INTN Timeout; - EFI_EVENT WaitEvent; - BOOLEAN TimeoutActive; - EFI_EVENT CheckThisAPEvent; - VOID *TopOfStack; -} CPU_DATA_BLOCK; - -/** - Define MP data block which consumes individual processor block. - -**/ -typedef struct { - CPU_DATA_BLOCK *CpuDatas; - UINTN NumberOfProcessors; - UINTN NumberOfEnabledProcessors; - - EFI_AP_PROCEDURE Procedure; - VOID *ProcedureArgument; - UINTN StartCount; - UINTN FinishCount; - BOOLEAN SingleThread; - UINTN **FailedList; - UINTN FailedListIndex; - INTN Timeout; - EFI_EVENT WaitEvent; - BOOLEAN TimeoutActive; - EFI_EVENT CheckAllAPsEvent; -} MP_SYSTEM_DATA; - -/** - This function is called by all processors (both BSP and AP) once and collects MP related data. - - @param Bsp TRUE if the CPU is BSP - @param ProcessorNumber The specific processor number - - @retval EFI_SUCCESS Data for the processor collected and filled in - -**/ -EFI_STATUS -FillInProcessorInformation ( - IN BOOLEAN Bsp, - IN UINTN ProcessorNumber - ); - /** This service retrieves the number of logical processor in the platform and the number of those logical processors that are enabled on this boot. @@ -491,7 +375,7 @@ StartupThisAP ( @retval EFI_UNSUPPORTED Switching the BSP cannot be completed prior to this service returning. @retval EFI_UNSUPPORTED Switching the BSP is not supported. - @retval EFI_SUCCESS The calling processor is an AP. + @retval EFI_DEVICE_ERROR The calling processor is an AP. @retval EFI_NOT_FOUND The processor with the handle specified by ProcessorNumber does not exist. @retval EFI_INVALID_PARAMETER ProcessorNumber specifies the current BSP or @@ -588,55 +472,5 @@ WhoAmI ( OUT UINTN *ProcessorNumber ); -/** - Terminate AP's task and set it to idle state. - - This function terminates AP's task due to timeout by sending INIT-SIPI, - and sends it to idle state. - - @param CpuData the pointer to CPU_DATA_BLOCK of specified AP - -**/ -VOID -ResetProcessorToIdleState ( - IN CPU_DATA_BLOCK *CpuData - ); - -/** - Prepares Startup Code for APs. - This function prepares Startup Code for APs. - - @retval EFI_SUCCESS The APs were started - @retval EFI_OUT_OF_RESOURCES Cannot allocate memory to start APs - -**/ -EFI_STATUS -PrepareAPStartupCode ( - VOID - ); - -/** - Free the code buffer of startup AP. - -**/ -VOID -FreeApStartupCode ( - VOID - ); - -/** - Resets the Application Processor and directs it to jump to the - specified routine. - - The processor jumps to this code in flat mode, but the processor's - stack is not initialized. - - @param ProcessorId the AP of ProcessorId was reset -**/ -VOID -ResetApStackless ( - IN UINT32 ProcessorId - ); - #endif // _CPU_MP_H_