OpenCore
1.0.4
OpenCore Bootloader
|
#include <Uefi.h>
#include <Library/UefiLib.h>
#include <Library/UefiApplicationEntryPoint.h>
#include <Library/DebugLib.h>
Go to the source code of this file.
Functions | |
VOID EFIAPI | CpuBreakpoint (VOID) |
VOID EFIAPI | CpuPause (VOID) |
VOID EFIAPI | DisableInterrupts (VOID) |
VOID EFIAPI | EnableInterrupts (VOID) |
UINT32 | AsmCpuid (IN UINT32 Index, OUT UINT32 *Eax, OPTIONAL OUT UINT32 *Ebx, OPTIONAL OUT UINT32 *Ecx, OPTIONAL OUT UINT32 *Edx OPTIONAL) |
UINT32 | AsmCpuidEx (IN UINT32 Index, IN UINT32 SubIndex, OUT UINT32 *Eax, OPTIONAL OUT UINT32 *Ebx, OPTIONAL OUT UINT32 *Ecx, OPTIONAL OUT UINT32 *Edx OPTIONAL) |
UINT32 EFIAPI | AsmIncrementUint32 (IN volatile UINT32 *Value) |
UINT32 EFIAPI | AsmReadIntelMicrocodeRevision (VOID) |
UINTN EFIAPI | AsmReadCr4 (VOID) |
UINT16 EFIAPI | AsmReadCs (VOID) |
UINTN EFIAPI | AsmReadEflags (VOID) |
UINT64 EFIAPI | AsmReadMsr64 (IN UINT32 Index) |
UINT64 EFIAPI | AsmReadTsc (VOID) |
UINTN EFIAPI | AsmWriteCr4 (UINTN Cr4) |
UINT64 EFIAPI | AsmWriteMsr64 (IN UINT32 Index, IN UINT64 Value) |
UINT64 EFIAPI | AsmMsrAndThenOr64 (IN UINT32 Index, IN UINT64 AndData, IN UINT64 OrData) |
VOID EFIAPI | AsmDisableCache (VOID) |
VOID EFIAPI | AsmEnableCache (VOID) |
VOID EFIAPI | CpuFlushTlb (VOID) |
UINT8 EFIAPI | IoRead8 (IN UINTN Port) |
UINT8 EFIAPI | IoWrite8 (IN UINTN Port, IN UINT8 Value) |
UINT32 EFIAPI | IoRead32 (IN UINTN Port) |
UINT32 EFIAPI | IoWrite32 (IN UINTN Port, IN UINT32 Value) |
UINT16 EFIAPI | MmioAnd16 (IN UINTN Address, IN UINT16 AndData) |
UINT32 EFIAPI | MmioAnd32 (IN UINTN Address, IN UINT16 AndData) |
UINT8 EFIAPI | MmioAnd8 (IN UINTN Address, IN UINT8 AndData) |
UINT16 EFIAPI | MmioAndThenOr16 (IN UINTN Address, IN UINT16 AndData, IN UINT16 OrData) |
UINT32 EFIAPI | MmioAndThenOr32 (IN UINTN Address, IN UINT32 AndData, IN UINT32 OrData) |
UINT8 EFIAPI | MmioAndThenOr8 (IN UINTN Address, IN UINT8 AndData, IN UINT8 OrData) |
UINT16 EFIAPI | MmioBitFieldAnd16 (IN UINTN Address, IN UINTN StartBit, IN UINTN EndBit, IN UINT16 AndData) |
UINT32 EFIAPI | MmioBitFieldAnd32 (IN UINTN Address, IN UINTN StartBit, IN UINTN EndBit, IN UINT32 AndData) |
UINT8 EFIAPI | MmioBitFieldAnd8 (IN UINTN Address, IN UINTN StartBit, IN UINTN EndBit, IN UINT8 AndData) |
UINT16 EFIAPI | MmioBitFieldAndThenOr16 (IN UINTN Address, IN UINTN StartBit, IN UINTN EndBit, IN UINT16 AndData, IN UINT16 OrData) |
UINT32 EFIAPI | MmioBitFieldAndThenOr32 (IN UINTN Address, IN UINTN StartBit, IN UINTN EndBit, IN UINT32 AndData, IN UINT32 OrData) |
UINT8 EFIAPI | MmioBitFieldAndThenOr8 (IN UINTN Address, IN UINTN StartBit, IN UINTN EndBit, IN UINT8 AndData, IN UINT8 OrData) |
UINT16 EFIAPI | MmioBitFieldOr16 (IN UINTN Address, IN UINTN StartBit, IN UINTN EndBit, IN UINT16 OrData) |
UINT32 EFIAPI | MmioBitFieldOr32 (IN UINTN Address, IN UINTN StartBit, IN UINTN EndBit, IN UINT32 OrData) |
UINT8 EFIAPI | MmioBitFieldOr8 (IN UINTN Address, IN UINTN StartBit, IN UINTN EndBit, IN UINT8 OrData) |
UINT16 EFIAPI | MmioBitFieldRead16 (IN UINTN Address, IN UINTN StartBit, IN UINTN EndBit) |
UINT32 EFIAPI | MmioBitFieldRead32 (IN UINTN Address, IN UINTN StartBit, IN UINTN EndBit) |
UINT8 EFIAPI | MmioBitFieldRead8 (IN UINTN Address, IN UINTN StartBit, IN UINTN EndBit) |
UINT16 EFIAPI | MmioBitFieldWrite16 (IN UINTN Address, IN UINTN StartBit, IN UINTN EndBit, IN UINT16 Value) |
UINT32 EFIAPI | MmioBitFieldWrite32 (IN UINTN Address, IN UINTN StartBit, IN UINTN EndBit, IN UINT32 Value) |
UINT8 EFIAPI | MmioBitFieldWrite8 (IN UINTN Address, IN UINTN StartBit, IN UINTN EndBit, IN UINT8 Value) |
UINT16 EFIAPI | MmioOr16 (IN UINTN Address, IN UINT16 OrData) |
UINT32 EFIAPI | MmioOr32 (IN UINTN Address, IN UINT32 OrData) |
UINT8 EFIAPI | MmioOr8 (IN UINTN Address, IN UINT8 OrData) |
UINT16 EFIAPI | MmioRead16 (IN UINTN Address) |
UINT32 EFIAPI | MmioRead32 (IN UINTN Address) |
UINT8 EFIAPI | MmioRead8 (IN UINTN Address) |
UINT16 EFIAPI | MmioWrite16 (IN UINTN Address, IN UINT16 Value) |
UINT32 EFIAPI | MmioWrite32 (IN UINTN Address, IN UINT32 Value) |
UINT8 EFIAPI | MmioWrite8 (IN UINTN Address, IN UINT8 Value) |
VOID *EFIAPI | GetFirstGuidHob (IN CONST EFI_GUID *Guid) |
EFI_DEVICE_PATH_PROTOCOL *EFIAPI | DevicePathFromHandle (IN EFI_HANDLE Handle) |
EFI_FILE_PROTOCOL * | OcLocateRootVolume (IN EFI_HANDLE DeviceHandle OPTIONAL, IN EFI_DEVICE_PATH_PROTOCOL *FilePath OPTIONAL) |
UINTN | GetSerialRegisterBase (VOID) |
Copyright (c) 2020, PMheart. All rights reserved. SPDX-License-Identifier: BSD-3-Clause
Definition in file UserMisc.c.
UINT32 AsmCpuid | ( | IN UINT32 | Index, |
OUT UINT32 * | Eax, | ||
OPTIONAL OUT UINT32 * | Ebx, | ||
OPTIONAL OUT UINT32 * | Ecx, | ||
OPTIONAL OUT UINT32 *Edx | OPTIONAL ) |
Definition at line 45 of file UserMisc.c.
UINT32 AsmCpuidEx | ( | IN UINT32 | Index, |
IN UINT32 | SubIndex, | ||
OUT UINT32 * | Eax, | ||
OPTIONAL OUT UINT32 * | Ebx, | ||
OPTIONAL OUT UINT32 * | Ecx, | ||
OPTIONAL OUT UINT32 *Edx | OPTIONAL ) |
Definition at line 109 of file UserMisc.c.
VOID EFIAPI AsmDisableCache | ( | VOID | ) |
Definition at line 274 of file UserMisc.c.
VOID EFIAPI AsmEnableCache | ( | VOID | ) |
Definition at line 282 of file UserMisc.c.
UINT32 EFIAPI AsmIncrementUint32 | ( | IN volatile UINT32 * | Value | ) |
Atomically increment 32-bit integer. This is required to be locally implemented as we cannot use SynchronizationLib, which depends on TimerLib, and our TimerLib depends on this library.
[in] | Value | Pointer to 32-bit integer to increment. |
value | after incrementing. |
Definition at line 176 of file UserMisc.c.
UINT64 EFIAPI AsmMsrAndThenOr64 | ( | IN UINT32 | Index, |
IN UINT64 | AndData, | ||
IN UINT64 | OrData ) |
Definition at line 260 of file UserMisc.c.
UINTN EFIAPI AsmReadCr4 | ( | VOID | ) |
Definition at line 196 of file UserMisc.c.
UINT16 EFIAPI AsmReadCs | ( | VOID | ) |
Definition at line 205 of file UserMisc.c.
UINTN EFIAPI AsmReadEflags | ( | VOID | ) |
Definition at line 214 of file UserMisc.c.
UINT32 EFIAPI AsmReadIntelMicrocodeRevision | ( | VOID | ) |
Returns microcode revision for Intel CPUs.
microcode | revision. |
Definition at line 187 of file UserMisc.c.
UINT64 EFIAPI AsmReadMsr64 | ( | IN UINT32 | Index | ) |
Definition at line 223 of file UserMisc.c.
UINT64 EFIAPI AsmReadTsc | ( | VOID | ) |
Definition at line 232 of file UserMisc.c.
UINTN EFIAPI AsmWriteCr4 | ( | UINTN | Cr4 | ) |
Definition at line 241 of file UserMisc.c.
UINT64 EFIAPI AsmWriteMsr64 | ( | IN UINT32 | Index, |
IN UINT64 | Value ) |
Definition at line 250 of file UserMisc.c.
VOID EFIAPI CpuBreakpoint | ( | VOID | ) |
Definition at line 13 of file UserMisc.c.
VOID EFIAPI CpuFlushTlb | ( | VOID | ) |
Definition at line 290 of file UserMisc.c.
VOID EFIAPI CpuPause | ( | VOID | ) |
Definition at line 22 of file UserMisc.c.
EFI_DEVICE_PATH_PROTOCOL *EFIAPI DevicePathFromHandle | ( | IN EFI_HANDLE | Handle | ) |
Definition at line 680 of file UserMisc.c.
VOID EFIAPI DisableInterrupts | ( | VOID | ) |
Definition at line 30 of file UserMisc.c.
VOID EFIAPI EnableInterrupts | ( | VOID | ) |
Definition at line 38 of file UserMisc.c.
VOID *EFIAPI GetFirstGuidHob | ( | IN CONST EFI_GUID * | Guid | ) |
Definition at line 671 of file UserMisc.c.
UINTN GetSerialRegisterBase | ( | VOID | ) |
Retrieve the I/O or MMIO base address register for the PCI UART device. This function assumes Root Bus Numer is Zero, and enables I/O and MMIO in PCI UART Device if they are not already enabled.
Definition at line 697 of file UserMisc.c.
UINT32 EFIAPI IoRead32 | ( | IN UINTN | Port | ) |
Definition at line 318 of file UserMisc.c.
UINT8 EFIAPI IoRead8 | ( | IN UINTN | Port | ) |
Definition at line 298 of file UserMisc.c.
UINT32 EFIAPI IoWrite32 | ( | IN UINTN | Port, |
IN UINT32 | Value ) |
Definition at line 329 of file UserMisc.c.
UINT8 EFIAPI IoWrite8 | ( | IN UINTN | Port, |
IN UINT8 | Value ) |
Definition at line 307 of file UserMisc.c.
UINT16 EFIAPI MmioAnd16 | ( | IN UINTN | Address, |
IN UINT16 | AndData ) |
Definition at line 341 of file UserMisc.c.
UINT32 EFIAPI MmioAnd32 | ( | IN UINTN | Address, |
IN UINT16 | AndData ) |
Definition at line 351 of file UserMisc.c.
UINT8 EFIAPI MmioAnd8 | ( | IN UINTN | Address, |
IN UINT8 | AndData ) |
Definition at line 361 of file UserMisc.c.
UINT16 EFIAPI MmioAndThenOr16 | ( | IN UINTN | Address, |
IN UINT16 | AndData, | ||
IN UINT16 | OrData ) |
Definition at line 371 of file UserMisc.c.
UINT32 EFIAPI MmioAndThenOr32 | ( | IN UINTN | Address, |
IN UINT32 | AndData, | ||
IN UINT32 | OrData ) |
Definition at line 382 of file UserMisc.c.
UINT8 EFIAPI MmioAndThenOr8 | ( | IN UINTN | Address, |
IN UINT8 | AndData, | ||
IN UINT8 | OrData ) |
Definition at line 393 of file UserMisc.c.
UINT16 EFIAPI MmioBitFieldAnd16 | ( | IN UINTN | Address, |
IN UINTN | StartBit, | ||
IN UINTN | EndBit, | ||
IN UINT16 | AndData ) |
Definition at line 404 of file UserMisc.c.
UINT32 EFIAPI MmioBitFieldAnd32 | ( | IN UINTN | Address, |
IN UINTN | StartBit, | ||
IN UINTN | EndBit, | ||
IN UINT32 | AndData ) |
Definition at line 416 of file UserMisc.c.
UINT8 EFIAPI MmioBitFieldAnd8 | ( | IN UINTN | Address, |
IN UINTN | StartBit, | ||
IN UINTN | EndBit, | ||
IN UINT8 | AndData ) |
Definition at line 428 of file UserMisc.c.
UINT16 EFIAPI MmioBitFieldAndThenOr16 | ( | IN UINTN | Address, |
IN UINTN | StartBit, | ||
IN UINTN | EndBit, | ||
IN UINT16 | AndData, | ||
IN UINT16 | OrData ) |
Definition at line 440 of file UserMisc.c.
UINT32 EFIAPI MmioBitFieldAndThenOr32 | ( | IN UINTN | Address, |
IN UINTN | StartBit, | ||
IN UINTN | EndBit, | ||
IN UINT32 | AndData, | ||
IN UINT32 | OrData ) |
Definition at line 453 of file UserMisc.c.
UINT8 EFIAPI MmioBitFieldAndThenOr8 | ( | IN UINTN | Address, |
IN UINTN | StartBit, | ||
IN UINTN | EndBit, | ||
IN UINT8 | AndData, | ||
IN UINT8 | OrData ) |
Definition at line 466 of file UserMisc.c.
UINT16 EFIAPI MmioBitFieldOr16 | ( | IN UINTN | Address, |
IN UINTN | StartBit, | ||
IN UINTN | EndBit, | ||
IN UINT16 | OrData ) |
Definition at line 479 of file UserMisc.c.
UINT32 EFIAPI MmioBitFieldOr32 | ( | IN UINTN | Address, |
IN UINTN | StartBit, | ||
IN UINTN | EndBit, | ||
IN UINT32 | OrData ) |
Definition at line 491 of file UserMisc.c.
UINT8 EFIAPI MmioBitFieldOr8 | ( | IN UINTN | Address, |
IN UINTN | StartBit, | ||
IN UINTN | EndBit, | ||
IN UINT8 | OrData ) |
Definition at line 503 of file UserMisc.c.
UINT16 EFIAPI MmioBitFieldRead16 | ( | IN UINTN | Address, |
IN UINTN | StartBit, | ||
IN UINTN | EndBit ) |
Definition at line 515 of file UserMisc.c.
UINT32 EFIAPI MmioBitFieldRead32 | ( | IN UINTN | Address, |
IN UINTN | StartBit, | ||
IN UINTN | EndBit ) |
Definition at line 526 of file UserMisc.c.
UINT8 EFIAPI MmioBitFieldRead8 | ( | IN UINTN | Address, |
IN UINTN | StartBit, | ||
IN UINTN | EndBit ) |
Definition at line 537 of file UserMisc.c.
UINT16 EFIAPI MmioBitFieldWrite16 | ( | IN UINTN | Address, |
IN UINTN | StartBit, | ||
IN UINTN | EndBit, | ||
IN UINT16 | Value ) |
Definition at line 548 of file UserMisc.c.
UINT32 EFIAPI MmioBitFieldWrite32 | ( | IN UINTN | Address, |
IN UINTN | StartBit, | ||
IN UINTN | EndBit, | ||
IN UINT32 | Value ) |
Definition at line 560 of file UserMisc.c.
UINT8 EFIAPI MmioBitFieldWrite8 | ( | IN UINTN | Address, |
IN UINTN | StartBit, | ||
IN UINTN | EndBit, | ||
IN UINT8 | Value ) |
Definition at line 572 of file UserMisc.c.
UINT16 EFIAPI MmioOr16 | ( | IN UINTN | Address, |
IN UINT16 | OrData ) |
Definition at line 584 of file UserMisc.c.
UINT32 EFIAPI MmioOr32 | ( | IN UINTN | Address, |
IN UINT32 | OrData ) |
Definition at line 594 of file UserMisc.c.
UINT8 EFIAPI MmioOr8 | ( | IN UINTN | Address, |
IN UINT8 | OrData ) |
Definition at line 604 of file UserMisc.c.
UINT16 EFIAPI MmioRead16 | ( | IN UINTN | Address | ) |
Definition at line 614 of file UserMisc.c.
UINT32 EFIAPI MmioRead32 | ( | IN UINTN | Address | ) |
Definition at line 623 of file UserMisc.c.
UINT8 EFIAPI MmioRead8 | ( | IN UINTN | Address | ) |
Definition at line 632 of file UserMisc.c.
UINT16 EFIAPI MmioWrite16 | ( | IN UINTN | Address, |
IN UINT16 | Value ) |
Definition at line 641 of file UserMisc.c.
UINT32 EFIAPI MmioWrite32 | ( | IN UINTN | Address, |
IN UINT32 | Value ) |
Definition at line 651 of file UserMisc.c.
UINT8 EFIAPI MmioWrite8 | ( | IN UINTN | Address, |
IN UINT8 | Value ) |
Definition at line 661 of file UserMisc.c.
EFI_FILE_PROTOCOL * OcLocateRootVolume | ( | IN EFI_HANDLE DeviceHandle | OPTIONAL, |
IN EFI_DEVICE_PATH_PROTOCOL *FilePath | OPTIONAL ) |
Locate root volume from Device handle or path.
[in] | DeviceHandle | Device handle. |
[in] | FilePath | Device path. |
opened | file protocol or NULL. |
Definition at line 688 of file UserMisc.c.