TianoCore EDK2 master
|
#include "UnitTestUefiBootServicesTableLib.h"
Go to the source code of this file.
Functions | |
EFI_STATUS EFIAPI | UnitTestUefiBootServicesTableLibConstructor (IN EFI_HANDLE ImageHandle, IN EFI_SYSTEM_TABLE *SystemTable) |
Variables | |
EFI_HANDLE | gImageHandle = NULL |
EFI_SYSTEM_TABLE * | gST = NULL |
STATIC EFI_BOOT_SERVICES | mBootServices |
EFI_BOOT_SERVICES * | gBS = &mBootServices |
This library supports a Boot Services table library implementation that allows code dependent upon UefiBootServicesTableLib to operate in an isolated execution environment such as within the context of a host-based unit test framework.
The unit test should initialize the Boot Services database with any required elements (e.g. protocols, events, handles, etc.) prior to the services being invoked by code under test.
It is strongly recommended to clean any global databases (e.g. protocol, event, handles, etc.) after every unit test so the tests execute in a predictable manner from a clean state.
Copyright (c) Microsoft Corporation SPDX-License-Identifier: BSD-2-Clause-Patent
Definition in file UnitTestUefiBootServicesTableLib.c.
EFI_STATUS EFIAPI UnitTestUefiBootServicesTableLibConstructor | ( | IN EFI_HANDLE | ImageHandle, |
IN EFI_SYSTEM_TABLE * | SystemTable | ||
) |
The constructor function caches the pointer of Boot Services Table.
The constructor function caches the pointer of Boot Services Table through System Table. It will ASSERT() if the pointer of System Table is NULL. It will ASSERT() if the pointer of Boot Services Table is NULL. It will always return EFI_SUCCESS.
ImageHandle | The firmware allocated handle for the EFI image. |
SystemTable | A pointer to the EFI System Table. |
EFI_SUCCESS | The constructor always returns EFI_SUCCESS. |
Definition at line 94 of file UnitTestUefiBootServicesTableLib.c.
EFI_BOOT_SERVICES* gBS = &mBootServices |
Cache pointer to the EFI Boot Services Table
Definition at line 76 of file UnitTestUefiBootServicesTableLib.c.
EFI_HANDLE gImageHandle = NULL |
Cache the Image Handle
Definition at line 19 of file UnitTestUefiBootServicesTableLib.c.
EFI_SYSTEM_TABLE* gST = NULL |
Cache pointer to the EFI System Table
Definition at line 20 of file UnitTestUefiBootServicesTableLib.c.
STATIC EFI_BOOT_SERVICES mBootServices |
Definition at line 22 of file UnitTestUefiBootServicesTableLib.c.