Locate the config route protocol before install the config access protocol to fix potential issue.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Eric Dong <eric.dong@intel.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@16643 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
Eric Dong 2015-01-23 05:48:44 +00:00 committed by ydong10
parent 1e5fff631b
commit 44cbe89ec8
1 changed files with 14 additions and 13 deletions

View File

@ -13,7 +13,7 @@
4. It save all the mapping info in NV variables which will be consumed
by platform override protocol driver to publish the platform override protocol.
Copyright (c) 2007 - 2014, Intel Corporation. All rights reserved.<BR>
Copyright (c) 2007 - 2015, 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
@ -1635,6 +1635,19 @@ PlatDriOverrideDxeInit (
mCallbackInfo->PlatformDriverOverride.GetDriver = GetDriver;
mCallbackInfo->PlatformDriverOverride.GetDriverPath = GetDriverPath;
mCallbackInfo->PlatformDriverOverride.DriverLoaded = DriverLoaded;
//
// Locate ConfigRouting protocol
//
Status = gBS->LocateProtocol (
&gEfiHiiConfigRoutingProtocolGuid,
NULL,
(VOID **) &mCallbackInfo->HiiConfigRouting
);
if (EFI_ERROR (Status)) {
goto Finish;
}
//
// Install Device Path Protocol and Config Access protocol to driver handle
// Install Platform Driver Override Protocol to driver handle
@ -1668,18 +1681,6 @@ PlatDriOverrideDxeInit (
goto Finish;
}
//
// Locate ConfigRouting protocol
//
Status = gBS->LocateProtocol (
&gEfiHiiConfigRoutingProtocolGuid,
NULL,
(VOID **) &mCallbackInfo->HiiConfigRouting
);
if (EFI_ERROR (Status)) {
goto Finish;
}
//
// Clear all the globle variable
//