3 Copyright (c) 2006, Intel Corporation
4 All rights reserved. This program and the accompanying materials
5 are licensed and made available under the terms and conditions of the BSD License
6 which accompanies this distribution. The full text of the license may be found at
7 http://opensource.org/licenses/bsd-license.php
9 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
10 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
18 The EFI Legacy BIOS Thunk Protocol is used to abstract Thunk16 call.
20 Note: The names for EFI_IA32_REGISTER_SET elements were picked to follow
21 well known naming conventions.
23 Thunk - A thunk is a transition from one processor mode to another. A Thunk
24 is a transition from native EFI mode to 16-bit mode. A reverse thunk
25 would be a transition from 16-bit mode to native EFI mode.
28 Note: Note: Note: Note: Note: Note: Note:
30 You most likely should not use this protocol! Find the EFI way to solve the
31 problem to make your code portable
33 Note: Note: Note: Note: Note: Note: Note:
39 #ifndef _EFI_LEGACY_BIOS_THUNK_H_
40 #define _EFI_LEGACY_BIOS_THUNK_H_
43 #define EFI_LEGACY_BIOS_THUNK_PROTOCOL_GUID \
45 0x4c51a7ba, 0x7195, 0x442d, 0x87, 0x92, 0xbe, 0xea, 0x6e, 0x2f, 0xf6, 0xec \
48 typedef struct _EFI_LEGACY_BIOS_THUNK_PROTOCOL EFI_LEGACY_BIOS_THUNK_PROTOCOL
;
52 (EFIAPI
*EFI_LEGACY_BIOS_THUNK_INT86
) (
53 IN EFI_LEGACY_BIOS_THUNK_PROTOCOL
* This
,
55 IN OUT EFI_IA32_REGISTER_SET
* Regs
60 Thunk to 16-bit real mode and execute a software interrupt with a vector
61 of BiosInt. Regs will contain the 16-bit register context on entry and
65 This - Protocol instance pointer.
66 BiosInt - Processor interrupt vector to invoke
67 Reg - Register contexted passed into (and returned) from thunk to
71 FALSE - Thunk completed, and there were no BIOS errors in the target code.
73 TRUE - There was a BIOS erro in the target code.
80 (EFIAPI
*EFI_LEGACY_BIOS_THUNK_FARCALL86
) (
81 IN EFI_LEGACY_BIOS_THUNK_PROTOCOL
* This
,
84 IN EFI_IA32_REGISTER_SET
* Regs
,
91 Thunk to 16-bit real mode and call Segment:Offset. Regs will contain the
92 16-bit register context on entry and exit. Arguments can be passed on
96 This - Protocol instance pointer.
97 Segment - Segemnt of 16-bit mode call
98 Offset - Offset of 16-bit mdoe call
99 Reg - Register contexted passed into (and returned) from thunk to
101 Stack - Caller allocated stack used to pass arguments
102 StackSize - Size of Stack in bytes
105 FALSE - Thunk completed, and there were no BIOS errors in the target code.
107 TRUE - There was a BIOS erro in the target code.
112 struct _EFI_LEGACY_BIOS_THUNK_PROTOCOL
{
113 EFI_LEGACY_BIOS_THUNK_INT86 Int86
;
114 EFI_LEGACY_BIOS_THUNK_FARCALL86 FarCall86
;
117 extern EFI_GUID gEfiLegacyBiosThunkProtocolGuid
;