一、gST、gBS和gImageHandle是什么?
gST:globalSystemTable,指向SystemTable,EFI系统表的缓存指针; gBS:globalBootServices,指向SystemTable->BootServices,EFI引导服务表的缓存指针; gImageHandle:ImageHandle,Image句柄的缓存。二、使用步骤
1.变量定义
@file edk2\MdePkg\Include\Library\UefiBootServiceTableLib.h
代码如下:
/** @file
Provides a service to retrieve a pointer to the EFI Boot Services Table.
Only available to DXE and UEFI module types.
Copyright (c) 2006 - 2008, Intel Corporation. All rights reserved.<BR>
SPDX-License-Identifier: BSD-2-Clause-Patent
**/
#