UefiCpuPkg/ExceptionLib: Move global variable location

Move some global variables location from PeiDxeSmmCpuException.c to
DxeCpuException.c and SmmCpuException.c. And remove some un-used global
vairables.

Cc: Michael Kinney <michael.d.kinney@intel.com>
Cc: Jiewen Yao <jiewen.yao@intel.com>
Cc: Feng Tian <feng.tian@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Jeff Fan <jeff.fan@intel.com>
Reviewed-by: Feng Tian <feng.tian@intel.com>
This commit is contained in:
Jeff Fan 2016-05-24 21:35:24 +08:00
parent 44ecbc28b6
commit d91225cfad
3 changed files with 22 additions and 23 deletions

View File

@ -19,9 +19,15 @@
CONST UINTN mDoFarReturnFlag = 0;
extern EFI_CPU_INTERRUPT_HANDLER *mExternalInterruptHandler;
extern RESERVED_VECTORS_DATA mReservedVectorsData[CPU_EXCEPTION_NUM];
extern EFI_CPU_INTERRUPT_HANDLER mExternalInterruptHandlerTable[CPU_EXCEPTION_NUM];
//
// Image align size for DXE/SMM
//
CONST UINTN mImageAlignSize = SIZE_4KB;
RESERVED_VECTORS_DATA mReservedVectorsData[CPU_EXCEPTION_NUM];
EFI_CPU_INTERRUPT_HANDLER mExternalInterruptHandlerTable[CPU_EXCEPTION_NUM];
UINTN mEnabledInterruptNum = 0;
EXCEPTION_HANDLER_DATA mExceptionHandlerData;
/**

View File

@ -15,17 +15,6 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
#include "CpuExceptionCommon.h"
#include <Library/DebugLib.h>
//
// Image align size for DXE/SMM
//
CONST UINTN mImageAlignSize = SIZE_4KB;
RESERVED_VECTORS_DATA mReservedVectorsData[CPU_EXCEPTION_NUM];
EFI_CPU_INTERRUPT_HANDLER mExternalInterruptHandlerTable[CPU_EXCEPTION_NUM];
EFI_CPU_INTERRUPT_HANDLER *mExternalInterruptHandler = NULL;
UINTN mEnabledInterruptNum = 0;
/**
Internal worker function for common exception handler.
@ -196,11 +185,6 @@ UpdateIdtTable (
break;
}
}
//
// Save Interrupt number to global variable used for RegisterCpuInterruptHandler ()
//
mEnabledInterruptNum = ExceptionHandlerData->IdtEntryCount;
}
/**
@ -237,7 +221,6 @@ InitializeCpuExceptionHandlersWorker (
}
}
mExternalInterruptHandler = mExternalInterruptHandlerTable;
//
// Read IDT descriptor and calculate IDT size
//
@ -256,7 +239,7 @@ InitializeCpuExceptionHandlersWorker (
ExceptionHandlerData->IdtEntryCount = IdtEntryCount;
UpdateIdtTable (IdtTable, &TemplateMap, ExceptionHandlerData);
mEnabledInterruptNum = IdtEntryCount;
return EFI_SUCCESS;
}

View File

@ -17,8 +17,18 @@
CONST UINTN mDoFarReturnFlag = 1;
extern RESERVED_VECTORS_DATA mReservedVectorsData[CPU_EXCEPTION_NUM];
extern EFI_CPU_INTERRUPT_HANDLER mExternalInterruptHandlerTable[CPU_EXCEPTION_NUM];
//
// Spin lock for CPU information display
//
SPIN_LOCK mDisplayMessageSpinLock;
//
// Image align size for DXE/SMM
//
CONST UINTN mImageAlignSize = SIZE_4KB;
RESERVED_VECTORS_DATA mReservedVectorsData[CPU_EXCEPTION_NUM];
EFI_CPU_INTERRUPT_HANDLER mExternalInterruptHandlerTable[CPU_EXCEPTION_NUM];
EXCEPTION_HANDLER_DATA mExceptionHandlerData;
/**
Common exception handler.