diff options
author | Jeff Fan <jeff.fan@intel.com> | 2016-05-24 21:35:24 +0800 |
---|---|---|
committer | Jeff Fan <jeff.fan@intel.com> | 2016-06-01 15:31:58 +0800 |
commit | d91225cfad507219502086d0b6b670ae126d489d (patch) | |
tree | 274b60e554f7588eb65dcf3558155876c8e1698b /UefiCpuPkg | |
parent | 44ecbc28b69834ec1a4b1a8b99dae8839633b6b6 (diff) | |
download | edk2-platforms-d91225cfad507219502086d0b6b670ae126d489d.tar.xz |
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>
Diffstat (limited to 'UefiCpuPkg')
3 files changed, 22 insertions, 23 deletions
diff --git a/UefiCpuPkg/Library/CpuExceptionHandlerLib/DxeException.c b/UefiCpuPkg/Library/CpuExceptionHandlerLib/DxeException.c index 3320066564..a61a52b19a 100644 --- a/UefiCpuPkg/Library/CpuExceptionHandlerLib/DxeException.c +++ b/UefiCpuPkg/Library/CpuExceptionHandlerLib/DxeException.c @@ -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;
/**
diff --git a/UefiCpuPkg/Library/CpuExceptionHandlerLib/PeiDxeSmmCpuException.c b/UefiCpuPkg/Library/CpuExceptionHandlerLib/PeiDxeSmmCpuException.c index d4bc293db0..02d56223c6 100644 --- a/UefiCpuPkg/Library/CpuExceptionHandlerLib/PeiDxeSmmCpuException.c +++ b/UefiCpuPkg/Library/CpuExceptionHandlerLib/PeiDxeSmmCpuException.c @@ -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;
}
diff --git a/UefiCpuPkg/Library/CpuExceptionHandlerLib/SmmException.c b/UefiCpuPkg/Library/CpuExceptionHandlerLib/SmmException.c index 3528c8cc75..7ad228c806 100644 --- a/UefiCpuPkg/Library/CpuExceptionHandlerLib/SmmException.c +++ b/UefiCpuPkg/Library/CpuExceptionHandlerLib/SmmException.c @@ -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.
|