]> git.proxmox.com Git - mirror_edk2.git/blob - MdePkg/Library/UefiBootServicesTableLib/UefiBootServicesTableLib.c
remove some comments introduced by tools.
[mirror_edk2.git] / MdePkg / Library / UefiBootServicesTableLib / UefiBootServicesTableLib.c
1 /** @file
2 UEFI Boot Services Table Library.
3
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
9
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.
12
13 **/
14
15
16 #include <PiDxe.h>
17
18
19 #include <Library/UefiBootServicesTableLib.h>
20 #include <Library/DebugLib.h>
21 #include "UefiBootServicesTableLibInternal.h"
22
23 EFI_HANDLE gImageHandle = NULL;
24 EFI_SYSTEM_TABLE *gST = NULL;
25 EFI_BOOT_SERVICES *gBS = NULL;
26
27 /**
28 The constructor function caches the pointer of Boot Services Table.
29
30 The constructor function caches the pointer of Boot Services Table through System Table.
31 It will ASSERT() if the pointer of System Table is NULL.
32 It will ASSERT() if the pointer of Boot Services Table is NULL.
33 It will always return EFI_SUCCESS.
34
35 @param ImageHandle The firmware allocated handle for the EFI image.
36 @param SystemTable A pointer to the EFI System Table.
37
38 @retval EFI_SUCCESS The constructor always returns EFI_SUCCESS.
39
40 **/
41 EFI_STATUS
42 EFIAPI
43 UefiBootServicesTableLibConstructor (
44 IN EFI_HANDLE ImageHandle,
45 IN EFI_SYSTEM_TABLE *SystemTable
46 )
47 {
48 //
49 // Cache the Image Handle
50 //
51 gImageHandle = ImageHandle;
52 ASSERT (gImageHandle != NULL);
53
54 //
55 // Cache pointer to the EFI System Table
56 //
57 gST = SystemTable;
58 ASSERT (gST != NULL);
59
60 //
61 // Cache pointer to the EFI Boot Services Table
62 //
63 gBS = SystemTable->BootServices;
64 ASSERT (gBS != NULL);
65
66 return EFI_SUCCESS;
67 }