OpenCore  1.0.4
OpenCore Bootloader
Loading...
Searching...
No Matches
UserBootServices.c File Reference
#include <UserBootServices.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 45 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 79 of file UserBootServices.c.

◆ DummyCalculateCrc32()

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

Definition at line 232 of file UserBootServices.c.

◆ DummyGetTime()

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

Definition at line 269 of file UserBootServices.c.

◆ DummyInstallConfigurationTable()

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

Definition at line 93 of file UserBootServices.c.

◆ DummyLocateProtocol()

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

Definition at line 68 of file UserBootServices.c.

◆ DummyRaiseTPL()

EFI_TPL EFIAPI DummyRaiseTPL ( IN EFI_TPL NewTpl)

Definition at line 50 of file UserBootServices.c.

◆ DummyRestoreTPL()

VOID EFIAPI DummyRestoreTPL ( IN EFI_TPL NewTpl)

Definition at line 59 of file UserBootServices.c.

◆ NullTextOutputString()

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

Definition at line 248 of file UserBootServices.c.

Variable Documentation

◆ gBS

EFI_BOOT_SERVICES* gBS = &mBootServices

Definition at line 36 of file UserBootServices.c.

◆ gImageHandle

EFI_HANDLE gImageHandle = (EFI_HANDLE)(UINTN)0xDEADBABEULL

Definition at line 38 of file UserBootServices.c.

◆ gRT

EFI_RUNTIME_SERVICES* gRT = &mRuntimeServices

Definition at line 43 of file UserBootServices.c.

◆ gST

EFI_SYSTEM_TABLE* gST = &mSystemTable

Definition at line 35 of file UserBootServices.c.

◆ mBootServices

EFI_BOOT_SERVICES mBootServices
Initial value:
= {
.RaiseTPL = DummyRaiseTPL,
.RestoreTPL = DummyRestoreTPL,
.LocateProtocol = DummyLocateProtocol,
.AllocatePages = DummyAllocatePages,
.InstallConfigurationTable = DummyInstallConfigurationTable,
.CalculateCrc32 = DummyCalculateCrc32
}
EFI_TPL EFIAPI DummyRaiseTPL(IN EFI_TPL NewTpl)
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)
VOID EFIAPI DummyRestoreTPL(IN EFI_TPL NewTpl)
EFI_STATUS EFIAPI DummyLocateProtocol(IN EFI_GUID *Protocol, IN VOID *Registration, OPTIONAL OUT VOID **Interface)

Definition at line 12 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 21 of file UserBootServices.c.

◆ mDebugST

EFI_SYSTEM_TABLE* mDebugST = &mSystemTable

Definition at line 41 of file UserBootServices.c.

◆ mPostEBS

BOOLEAN mPostEBS = FALSE

Definition at line 40 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 30 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 25 of file UserBootServices.c.

◆ mSystemTableAllocateSize

UINTN mSystemTableAllocateSize = 0ULL

Definition at line 46 of file UserBootServices.c.