From 44cbe89ec8ed1fd6e378f92e16b5a5e9e3781bcf Mon Sep 17 00:00:00 2001 From: Eric Dong Date: Fri, 23 Jan 2015 05:48:44 +0000 Subject: [PATCH] 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 Reviewed-by: Liming Gao git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@16643 6f19259b-4bc3-4df7-8a09-765794883524 --- .../PlatDriOverrideDxe.c | 27 ++++++++++--------- 1 file changed, 14 insertions(+), 13 deletions(-) diff --git a/MdeModulePkg/Universal/PlatformDriOverrideDxe/PlatDriOverrideDxe.c b/MdeModulePkg/Universal/PlatformDriOverrideDxe/PlatDriOverrideDxe.c index d29c050a03..7027e9697e 100644 --- a/MdeModulePkg/Universal/PlatformDriOverrideDxe/PlatDriOverrideDxe.c +++ b/MdeModulePkg/Universal/PlatformDriOverrideDxe/PlatDriOverrideDxe.c @@ -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.
+Copyright (c) 2007 - 2015, Intel Corporation. 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 @@ -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 //