Files
slimbootloader/BootloaderCorePkg/Library/BootloaderCoreLib/Ia32/BootloaderArch.c
T
Guo Dong 5e10bd1e07 Update BSD license to BSD+Patent license
To align with EDK2, update file license
to use BSD+Patent license

Signed-off-by: Guo Dong <guo.dong@intel.com>
2019-06-13 10:46:49 -07:00

45 lines
809 B
C

/** @file
Copyright (c) 2016 - 2017, Intel Corporation. All rights reserved.<BR>
SPDX-License-Identifier: BSD-2-Clause-Patent
**/
#include <PiPei.h>
#include <Library/PcdLib.h>
#include <Library/BootloaderCoreLib.h>
/**
This function sets the Loader global data pointer.
@param[in] LoaderData Loader data pointer.
**/
VOID
EFIAPI
SetLoaderGlobalDataPointer (
IN LOADER_GLOBAL_DATA *LoaderData
)
{
IA32_DESCRIPTOR Idtr;
AsmReadIdtr (&Idtr);
(* (UINTN *) (Idtr.Base - sizeof (UINTN))) = (UINTN)LoaderData;
}
/**
This function gets the Loader global data pointer.
**/
LOADER_GLOBAL_DATA *
EFIAPI
GetLoaderGlobalDataPointer (
VOID
)
{
IA32_DESCRIPTOR Idtr;
AsmReadIdtr (&Idtr);
return (LOADER_GLOBAL_DATA *) (* (UINTN *) (Idtr.Base - sizeof (UINTN)));
}