UefiCpuPkg/CpuDxe: Remove unused codes and files

v5:
  1. Remove unused PcdCpuApStackSize and PcdCpuApInitTimeOutInMicroSeconds.

v4:
  1. Keep GDT table setup to fix IA32 S3 boot issue.

Cc: Michael Kinney <michael.d.kinney@intel.com>
Cc: Feng Tian <feng.tian@intel.com>
Cc: Giri P Mudusuru <giri.p.mudusuru@intel.com>
Cc: Laszlo Ersek <lersek@redhat.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Jeff Fan <jeff.fan@intel.com>
Reviewed-by: Michael Kinney <michael.d.kinney@intel.com>
Tested-by: Laszlo Ersek <lersek@redhat.com>
Tested-by: Michael Kinney <michael.d.kinney@intel.com>
This commit is contained in:
Jeff Fan
2016-07-30 01:32:25 +08:00
parent 0b9f0dd635
commit 39d49a73a5
9 changed files with 1 additions and 1359 deletions

View File

@@ -1,7 +1,7 @@
/** @file
CPU DXE MP support
Copyright (c) 2006 - 2015, Intel Corporation. All rights reserved.<BR>
Copyright (c) 2006 - 2016, Intel Corporation. All rights reserved.<BR>
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,11 +15,6 @@
#ifndef _CPU_MP_H_
#define _CPU_MP_H_
#include <Ppi/SecPlatformInformation.h>
#include <Ppi/SecPlatformInformation2.h>
#include <Protocol/MpService.h>
#include <Library/SynchronizationLib.h>
/**
Initialize Multi-processor support.
@@ -29,120 +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,
CpuStateSleeping
} CPU_STATE;
/**
Define Individual Processor Data block.
**/
typedef struct {
EFI_PROCESSOR_INFORMATION Info;
SPIN_LOCK CpuDataLock;
INTN LockSelf;
volatile CPU_STATE State;
volatile EFI_AP_PROCEDURE Procedure;
volatile 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.
@@ -591,68 +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
);
/**
A minimal wrapper function that allows MtrrSetAllMtrrs() to be passed to
EFI_MP_SERVICES_PROTOCOL.StartupAllAPs() as Procedure.
@param[in] Buffer Pointer to an MTRR_SETTINGS object, to be passed to
MtrrSetAllMtrrs().
**/
VOID
EFIAPI
SetMtrrsFromBuffer (
IN VOID *Buffer
);
#endif // _CPU_MP_H_