From f3b113bf614119f4b54858f909606954be75b3f3 Mon Sep 17 00:00:00 2001 From: Jeff Fan Date: Fri, 20 Dec 2013 05:42:41 +0000 Subject: 1. Only dump CPU Context and CpuDeadLoop () for CPU exception. 2. mEnabledInterruptNum is total enabled interrupt number, InterruptType should less than mEnabledInterruptNum. Signed-off-by: Jeff Fan Reviewed-by: Feng Tian git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@15012 6f19259b-4bc3-4df7-8a09-765794883524 --- UefiCpuPkg/Library/CpuExceptionHandlerLib/DxeSmmCpuException.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'UefiCpuPkg') diff --git a/UefiCpuPkg/Library/CpuExceptionHandlerLib/DxeSmmCpuException.c b/UefiCpuPkg/Library/CpuExceptionHandlerLib/DxeSmmCpuException.c index 47a34cb40a..daa6330f5b 100644 --- a/UefiCpuPkg/Library/CpuExceptionHandlerLib/DxeSmmCpuException.c +++ b/UefiCpuPkg/Library/CpuExceptionHandlerLib/DxeSmmCpuException.c @@ -100,7 +100,7 @@ CommonExceptionHandler ( if (mExternalInterruptHandler[ExceptionType] != NULL) { (mExternalInterruptHandler[ExceptionType]) (ExceptionType, SystemContext); - } else { + } else if (ExceptionType < CPU_EXCEPTION_NUM) { // // Get Spinlock to display CPU information // @@ -269,7 +269,7 @@ RegisterCpuInterruptHandlerWorker ( IN EFI_CPU_INTERRUPT_HANDLER InterruptHandler ) { - if (InterruptType < 0 || InterruptType > (EFI_EXCEPTION_TYPE)mEnabledInterruptNum || + if (InterruptType < 0 || InterruptType >= (EFI_EXCEPTION_TYPE)mEnabledInterruptNum || mReservedVectors[InterruptType].Attribute == EFI_VECTOR_HANDOFF_DO_NOT_HOOK) { return EFI_UNSUPPORTED; } -- cgit v1.2.3