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_
42 #include EFI_PROTOCOL_DEFINITION (LegacyBios)
44 #define EFI_LEGACY_BIOS_THUNK_PROTOCOL_GUID \
46 0x4c51a7ba, 0x7195, 0x442d, 0x87, 0x92, 0xbe, 0xea, 0x6e, 0x2f, 0xf6, 0xec \
49 EFI_FORWARD_DECLARATION (EFI_LEGACY_BIOS_THUNK_PROTOCOL
);
53 (EFIAPI
*EFI_LEGACY_BIOS_THUNK_INT86
) (
54 IN EFI_LEGACY_BIOS_THUNK_PROTOCOL
* This
,
56 IN OUT EFI_IA32_REGISTER_SET
* Regs
61 Thunk to 16-bit real mode and execute a software interrupt with a vector
62 of BiosInt. Regs will contain the 16-bit register context on entry and
66 This - Protocol instance pointer.
67 BiosInt - Processor interrupt vector to invoke
68 Reg - Register contexted passed into (and returned) from thunk to
72 FALSE - Thunk completed, and there were no BIOS errors in the target code.
74 TRUE - There was a BIOS erro in the target code.
81 (EFIAPI
*EFI_LEGACY_BIOS_THUNK_FARCALL86
) (
82 IN EFI_LEGACY_BIOS_THUNK_PROTOCOL
* This
,
85 IN EFI_IA32_REGISTER_SET
* Regs
,
92 Thunk to 16-bit real mode and call Segment:Offset. Regs will contain the
93 16-bit register context on entry and exit. Arguments can be passed on
97 This - Protocol instance pointer.
98 Segment - Segemnt of 16-bit mode call
99 Offset - Offset of 16-bit mdoe call
100 Reg - Register contexted passed into (and returned) from thunk to
102 Stack - Caller allocated stack used to pass arguments
103 StackSize - Size of Stack in bytes
106 FALSE - Thunk completed, and there were no BIOS errors in the target code.
108 TRUE - There was a BIOS erro in the target code.
113 typedef struct _EFI_LEGACY_BIOS_THUNK_PROTOCOL
{
114 EFI_LEGACY_BIOS_THUNK_INT86 Int86
;
115 EFI_LEGACY_BIOS_THUNK_FARCALL86 FarCall86
;
116 } EFI_LEGACY_BIOS_THUNK_PROTOCOL
;
118 extern EFI_GUID gEfiLegacyBiosThunkProtocolGuid
;