From: vanjeff Date: Mon, 18 Sep 2006 02:07:18 +0000 (+0000) Subject: add EFIAPI for those constructor funcitons declaration X-Git-Tag: edk2-stable201903~24327 X-Git-Url: https://git.proxmox.com/?p=mirror_edk2.git;a=commitdiff_plain;h=a8e756dad00a922dabe8a9f7d67c25e0d637538f add EFIAPI for those constructor funcitons declaration git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@1547 6f19259b-4bc3-4df7-8a09-765794883524 --- diff --git a/MdePkg/Include/Library/PeiServicesTablePointerLib.h b/MdePkg/Include/Library/PeiServicesTablePointerLib.h index 79f27c3456..74dd321f7f 100644 --- a/MdePkg/Include/Library/PeiServicesTablePointerLib.h +++ b/MdePkg/Include/Library/PeiServicesTablePointerLib.h @@ -1,14 +1,14 @@ /** @file PEI Services Table Pointer Library services - Copyright (c) 2006, 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 + Copyright (c) 2006, 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. + THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, + WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. Module Name: PeiServicesTablePointerLib.h @@ -19,14 +19,15 @@ /** The function returns the pointer to PEI services. - - The function returns the pointer to PEI services. + + The function returns the pointer to PEI services. It will ASSERT() if the pointer to PEI services is NULL. @retval The pointer to PeiServices. **/ EFI_PEI_SERVICES ** +EFIAPI GetPeiServicesTablePointer ( VOID ); diff --git a/MdePkg/Library/DxeIoLibCpuIo/IoLib.c b/MdePkg/Library/DxeIoLibCpuIo/IoLib.c index fa3421baca..4736c561dc 100644 --- a/MdePkg/Library/DxeIoLibCpuIo/IoLib.c +++ b/MdePkg/Library/DxeIoLibCpuIo/IoLib.c @@ -21,17 +21,18 @@ STATIC EFI_CPU_IO_PROTOCOL *mCpuIo = NULL; /** The constructor function caches the pointer to CpuIo protocol. - + The constructor function locates CpuIo protocol from protocol database. - It will ASSERT() if that operation fails and it will always return EFI_SUCCESS. + It will ASSERT() if that operation fails and it will always return EFI_SUCCESS. @param ImageHandle The firmware allocated handle for the EFI image. @param SystemTable A pointer to the EFI System Table. - + @retval EFI_SUCCESS The constructor always returns EFI_SUCCESS. **/ EFI_STATUS +EFIAPI IoLibConstructor ( IN EFI_HANDLE ImageHandle, IN EFI_SYSTEM_TABLE *SystemTable @@ -53,9 +54,9 @@ IoLibConstructor ( This function must guarantee that all I/O read and write operations are serialized. @param Port The base address of the I/O operation. - The caller is responsible for aligning the Address if required. + The caller is responsible for aligning the Address if required. @param Width The width of the I/O operation. - + @return Data read from registers in the EFI CPU I/O space. **/ @@ -83,10 +84,10 @@ IoReadWorker ( This function must guarantee that all I/O read and write operations are serialized. @param Port The base address of the I/O operation. - The caller is responsible for aligning the Address if required. + The caller is responsible for aligning the Address if required. @param Width The width of the I/O operation. @param Data The value to write to the I/O port. - + @return The paramter of Data. **/ @@ -107,16 +108,16 @@ IoWriteWorker ( } /** - Reads memory-mapped registers in the EFI system memory space. + Reads memory-mapped registers in the EFI system memory space. Reads the MMIO registers specified by Address with registers width specified by Width. The read value is returned. If such operations are not supported, then ASSERT(). This function must guarantee that all MMIO read and write operations are serialized. @param Address The MMIO register to read. - The caller is responsible for aligning the Address if required. + The caller is responsible for aligning the Address if required. @param Width The width of the I/O operation. - + @return Data read from registers in the EFI system memory space. **/ @@ -137,16 +138,16 @@ MmioReadWorker ( } /** - Writes memory-mapped registers in the EFI system memory space. + Writes memory-mapped registers in the EFI system memory space. Writes the MMIO registers specified by Address with registers width and value specified by Width and Data respectively. Data is returned. If such operations are not supported, then ASSERT(). This function must guarantee that all MMIO read and write operations are serialized. @param Address The MMIO register to read. - The caller is responsible for aligning the Address if required. + The caller is responsible for aligning the Address if required. @param Width The width of the I/O operation. - + @return Data read from registers in the EFI system memory space. **/ diff --git a/MdePkg/Library/DxeServicesTableLib/DxeServicesTableLib.c b/MdePkg/Library/DxeServicesTableLib/DxeServicesTableLib.c index 829e74f280..af19099def 100644 --- a/MdePkg/Library/DxeServicesTableLib/DxeServicesTableLib.c +++ b/MdePkg/Library/DxeServicesTableLib/DxeServicesTableLib.c @@ -35,6 +35,7 @@ EFI_DXE_SERVICES *gDS = NULL; **/ EFI_STATUS +EFIAPI DxeServicesTableLibConstructor ( IN EFI_HANDLE ImageHandle, IN EFI_SYSTEM_TABLE *SystemTable diff --git a/MdePkg/Library/PeiServicesTablePointerLib/PeiServicesTablePointer.c b/MdePkg/Library/PeiServicesTablePointerLib/PeiServicesTablePointer.c index 18d8c99b44..e1ff6edba9 100644 --- a/MdePkg/Library/PeiServicesTablePointerLib/PeiServicesTablePointer.c +++ b/MdePkg/Library/PeiServicesTablePointerLib/PeiServicesTablePointer.c @@ -2,13 +2,13 @@ PEI Services Table Pointer Library. Copyright (c) 2006, 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 + 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. + THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, + WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. Module Name: PeiServicesTablePointer.c @@ -20,8 +20,8 @@ static EFI_PEI_SERVICES **gPeiServices; /** The function returns the pointer to PEI services. - - The function returns the pointer to PEI services. + + The function returns the pointer to PEI services. It will ASSERT() if the pointer to PEI services is NULL. @retval The pointer to PeiServices. @@ -40,16 +40,17 @@ GetPeiServicesTablePointer ( /** The constructor function caches the pointer to PEI services. - The constructor function caches the pointer to PEI services. + The constructor function caches the pointer to PEI services. It will always return EFI_SUCCESS. @param FfsHeader Pointer to FFS header the loaded driver. @param PeiServices Pointer to the PEI services. - + @retval EFI_SUCCESS The constructor always returns EFI_SUCCESS. **/ EFI_STATUS +EFIAPI PeiServicesTablePointerLibConstructor ( IN EFI_FFS_FILE_HEADER *FfsHeader, IN EFI_PEI_SERVICES **PeiServices diff --git a/MdePkg/Library/PeiServicesTablePointerLibMm7/PeiServicesTablePointer.c b/MdePkg/Library/PeiServicesTablePointerLibMm7/PeiServicesTablePointer.c index 5901527ada..bcd35bcc28 100644 --- a/MdePkg/Library/PeiServicesTablePointerLibMm7/PeiServicesTablePointer.c +++ b/MdePkg/Library/PeiServicesTablePointerLibMm7/PeiServicesTablePointer.c @@ -2,12 +2,12 @@ PEI Services Table Pointer Library. Copyright (c) 2006, 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 + 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, + THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. Module Name: PeiServicesTablePointer.c @@ -17,14 +17,15 @@ /** The function returns the pointer to PeiServices. - - The function returns the pointer to PeiServices. + + The function returns the pointer to PeiServices. It will ASSERT() if the pointer to PeiServices is NULL. @retval The pointer to PeiServices. **/ EFI_PEI_SERVICES ** +EFIAPI GetPeiServicesTablePointer ( VOID ) @@ -38,17 +39,18 @@ GetPeiServicesTablePointer ( /** The constructor function caches the pointer to PEI services. - - The constructor function caches the pointer to PEI services. + + The constructor function caches the pointer to PEI services. It will always return EFI_SUCCESS. @param FfsHeader Pointer to FFS header the loaded driver. @param PeiServices Pointer to the PEI services. - + @retval EFI_SUCCESS The constructor always returns EFI_SUCCESS. **/ EFI_STATUS +EFIAPI PeiServicesTablePointerLibConstructor ( IN EFI_FFS_FILE_HEADER *FfsHeader, IN EFI_PEI_SERVICES **PeiServices diff --git a/MdePkg/Library/UefiBootServicesTableLib/UefiBootServicesTableLib.c b/MdePkg/Library/UefiBootServicesTableLib/UefiBootServicesTableLib.c index b45d12debf..0db4707e29 100644 --- a/MdePkg/Library/UefiBootServicesTableLib/UefiBootServicesTableLib.c +++ b/MdePkg/Library/UefiBootServicesTableLib/UefiBootServicesTableLib.c @@ -2,13 +2,13 @@ UEFI Boot Services Table Library. Copyright (c) 2006, 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 + 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. + THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, + WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. Module Name: UefiBootServicesTableLib.c @@ -21,18 +21,19 @@ EFI_BOOT_SERVICES *gBS; /** The constructor function caches the pointer of Boot Services Table. - The constructor function caches the pointer of Boot Services Table through System Table. + The constructor function caches the pointer of Boot Services Table through System Table. It will ASSERT() if the pointer of System Table is NULL. It will ASSERT() if the pointer of Boot Services Table is NULL. It will always return EFI_SUCCESS. @param ImageHandle The firmware allocated handle for the EFI image. @param SystemTable A pointer to the EFI System Table. - + @retval EFI_SUCCESS The constructor always returns EFI_SUCCESS. **/ EFI_STATUS +EFIAPI UefiBootServicesTableLibConstructor ( IN EFI_HANDLE ImageHandle, IN EFI_SYSTEM_TABLE *SystemTable diff --git a/MdePkg/Library/UefiDriverModelLib/UefiDriverModelLib.c b/MdePkg/Library/UefiDriverModelLib/UefiDriverModelLib.c index 4550937efd..5795e5ae50 100644 --- a/MdePkg/Library/UefiDriverModelLib/UefiDriverModelLib.c +++ b/MdePkg/Library/UefiDriverModelLib/UefiDriverModelLib.c @@ -2,13 +2,13 @@ EFI Driver Model Library. Copyright (c) 2006, 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 + 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. + THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, + WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. Module Name: UefiDriverModelLib.c @@ -19,13 +19,14 @@ /** The constructor function installs the standard EFI Driver Model Protocols. - @param[in] ImageHandle The firmware allocated handle for the EFI image. + @param[in] ImageHandle The firmware allocated handle for the EFI image. @param[in] SystemTable A pointer to the EFI System Table. - + @retval EFI_SUCCESS The constructor always return EFI_SUCCESS. **/ EFI_STATUS +EFIAPI UefiDriverModelLibConstructor ( IN EFI_HANDLE ImageHandle, IN EFI_SYSTEM_TABLE *SystemTable @@ -59,7 +60,7 @@ UefiDriverModelLibConstructor ( // // Check for all 8 possible combinations of the ComponentName, DriverConfiguration, and DriverDiagnostics Protocol - // These are all checks against const pointers, so the optimizing compiler will only select one of the + // These are all checks against const pointers, so the optimizing compiler will only select one of the // calls to InstallMultipleProtocolInterfaces() // if (_gDriverModelProtocolList[0].DriverDiagnostics == NULL) { @@ -230,13 +231,14 @@ UefiDriverModelLibConstructor ( /** The destructor function uninstalls the standard EFI Driver Model Protocols. - @param[in] ImageHandle The firmware allocated handle for the EFI image. + @param[in] ImageHandle The firmware allocated handle for the EFI image. @param[in] SystemTable A pointer to the EFI System Table. - + @retval EFI_SUCCESS The destructor always return EFI_SUCCESS. **/ EFI_STATUS +EFIAPI UefiDriverModelLibDestructor ( IN EFI_HANDLE ImageHandle, IN EFI_SYSTEM_TABLE *SystemTable @@ -269,7 +271,7 @@ UefiDriverModelLibDestructor ( // // Check for all 8 possible combinations of the ComponentName, DriverConfiguration, and DriverDiagnostics Protocol - // These are all checks against const pointers, so the optimizing compiler will only select one of the + // These are all checks against const pointers, so the optimizing compiler will only select one of the // calls to InstallMultipleProtocolInterfaces() // if (_gDriverModelProtocolList[0].DriverDiagnostics == NULL) { diff --git a/MdePkg/Library/UefiRuntimeServicesTableLib/UefiRuntimeServicesTableLib.c b/MdePkg/Library/UefiRuntimeServicesTableLib/UefiRuntimeServicesTableLib.c index bf15467bbe..852a692344 100644 --- a/MdePkg/Library/UefiRuntimeServicesTableLib/UefiRuntimeServicesTableLib.c +++ b/MdePkg/Library/UefiRuntimeServicesTableLib/UefiRuntimeServicesTableLib.c @@ -30,6 +30,7 @@ EFI_RUNTIME_SERVICES *gRT = NULL; **/ EFI_STATUS +EFIAPI UefiRuntimeServicesTableLibConstructor ( IN EFI_HANDLE ImageHandle, IN EFI_SYSTEM_TABLE *SystemTable