]> git.proxmox.com Git - mirror_edk2.git/blame - MdePkg/Library/DxeServicesTableLib/DxeServicesTableLib.c
Removed MdePkg usage of ModuleName: in file headers
[mirror_edk2.git] / MdePkg / Library / DxeServicesTableLib / DxeServicesTableLib.c
CommitLineData
e386b444 1/** @file\r
2 DXE Library.\r
3\r
4 Copyright (c) 2006, Intel Corporation<BR>\r
5 All rights reserved. This program and the accompanying materials\r
6 are licensed and made available under the terms and conditions of the BSD License\r
7 which accompanies this distribution. The full text of the license may be found at\r
8 http://opensource.org/licenses/bsd-license.php\r
9\r
10 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
11 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
12\r
e386b444 13**/\r
14\r
c7d265a9 15#include <PiDxe.h>\r
c7d265a9 16#include <Guid/DxeServices.h>\r
c7d265a9 17#include <Library/DxeServicesTableLib.h>\r
18#include <Library/DebugLib.h>\r
19#include <Library/UefiLib.h>\r
e386b444 20\r
a73480f6 21#include "DxeServicesTableLibInternal.h"\r
f734a10a 22\r
e386b444 23//\r
24// Cache copy of the DXE Services Table\r
25//\r
26EFI_DXE_SERVICES *gDS = NULL;\r
27\r
28/**\r
29 The constructor function caches the pointer of DXE Services Table.\r
30\r
31 The constructor function caches the pointer of DXE Services Table.\r
32 It will ASSERT() if that operation fails.\r
33 It will ASSERT() if the pointer of DXE Services Table is NULL.\r
34 It will always return EFI_SUCCESS.\r
35\r
36 @param ImageHandle The firmware allocated handle for the EFI image.\r
37 @param SystemTable A pointer to the EFI System Table.\r
38\r
39 @retval EFI_SUCCESS The constructor always returns EFI_SUCCESS.\r
40\r
41**/\r
42EFI_STATUS\r
43EFIAPI\r
44DxeServicesTableLibConstructor (\r
45 IN EFI_HANDLE ImageHandle,\r
46 IN EFI_SYSTEM_TABLE *SystemTable\r
47 )\r
48{\r
49 EFI_STATUS Status;\r
50\r
51 //\r
52 // Cache copy of the DXE Services Table\r
53 //\r
54 Status = EfiGetSystemConfigurationTable (&gEfiDxeServicesTableGuid, (VOID **) &gDS);\r
55 ASSERT_EFI_ERROR (Status);\r
56 ASSERT (gDS != NULL);\r
57\r
58 return Status;\r
59}\r