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