]>
Commit | Line | Data |
---|---|---|
3eb9473e | 1 | /*++\r |
2 | \r | |
3 | Copyright (c) 2004 - 2006, Intel Corporation \r | |
4 | All rights reserved. This program and the accompanying materials \r | |
5 | are licensed and made available under the terms and conditions of the BSD License \r | |
6 | which accompanies this distribution. The full text of the license may be found at \r | |
7 | http://opensource.org/licenses/bsd-license.php \r | |
8 | \r | |
9 | THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, \r | |
10 | WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. \r | |
11 | \r | |
12 | \r | |
13 | Module Name:\r | |
14 | \r | |
15 | UefiBootServicesTableLib.c\r | |
16 | \r | |
17 | Abstract: \r | |
18 | \r | |
19 | UEFI Boot Services Table Library.\r | |
20 | \r | |
21 | --*/\r | |
22 | \r | |
23 | #include "EdkIIGlueUefi.h"\r | |
24 | \r | |
3eb9473e | 25 | EFI_SYSTEM_TABLE *gST;\r |
26 | EFI_BOOT_SERVICES *gBS;\r | |
27 | \r | |
28 | /**\r | |
29 | The constructor function caches the pointer of Boot Services Table.\r | |
30 | \r | |
31 | The constructor function caches the pointer of Boot Services Table through System Table.\r | |
32 | It will ASSERT() if the pointer of System Table is NULL.\r | |
33 | It will ASSERT() if the pointer of Boot 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 | |
42 | EFI_STATUS\r | |
43 | EFIAPI\r | |
44 | UefiBootServicesTableLibConstructor (\r | |
45 | IN EFI_HANDLE ImageHandle,\r | |
46 | IN EFI_SYSTEM_TABLE *SystemTable\r | |
47 | )\r | |
48 | {\r | |
3eb9473e | 49 | //\r |
50 | // Cache pointer to the EFI System Table\r | |
51 | //\r | |
52 | gST = SystemTable;\r | |
53 | ASSERT (gST != NULL);\r | |
54 | \r | |
55 | //\r | |
56 | // Cache pointer to the EFI Boot Services Table\r | |
57 | //\r | |
58 | gBS = SystemTable->BootServices;\r | |
59 | ASSERT (gBS != NULL);\r | |
60 | \r | |
61 | return EFI_SUCCESS;\r | |
62 | }\r |