X-Git-Url: https://git.proxmox.com/?a=blobdiff_plain;f=MdePkg%2FLibrary%2FUefiDriverEntryPoint%2FDriverEntryPoint.c;h=c3ccf0fe9e5808336f00e01053a0ad14a3974a2f;hb=9344f0921518309295da89c221d10cbead8531aa;hp=c52ed9afa81ed95fbd5411360874c9ca44142550;hpb=19388d2960b2fe0347da23799e93ccc52f540214;p=mirror_edk2.git diff --git a/MdePkg/Library/UefiDriverEntryPoint/DriverEntryPoint.c b/MdePkg/Library/UefiDriverEntryPoint/DriverEntryPoint.c index c52ed9afa8..c3ccf0fe9e 100644 --- a/MdePkg/Library/UefiDriverEntryPoint/DriverEntryPoint.c +++ b/MdePkg/Library/UefiDriverEntryPoint/DriverEntryPoint.c @@ -1,14 +1,8 @@ /** @file Entry point to a EFI/DXE driver. -Copyright (c) 2006 - 2008, 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 -http://opensource.org/licenses/bsd-license.php - -THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, -WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. +Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.
+SPDX-License-Identifier: BSD-2-Clause-Patent **/ @@ -19,16 +13,18 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. #include #include +#include #include #include /** - Unload function that is registered in the LoadImage protocol. It un-installs - protocols produced and deallocates pool used by the driver. Called by the core - when unloading the driver. + Unloads an image from memory. + + This function is a callback that a driver registers to do cleanup + when the UnloadImage boot service function is called. - @param ImageHandle ImageHandle of the loaded driver. + @param ImageHandle The handle to the image to unload. @return Status returned by all unload(). @@ -63,25 +59,28 @@ _DriverUnloadHandler ( /** - The entry point of PE/COFF Image for a DXE Driver, DXE Runtime Driver, DXE SMM Driver, or UEFI Driver. + The entry point of PE/COFF Image for a DXE Driver, DXE Runtime Driver, DXE SMM + Driver, or UEFI Driver. This function is the entry point for a DXE Driver, DXE Runtime Driver, DXE SMM Driver, or UEFI Driver. This function must call ProcessLibraryConstructorList() and ProcessModuleEntryPointList(). If the return status from ProcessModuleEntryPointList() - is an error status, then ProcessLibraryDestructorList() must be called. The return value - from ProcessModuleEntryPointList() is returned. If _gDriverUnloadImageCount is greater - than zero, then an unload handler must be registered for this image and the unload handler - must invoke ProcessModuleUnloadList(). - If _gUefiDriverRevision is not zero and SystemTable->Hdr.Revision is less than _gUefiDriverRevison, - then return EFI_INCOMPATIBLE_VERSION. + is an error status, then ProcessLibraryDestructorList() must be called. The return + value from ProcessModuleEntryPointList() is returned. If _gDriverUnloadImageCount + is greater than zero, then an unload handler must be registered for this image + and the unload handler must invoke ProcessModuleUnloadList(). + If _gUefiDriverRevision is not zero and SystemTable->Hdr.Revision is less than + _gUefiDriverRevison, then return EFI_INCOMPATIBLE_VERSION. - @param ImageHandle The image handle of the DXE Driver, DXE Runtime Driver, DXE SMM Driver, or UEFI Driver. + @param ImageHandle The image handle of the DXE Driver, DXE Runtime Driver, + DXE SMM Driver, or UEFI Driver. @param SystemTable A pointer to the EFI System Table. - @retval EFI_SUCCESS The DXE Driver, DXE Runtime Driver, DXE SMM Driver, - or UEFI Driver exited normally. - @retval EFI_INCOMPATIBLE_VERSION _gUefiDriverRevision is greater than SystemTable->Hdr.Revision. + @retval EFI_SUCCESS The DXE Driver, DXE Runtime Driver, DXE SMM + Driver, or UEFI Driver exited normally. + @retval EFI_INCOMPATIBLE_VERSION _gUefiDriverRevision is greater than + SystemTable->Hdr.Revision. @retval Other Return value from ProcessModuleEntryPointList(). **/ @@ -142,16 +141,19 @@ _ModuleEntryPoint ( /** - Required by the EBC compiler and identical in functionality to _ModuleEntryPoint(). + Required by the EBC compiler and identical in functionality to _ModuleEntryPoint(). - This function is required to call _ModuleEntryPoint() passing in ImageHandle, and SystemTable. + This function is required to call _ModuleEntryPoint() passing in ImageHandle, + and SystemTable. - @param ImageHandle The image handle of the DXE Driver, DXE Runtime Driver, DXE SMM Driver, or UEFI Driver. + @param ImageHandle The image handle of the DXE Driver, DXE Runtime Driver, DXE + SMM Driver, or UEFI Driver. @param SystemTable A pointer to the EFI System Table. - @retval EFI_SUCCESS The DXE Driver, DXE Runtime Driver, DXE SMM Driver, - or UEFI Driver exited normally. - @retval EFI_INCOMPATIBLE_VERSION _gUefiDriverRevision is greater than SystemTable->Hdr.Revision. + @retval EFI_SUCCESS The DXE Driver, DXE Runtime Driver, DXE SMM + Driver, or UEFI Driver exited normally. + @retval EFI_INCOMPATIBLE_VERSION _gUefiDriverRevision is greater than + SystemTable->Hdr.Revision. @retval Other Return value from ProcessModuleEntryPointList(). **/ EFI_STATUS