summaryrefslogtreecommitdiff
path: root/EdkCompatibilityPkg
diff options
context:
space:
mode:
authorxli24 <xli24@6f19259b-4bc3-4df7-8a09-765794883524>2010-02-25 10:37:09 +0000
committerxli24 <xli24@6f19259b-4bc3-4df7-8a09-765794883524>2010-02-25 10:37:09 +0000
commit2d7b3c0316e20bf6b558bdb524d32204b48159ed (patch)
treebcb0a95d88d623b939ba0232e0d3d4bf25c659f6 /EdkCompatibilityPkg
parent2573712e0132deac7591f9ed5e2423c5e61e5af6 (diff)
downloadedk2-platforms-2d7b3c0316e20bf6b558bdb524d32204b48159ed.tar.xz
Add parameter checking for MP Services Protocol Thunk driver.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@10070 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'EdkCompatibilityPkg')
-rw-r--r--EdkCompatibilityPkg/Compatibility/MpServicesOnFrameworkMpServicesThunk/MpServicesOnFrameworkMpServicesThunk.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/EdkCompatibilityPkg/Compatibility/MpServicesOnFrameworkMpServicesThunk/MpServicesOnFrameworkMpServicesThunk.c b/EdkCompatibilityPkg/Compatibility/MpServicesOnFrameworkMpServicesThunk/MpServicesOnFrameworkMpServicesThunk.c
index fcb3373add..b31d17c47f 100644
--- a/EdkCompatibilityPkg/Compatibility/MpServicesOnFrameworkMpServicesThunk/MpServicesOnFrameworkMpServicesThunk.c
+++ b/EdkCompatibilityPkg/Compatibility/MpServicesOnFrameworkMpServicesThunk/MpServicesOnFrameworkMpServicesThunk.c
@@ -4,7 +4,7 @@ Produces PI MP Services Protocol on top of Framework MP Services Protocol.
Intel's Framework MP Services Protocol is replaced by EFI_MP_SERVICES_PROTOCOL in PI 1.1.
This module produces PI MP Services Protocol on top of Framework MP Services Protocol.
-Copyright (c) 2009 Intel Corporation. <BR>
+Copyright (c) 2009 - 2010 Intel Corporation. <BR>
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
@@ -898,6 +898,8 @@ CheckThisAP (
CPU_DATA_BLOCK *CpuData;
CPU_STATE CpuState;
+ ASSERT (ProcessorNumber < mNumberOfProcessors);
+
CpuData = &mMPSystemData.CpuData[ProcessorNumber];
//
@@ -1217,6 +1219,8 @@ WakeUpAp (
CPU_DATA_BLOCK *CpuData;
EFI_PROCESSOR_INFORMATION ProcessorInfoBuffer;
+ ASSERT (ProcessorNumber < mNumberOfProcessors);
+
CpuData = &mMPSystemData.CpuData[ProcessorNumber];
AcquireSpinLock (&CpuData->CpuDataLock);
@@ -1295,6 +1299,8 @@ ChangeCpuState (
{
CPU_DATA_BLOCK *CpuData;
+ ASSERT (ProcessorNumber < mNumberOfProcessors);
+
CpuData = &mMPSystemData.CpuData[ProcessorNumber];
if (!NewState) {
@@ -1578,6 +1584,7 @@ InitializeMpServicesProtocol (
NULL
);
ASSERT_EFI_ERROR (Status);
+ ASSERT (mNumberOfProcessors < MAX_CPU_NUMBER);
//
// Create timer event to check AP state for non-blocking execution.