3 Copyright (c) 2004 - 2006, Intel Corporation
4 All rights reserved. This program and the accompanying materials
5 are licensed and made available under the terms and conditions of the BSD License
6 which accompanies this distribution. The full text of the license may be found at
7 http://opensource.org/licenses/bsd-license.php
9 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
10 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
15 UefiBootServicesTableLib.c
19 UEFI Boot Services Table Library.
23 #include "EdkIIGlueUefi.h"
25 EFI_HANDLE gImageHandle
;
26 EFI_SYSTEM_TABLE
*gST
;
27 EFI_BOOT_SERVICES
*gBS
;
30 The constructor function caches the pointer of Boot Services Table.
32 The constructor function caches the pointer of Boot Services Table through System Table.
33 It will ASSERT() if the pointer of System Table is NULL.
34 It will ASSERT() if the pointer of Boot Services Table is NULL.
35 It will always return EFI_SUCCESS.
37 @param ImageHandle The firmware allocated handle for the EFI image.
38 @param SystemTable A pointer to the EFI System Table.
40 @retval EFI_SUCCESS The constructor always returns EFI_SUCCESS.
45 UefiBootServicesTableLibConstructor (
46 IN EFI_HANDLE ImageHandle
,
47 IN EFI_SYSTEM_TABLE
*SystemTable
51 // Cache the Image Handle
53 gImageHandle
= ImageHandle
;
56 // Cache pointer to the EFI System Table
62 // Cache pointer to the EFI Boot Services Table
64 gBS
= SystemTable
->BootServices
;