]>
Commit | Line | Data |
---|---|---|
e386b444 | 1 | /** @file\r |
2 | UEFI Runtime Services Table Library.\r | |
3 | \r | |
f36a7bf5 | 4 | This library instance retrieve EFI_RUNTIME_SERVICES pointer from EFI system table\r |
5 | in library's constructor.\r | |
6 | \r | |
373ade0e | 7 | Copyright (c) 2006 - 2008, Intel Corporation<BR>\r |
e386b444 | 8 | All rights reserved. This program and the accompanying materials\r |
9 | are licensed and made available under the terms and conditions of the BSD License\r | |
10 | which accompanies this distribution. The full text of the license may be found at\r | |
11 | http://opensource.org/licenses/bsd-license.php\r | |
12 | \r | |
13 | THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r | |
14 | WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r | |
15 | \r | |
e386b444 | 16 | **/\r |
17 | \r | |
60c93673 | 18 | #include <Uefi.h>\r |
c7d265a9 | 19 | #include <Library/DebugLib.h>\r |
e386b444 | 20 | \r |
21 | EFI_RUNTIME_SERVICES *gRT = NULL;\r | |
22 | \r | |
23 | /**\r | |
24 | The constructor function caches the pointer of Runtime Services Table.\r | |
25 | \r | |
26 | The constructor function caches the pointer of Runtime Services Table.\r | |
27 | It will ASSERT() if the pointer of Runtime Services Table is NULL.\r | |
28 | It will always return EFI_SUCCESS.\r | |
29 | \r | |
30 | @param ImageHandle The firmware allocated handle for the EFI image.\r | |
31 | @param SystemTable A pointer to the EFI System Table.\r | |
32 | \r | |
33 | @retval EFI_SUCCESS The constructor always returns EFI_SUCCESS.\r | |
34 | \r | |
35 | **/\r | |
36 | EFI_STATUS\r | |
37 | EFIAPI\r | |
38 | UefiRuntimeServicesTableLibConstructor (\r | |
39 | IN EFI_HANDLE ImageHandle,\r | |
40 | IN EFI_SYSTEM_TABLE *SystemTable\r | |
41 | )\r | |
42 | {\r | |
43 | //\r | |
44 | // Cache pointer to the EFI Runtime Services Table\r | |
45 | //\r | |
46 | gRT = SystemTable->RuntimeServices;\r | |
47 | ASSERT (gRT != NULL);\r | |
48 | return EFI_SUCCESS;\r | |
49 | }\r |