2 UEFI Boot Services Table Library.
4 Copyright (c) 2006 - 2007, Intel Corporation<BR>
5 All rights reserved. This program and the accompanying materials
6 are licensed and made available under the terms and conditions of the BSD License
7 which accompanies this distribution. The full text of the license may be found at
8 http://opensource.org/licenses/bsd-license.php
10 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
11 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
13 Module Name: UefiBootServicesTableLib.c
18 // The package level header files this module uses
22 // The protocols, PPI and GUID defintions for this module
25 // The Library classes this module consumes
27 #include <Library/UefiBootServicesTableLib.h>
28 #include <Library/DebugLib.h>
30 EFI_HANDLE gImageHandle
= NULL
;
31 EFI_SYSTEM_TABLE
*gST
= NULL
;
32 EFI_BOOT_SERVICES
*gBS
= NULL
;
35 The constructor function caches the pointer of Boot Services Table.
37 The constructor function caches the pointer of Boot Services Table through System Table.
38 It will ASSERT() if the pointer of System Table is NULL.
39 It will ASSERT() if the pointer of Boot Services Table is NULL.
40 It will always return EFI_SUCCESS.
42 @param ImageHandle The firmware allocated handle for the EFI image.
43 @param SystemTable A pointer to the EFI System Table.
45 @retval EFI_SUCCESS The constructor always returns EFI_SUCCESS.
50 UefiBootServicesTableLibConstructor (
51 IN EFI_HANDLE ImageHandle
,
52 IN EFI_SYSTEM_TABLE
*SystemTable
56 // Cache the Image Handle
58 gImageHandle
= ImageHandle
;
59 ASSERT (gImageHandle
!= NULL
);
62 // Cache pointer to the EFI System Table
68 // Cache pointer to the EFI Boot Services Table
70 gBS
= SystemTable
->BootServices
;