From 156eb6bbf7050e211c39677989e358606d65eefe Mon Sep 17 00:00:00 2001 From: yshang1 Date: Fri, 19 Sep 2008 03:42:07 +0000 Subject: [PATCH] Bug Fix in DxeSmmDriverEntryLib. git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@5928 6f19259b-4bc3-4df7-8a09-765794883524 --- .../DxeSmmDriverEntryPoint/DriverEntryPoint.c | 24 +++++-------------- 1 file changed, 6 insertions(+), 18 deletions(-) diff --git a/IntelFrameworkPkg/Library/DxeSmmDriverEntryPoint/DriverEntryPoint.c b/IntelFrameworkPkg/Library/DxeSmmDriverEntryPoint/DriverEntryPoint.c index df25c6d493..539adc1345 100644 --- a/IntelFrameworkPkg/Library/DxeSmmDriverEntryPoint/DriverEntryPoint.c +++ b/IntelFrameworkPkg/Library/DxeSmmDriverEntryPoint/DriverEntryPoint.c @@ -133,26 +133,14 @@ _DriverUnloadHandler ( EFI_HANDLE ImageHandle ) { - EFI_STATUS Status; - - // - // Call the unload handlers for all the modules // - Status = ProcessModuleUnloadList (ImageHandle); - + // Call the unload handlers for all the modules. + // + // Note: All libraries were constructed in SMM space, + // therefore we can not destruct them in Unload + // handler. // - // If the driver specific unload handler does not return an error, then call all of the - // library destructors. If the unload handler returned an error, then the driver can not be - // unloaded, and the library destructors should not be called - // - if (!EFI_ERROR (Status)) { - ProcessLibraryDestructorList (ImageHandle, gST); - } - - // - // Return the status from the driver specific unload handler - // - return Status; + return ProcessModuleUnloadList (ImageHandle); } /** -- 2.39.2