OpenCore  1.0.6
OpenCore Bootloader
Loading...
Searching...
No Matches
UserBootServices.c File Reference
#include <UserBootServices.h>
#include <UserEvent.h>
#include <stdio.h>
#include <stdlib.h>
#include <time.h>

Go to the source code of this file.

Macros

#define CONFIG_TABLE_SIZE_INCREASED   0x10
 

Functions

EFI_TPL EFIAPI DummyRaiseTPL (IN EFI_TPL NewTpl)
 
VOID EFIAPI DummyRestoreTPL (IN EFI_TPL NewTpl)
 
EFI_STATUS EFIAPI DummyLocateProtocol (IN EFI_GUID *Protocol, IN VOID *Registration, OPTIONAL OUT VOID **Interface)
 
EFI_STATUS EFIAPI DummyAllocatePages (IN EFI_ALLOCATE_TYPE Type, IN EFI_MEMORY_TYPE MemoryType, IN UINTN Pages, IN OUT EFI_PHYSICAL_ADDRESS *Memory)
 
EFI_STATUS EFIAPI DummyInstallConfigurationTable (IN EFI_GUID *Guid, IN VOID *Table)
 
EFI_STATUS EFIAPI DummyCalculateCrc32 (IN VOID *Data, IN UINTN DataSize, OUT UINT32 *CrcOut)
 
EFI_STATUS EFIAPI NullTextOutputString (IN EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL *This, IN CHAR16 *String)
 
EFI_STATUS EFIAPI DummyGetTime (OUT EFI_TIME *Time, OUT EFI_TIME_CAPABILITIES *Capabilities)
 

Variables

EFI_BOOT_SERVICES mBootServices
 
EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL mConOut
 
EFI_SYSTEM_TABLE mSystemTable
 
EFI_RUNTIME_SERVICES mRuntimeServices
 
EFI_SYSTEM_TABLE * gST = &mSystemTable
 
EFI_BOOT_SERVICES * gBS = &mBootServices
 
EFI_HANDLE gImageHandle = (EFI_HANDLE)(UINTN)0xDEADBABEULL
 
BOOLEAN mPostEBS = FALSE
 
EFI_SYSTEM_TABLE * mDebugST = &mSystemTable
 
EFI_RUNTIME_SERVICES * gRT = &mRuntimeServices
 
UINTN mSystemTableAllocateSize = 0ULL
 

Detailed Description

Copyright (c) 2020, PMheart. All rights reserved. SPDX-License-Identifier: BSD-3-Clause

Definition in file UserBootServices.c.

Macro Definition Documentation

◆ CONFIG_TABLE_SIZE_INCREASED

#define CONFIG_TABLE_SIZE_INCREASED   0x10

Definition at line 54 of file UserBootServices.c.

Function Documentation

◆ DummyAllocatePages()

EFI_STATUS EFIAPI DummyAllocatePages ( IN EFI_ALLOCATE_TYPE Type,
IN EFI_MEMORY_TYPE MemoryType,
IN UINTN Pages,
IN OUT EFI_PHYSICAL_ADDRESS * Memory )

Definition at line 88 of file UserBootServices.c.

◆ DummyCalculateCrc32()

EFI_STATUS EFIAPI DummyCalculateCrc32 ( IN VOID * Data,
IN UINTN DataSize,
OUT UINT32 * CrcOut )

Definition at line 241 of file UserBootServices.c.

◆ DummyGetTime()

EFI_STATUS EFIAPI DummyGetTime ( OUT EFI_TIME * Time,
OUT EFI_TIME_CAPABILITIES * Capabilities )

Definition at line 278 of file UserBootServices.c.

◆ DummyInstallConfigurationTable()

EFI_STATUS EFIAPI DummyInstallConfigurationTable ( IN EFI_GUID * Guid,
IN VOID * Table )

Definition at line 102 of file UserBootServices.c.

◆ DummyLocateProtocol()

EFI_STATUS EFIAPI DummyLocateProtocol ( IN EFI_GUID * Protocol,
IN VOID * Registration,
OPTIONAL OUT VOID ** Interface )

Definition at line 77 of file UserBootServices.c.

◆ DummyRaiseTPL()

EFI_TPL EFIAPI DummyRaiseTPL ( IN EFI_TPL NewTpl)

Definition at line 59 of file UserBootServices.c.

◆ DummyRestoreTPL()

VOID EFIAPI DummyRestoreTPL ( IN EFI_TPL NewTpl)

Definition at line 68 of file UserBootServices.c.

◆ NullTextOutputString()

EFI_STATUS EFIAPI NullTextOutputString ( IN EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL * This,
IN CHAR16 * String )

Definition at line 257 of file UserBootServices.c.

Variable Documentation

◆ gBS

EFI_BOOT_SERVICES* gBS = &mBootServices

Definition at line 45 of file UserBootServices.c.

◆ gImageHandle

EFI_HANDLE gImageHandle = (EFI_HANDLE)(UINTN)0xDEADBABEULL

Definition at line 47 of file UserBootServices.c.

◆ gRT

EFI_RUNTIME_SERVICES* gRT = &mRuntimeServices

Definition at line 52 of file UserBootServices.c.

◆ gST

EFI_SYSTEM_TABLE* gST = &mSystemTable

Definition at line 44 of file UserBootServices.c.

◆ mBootServices

EFI_BOOT_SERVICES mBootServices
Initial value:
= {
.LocateProtocol = DummyLocateProtocol,
.AllocatePages = DummyAllocatePages,
.InstallConfigurationTable = DummyInstallConfigurationTable,
.CalculateCrc32 = DummyCalculateCrc32,
.CreateEventEx = UserCreateEventEx,
.CreateEvent = UserCreateEvent,
.CloseEvent = UserCloseEvent,
.CheckEvent = UserCheckEvent,
.WaitForEvent = UserWaitForEvent,
.SignalEvent = UserSignalEvent,
.SetTimer = UserSetTimer,
.RaiseTPL = UserRaiseTPL,
.RestoreTPL = UserRestoreTPL
}
EFI_STATUS EFIAPI DummyCalculateCrc32(IN VOID *Data, IN UINTN DataSize, OUT UINT32 *CrcOut)
EFI_STATUS EFIAPI DummyInstallConfigurationTable(IN EFI_GUID *Guid, IN VOID *Table)
EFI_STATUS EFIAPI DummyAllocatePages(IN EFI_ALLOCATE_TYPE Type, IN EFI_MEMORY_TYPE MemoryType, IN UINTN Pages, IN OUT EFI_PHYSICAL_ADDRESS *Memory)
EFI_STATUS EFIAPI DummyLocateProtocol(IN EFI_GUID *Protocol, IN VOID *Registration, OPTIONAL OUT VOID **Interface)
EFI_STATUS EFIAPI UserWaitForEvent(IN UINTN NumberOfEvents, IN EFI_EVENT *Events, OUT UINTN *Index)
Definition UserEvent.c:481
EFI_STATUS EFIAPI UserCreateEvent(IN UINT32 Type, IN EFI_TPL NotifyTpl, IN EFI_EVENT_NOTIFY NotifyFunction OPTIONAL, IN VOID *NotifyContext OPTIONAL, OUT EFI_EVENT *Event)
Definition UserEvent.c:337
EFI_STATUS EFIAPI UserCheckEvent(IN EFI_EVENT Event)
Definition UserEvent.c:425
EFI_STATUS EFIAPI UserCreateEventEx(IN UINT32 Type, IN EFI_TPL NotifyTpl, IN EFI_EVENT_NOTIFY NotifyFunction OPTIONAL, IN CONST VOID *NotifyContext OPTIONAL, IN CONST EFI_GUID *EventGroup OPTIONAL, OUT EFI_EVENT *Event)
Definition UserEvent.c:248
EFI_STATUS EFIAPI UserSignalEvent(IN EFI_EVENT Event)
Definition UserEvent.c:392
EFI_STATUS EFIAPI UserCloseEvent(IN EFI_EVENT Event)
Definition UserEvent.c:364
EFI_STATUS EFIAPI UserSetTimer(IN EFI_EVENT Event, IN EFI_TIMER_DELAY Type, IN UINT64 TriggerTime)
Definition UserEvent.c:556
VOID EFIAPI UserRestoreTPL(IN EFI_TPL OldTpl)
Definition UserEvent.c:636
EFI_TPL EFIAPI UserRaiseTPL(IN EFI_TPL NewTpl)
Definition UserEvent.c:611

Definition at line 13 of file UserBootServices.c.

◆ mConOut

EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL mConOut
Initial value:
= {
.OutputString = NullTextOutputString
}
EFI_STATUS EFIAPI NullTextOutputString(IN EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL *This, IN CHAR16 *String)

Definition at line 30 of file UserBootServices.c.

◆ mDebugST

EFI_SYSTEM_TABLE* mDebugST = &mSystemTable

Definition at line 50 of file UserBootServices.c.

◆ mPostEBS

BOOLEAN mPostEBS = FALSE

Definition at line 49 of file UserBootServices.c.

◆ mRuntimeServices

EFI_RUNTIME_SERVICES mRuntimeServices
Initial value:
= {
.Hdr = { 0 },
.GetTime = DummyGetTime,
}
EFI_STATUS EFIAPI DummyGetTime(OUT EFI_TIME *Time, OUT EFI_TIME_CAPABILITIES *Capabilities)

Definition at line 39 of file UserBootServices.c.

◆ mSystemTable

EFI_SYSTEM_TABLE mSystemTable
Initial value:
= {
.BootServices = &mBootServices,
.ConOut = &mConOut
}
EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL mConOut
EFI_BOOT_SERVICES mBootServices

Definition at line 34 of file UserBootServices.c.

◆ mSystemTableAllocateSize

UINTN mSystemTableAllocateSize = 0ULL

Definition at line 55 of file UserBootServices.c.