mirror of
https://github.com/reactos/reactos.git
synced 2024-05-31 17:51:49 +00:00
ccef43f3b0
CORE-11954 - EFI binaries have a different subsystem in the PE header; - ENVIRON: Make sure INTN and UINTN are 64bit for 64bit platforms; - Handle UEFI Memory maps and translate it for freeldr; - Add FAILED_TO_EXIT_BOOTSERVICES Freeldr BSoD code.
39 lines
1,005 B
C
39 lines
1,005 B
C
/*
|
|
* PROJECT: FreeLoader UEFI Support
|
|
* LICENSE: GPL-2.0-or-later (https://spdx.org/licenses/GPL-2.0-or-later)
|
|
* PURPOSE: Utils source
|
|
* COPYRIGHT: Copyright 2022 Justin Miller <justinmiller100@gmail.com>
|
|
*/
|
|
|
|
#include <uefildr.h>
|
|
|
|
#include <debug.h>
|
|
DBG_DEFAULT_CHANNEL(WARNING);
|
|
|
|
/* GLOBALS ********************************************************************/
|
|
|
|
extern EFI_SYSTEM_TABLE *GlobalSystemTable;
|
|
|
|
/* FUNCTIONS ******************************************************************/
|
|
|
|
TIMEINFO*
|
|
UefiGetTime(VOID)
|
|
{
|
|
static TIMEINFO TimeInfo;
|
|
EFI_STATUS Status;
|
|
EFI_TIME time = {0};
|
|
|
|
Status = GlobalSystemTable->RuntimeServices->GetTime(&time, NULL);
|
|
if (Status != EFI_SUCCESS)
|
|
ERR("UefiGetTime: cannot get time status %d\n", Status);
|
|
|
|
TimeInfo.Year = time.Year;
|
|
TimeInfo.Month = time.Month;
|
|
TimeInfo.Day = time.Day;
|
|
TimeInfo.Hour = time.Hour;
|
|
TimeInfo.Minute = time.Minute;
|
|
TimeInfo.Second = time.Second;
|
|
return &TimeInfo;
|
|
}
|
|
|