VirtualBox

source: vbox/trunk/src/VBox/Devices/EFI/Firmware/MdePkg/Library/UefiRuntimeServicesTableLib/UefiRuntimeServicesTableLib.c@ 98412

Last change on this file since 98412 was 80721, checked in by vboxsync, 6 years ago

Devices/EFI/FirmwareNew: Start upgrade process to edk2-stable201908 (compiles on Windows and works to some extent), bugref:4643

  • Property svn:eol-style set to native
File size: 1.1 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 SPDX-License-Identifier: BSD-2-Clause-Patent
9
10**/
11
12#include <Uefi.h>
13#include <Library/DebugLib.h>
14
15EFI_RUNTIME_SERVICES *gRT = NULL;
16
17/**
18 The constructor function caches the pointer of Runtime Services Table.
19
20 The constructor function caches the pointer of Runtime Services Table.
21 It will ASSERT() if the pointer of Runtime Services Table is NULL.
22 It will always return EFI_SUCCESS.
23
24 @param ImageHandle The firmware allocated handle for the EFI image.
25 @param SystemTable A pointer to the EFI System Table.
26
27 @retval EFI_SUCCESS The constructor always returns EFI_SUCCESS.
28
29**/
30EFI_STATUS
31EFIAPI
32UefiRuntimeServicesTableLibConstructor (
33 IN EFI_HANDLE ImageHandle,
34 IN EFI_SYSTEM_TABLE *SystemTable
35 )
36{
37 //
38 // Cache pointer to the EFI Runtime Services Table
39 //
40 gRT = SystemTable->RuntimeServices;
41 ASSERT (gRT != NULL);
42 return EFI_SUCCESS;
43}
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