mirror of
https://github.com/acidanthera/audk.git
synced 2025-07-31 01:24:12 +02:00
The current image DxeCore re-uses the generic UEFI implementations of DxeServicesTableLib, UefiBootServicesTableLib, and UefiRuntimeServicesTableLib. As it is the owner of those pointers however, it can expose them without further indirection. Import library instances of the services table libraries specifically for DxeCore to expose its internal pointers dirtectly. Cc: Jian J Wang <jian.j.wang@intel.com> Cc: Hao A Wu <hao.a.wu@intel.com> Cc: Dandan Bi <dandan.bi@intel.com> Cc: Liming Gao <gaoliming@byosoft.com.cn> Cc: Vitaly Cheptsov <vit9696@protonmail.com> Signed-off-by: Marvin Häuser <mhaeuser@posteo.de>
40 lines
1001 B
C
40 lines
1001 B
C
/** @file
|
|
Dummy instance of UEFI Runtime Services Table Library for DxeCore.
|
|
|
|
Relies on and sanity-checks that DxeCore provides the variables itself.
|
|
|
|
Copyright (c) 2021, Marvin Häuser. All rights reserved.<BR>
|
|
SPDX-License-Identifier: BSD-2-Clause-Patent
|
|
|
|
**/
|
|
|
|
#include <Uefi.h>
|
|
|
|
#include <Library/UefiRuntimeServicesTableLib.h>
|
|
#include <Library/DebugLib.h>
|
|
|
|
/**
|
|
The constructor function sanity-checks the variables set by DxeCore.
|
|
It will always return EFI_SUCCESS.
|
|
|
|
@param ImageHandle The firmware allocated handle for the EFI image.
|
|
@param SystemTable A pointer to the EFI System Table.
|
|
|
|
@retval EFI_SUCCESS The constructor always returns EFI_SUCCESS.
|
|
|
|
**/
|
|
EFI_STATUS
|
|
EFIAPI
|
|
UefiRuntimeServicesTableLibConstructor (
|
|
IN EFI_HANDLE ImageHandle,
|
|
IN EFI_SYSTEM_TABLE *SystemTable
|
|
)
|
|
{
|
|
//
|
|
// ASSERT that DxeCore provides the services correctly and in time
|
|
//
|
|
ASSERT (gRT == SystemTable->RuntimeServices);
|
|
ASSERT (gRT != NULL);
|
|
return EFI_SUCCESS;
|
|
}
|