VirtualBox

source: vbox/trunk/src/VBox/Devices/EFI/FirmwareNew/MdePkg/Library/UefiRuntimeServicesTableLib/UefiRuntimeServicesTableLib.c@ 77662

Last change on this file since 77662 was 48674, checked in by vboxsync, 12 years ago

EFI: Export newly imported tinaocore UEFI sources to OSE.

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

© 2025 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette