]> git.proxmox.com Git - mirror_edk2.git/blob - DuetPkg/Include/Protocol/LegacyBiosThunk.h
Fix duplicate symbol in this driver.
[mirror_edk2.git] / DuetPkg / Include / Protocol / LegacyBiosThunk.h
1 /*++
2
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
8
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.
11
12 Module Name:
13
14 LegacyBiosThunk.h
15
16 Abstract:
17
18 The EFI Legacy BIOS Thunk Protocol is used to abstract Thunk16 call.
19
20 Note: The names for EFI_IA32_REGISTER_SET elements were picked to follow
21 well known naming conventions.
22
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.
26
27
28 Note: Note: Note: Note: Note: Note: Note:
29
30 You most likely should not use this protocol! Find the EFI way to solve the
31 problem to make your code portable
32
33 Note: Note: Note: Note: Note: Note: Note:
34
35 Revision History
36
37 --*/
38
39 #ifndef _EFI_LEGACY_BIOS_THUNK_H_
40 #define _EFI_LEGACY_BIOS_THUNK_H_
41
42
43 #define EFI_LEGACY_BIOS_THUNK_PROTOCOL_GUID \
44 { \
45 0x4c51a7ba, 0x7195, 0x442d, 0x87, 0x92, 0xbe, 0xea, 0x6e, 0x2f, 0xf6, 0xec \
46 }
47
48 typedef struct _EFI_LEGACY_BIOS_THUNK_PROTOCOL EFI_LEGACY_BIOS_THUNK_PROTOCOL;
49
50 typedef
51 BOOLEAN
52 (EFIAPI *EFI_LEGACY_BIOS_THUNK_INT86) (
53 IN EFI_LEGACY_BIOS_THUNK_PROTOCOL * This,
54 IN UINT8 BiosInt,
55 IN OUT EFI_IA32_REGISTER_SET * Regs
56 )
57 /*++
58
59 Routine Description:
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
62 exit.
63
64 Arguments:
65 This - Protocol instance pointer.
66 BiosInt - Processor interrupt vector to invoke
67 Reg - Register contexted passed into (and returned) from thunk to
68 16-bit mode
69
70 Returns:
71 FALSE - Thunk completed, and there were no BIOS errors in the target code.
72 See Regs for status.
73 TRUE - There was a BIOS erro in the target code.
74
75 --*/
76 ;
77
78 typedef
79 BOOLEAN
80 (EFIAPI *EFI_LEGACY_BIOS_THUNK_FARCALL86) (
81 IN EFI_LEGACY_BIOS_THUNK_PROTOCOL * This,
82 IN UINT16 Segment,
83 IN UINT16 Offset,
84 IN EFI_IA32_REGISTER_SET * Regs,
85 IN VOID *Stack,
86 IN UINTN StackSize
87 )
88 /*++
89
90 Routine Description:
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
93 the Stack argument
94
95 Arguments:
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
100 16-bit mode
101 Stack - Caller allocated stack used to pass arguments
102 StackSize - Size of Stack in bytes
103
104 Returns:
105 FALSE - Thunk completed, and there were no BIOS errors in the target code.
106 See Regs for status.
107 TRUE - There was a BIOS erro in the target code.
108
109 --*/
110 ;
111
112 struct _EFI_LEGACY_BIOS_THUNK_PROTOCOL {
113 EFI_LEGACY_BIOS_THUNK_INT86 Int86;
114 EFI_LEGACY_BIOS_THUNK_FARCALL86 FarCall86;
115 };
116
117 extern EFI_GUID gEfiLegacyBiosThunkProtocolGuid;
118
119 #endif