OpenCore
1.0.4
OpenCore Bootloader
|
#include <Protocol/Legacy8259.h>
Go to the source code of this file.
Macros | |
#define | LEGACY_REGION_BASE 0x0C0000 |
#define | LEGACY_REGION_SIZE 0x10000 |
#define | EFI_SEGMENT(_Adr) |
#define | EFI_OFFSET(_Adr) |
Functions | |
EFI_STATUS | OcLegacyThunkInitializeBiosIntCaller (IN OUT THUNK_CONTEXT *ThunkContext) |
EFI_STATUS | OcLegacyThunkInitializeInterruptRedirection (IN EFI_LEGACY_8259_PROTOCOL *Legacy8259) |
VOID | OcLegacyThunkDisconnectEfiGraphics (VOID) |
BOOLEAN EFIAPI | OcLegacyThunkBiosInt86 (IN THUNK_CONTEXT *ThunkContext, IN EFI_LEGACY_8259_PROTOCOL *Legacy8259, IN UINT8 BiosInt, IN IA32_REGISTER_SET *Regs) |
BOOLEAN EFIAPI | OcLegacyThunkFarCall86 (IN THUNK_CONTEXT *ThunkContext, IN EFI_LEGACY_8259_PROTOCOL *Legacy8259, IN UINT16 Segment, IN UINT16 Offset, IN IA32_REGISTER_SET *Regs, IN VOID *Stack, IN UINTN StackSize) |
This library implements thunking to legacy 16-bit environment.
Copyright (c) 2023, Goldfish64. All rights reserved.
Copyright (c) 2006 - 2007, Intel Corporation. All rights reserved.
SPDX-License-Identifier: BSD-2-Clause
Definition in file OcLegacyThunkLib.h.
#define EFI_OFFSET | ( | _Adr | ) |
Definition at line 21 of file OcLegacyThunkLib.h.
#define EFI_SEGMENT | ( | _Adr | ) |
Definition at line 20 of file OcLegacyThunkLib.h.
#define LEGACY_REGION_BASE 0x0C0000 |
Definition at line 17 of file OcLegacyThunkLib.h.
#define LEGACY_REGION_SIZE 0x10000 |
Definition at line 18 of file OcLegacyThunkLib.h.
BOOLEAN EFIAPI OcLegacyThunkBiosInt86 | ( | IN THUNK_CONTEXT * | ThunkContext, |
IN EFI_LEGACY_8259_PROTOCOL * | Legacy8259, | ||
IN UINT8 | BiosInt, | ||
IN IA32_REGISTER_SET * | Regs ) |
Thunk to 16-bit real mode and execute a software interrupt with a vector of BiosInt. Regs will contain the 16-bit register context on entry and exit.
ThunkContext | The instance pointer of THUNK_CONTEXT. |
Legacy8259 | Instance pointer for EFI_LEGACY_8259_PROTOCOL. |
BiosInt | Processor interrupt vector to invoke |
Reg | Register contexted passed into (and returned) from thunk to 16-bit mode |
TRUE | Thunk completed, and there were no BIOS errors in the target code. See Regs for status. |
FALSE | There was a BIOS error in the target code. |
Definition at line 241 of file OcLegacyThunkLib.c.
VOID OcLegacyThunkDisconnectEfiGraphics | ( | VOID | ) |
Disconnect all EFI graphics device handles in preparation for calling to legacy mode.
Definition at line 168 of file OcLegacyThunkLib.c.
BOOLEAN EFIAPI OcLegacyThunkFarCall86 | ( | IN THUNK_CONTEXT * | ThunkContext, |
IN EFI_LEGACY_8259_PROTOCOL * | Legacy8259, | ||
IN UINT16 | Segment, | ||
IN UINT16 | Offset, | ||
IN IA32_REGISTER_SET * | Regs, | ||
IN VOID * | Stack, | ||
IN UINTN | StackSize ) |
Definition at line 328 of file OcLegacyThunkLib.c.
EFI_STATUS OcLegacyThunkInitializeBiosIntCaller | ( | IN OUT THUNK_CONTEXT * | ThunkContext | ) |
Initialize legacy environment for BIOS INI caller.
ThunkContext | The instance pointer of THUNK_CONTEXT. |
EFI_STATUS OcLegacyThunkInitializeInterruptRedirection | ( | IN EFI_LEGACY_8259_PROTOCOL * | Legacy8259 | ) |
Initialize interrupt redirection code and entries, because IDT Vectors 0x68-0x6f must be redirected to IDT Vectors 0x08-0x0f. Or the interrupt will lost when we do thunk. NOTE: We do not reset 8259 vector base, because it will cause pending interrupt lost.
Legacy8259 | Instance pointer for EFI_LEGACY_8259_PROTOCOL. |
Definition at line 105 of file OcLegacyThunkLib.c.