]> git.proxmox.com Git - mirror_edk2.git/blame - EdkCompatibilityPkg/Foundation/Protocol/LegacyBiosThunk/LegacyBiosThunk.h
Update the copyright notice format
[mirror_edk2.git] / EdkCompatibilityPkg / Foundation / Protocol / LegacyBiosThunk / LegacyBiosThunk.h
CommitLineData
3eb9473e 1/*++\r
2\r
f57387d5
HT
3Copyright (c) 2006, Intel Corporation. All rights reserved.<BR>\r
4This program and the accompanying materials \r
3eb9473e 5are licensed and made available under the terms and conditions of the BSD License \r
6which accompanies this distribution. The full text of the license may be found at \r
7http://opensource.org/licenses/bsd-license.php \r
8 \r
9THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, \r
10WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. \r
11\r
12Module Name:\r
13\r
14 LegacyBiosThunk.h\r
15 \r
16Abstract:\r
17\r
18 The EFI Legacy BIOS Thunk Protocol is used to abstract Thunk16 call.\r
19\r
20 Note: The names for EFI_IA32_REGISTER_SET elements were picked to follow \r
21 well known naming conventions.\r
22\r
23 Thunk - A thunk is a transition from one processor mode to another. A Thunk\r
24 is a transition from native EFI mode to 16-bit mode. A reverse thunk\r
25 would be a transition from 16-bit mode to native EFI mode.\r
26\r
27\r
28 Note: Note: Note: Note: Note: Note: Note:\r
29\r
30 You most likely should not use this protocol! Find the EFI way to solve the\r
31 problem to make your code portable\r
32\r
33 Note: Note: Note: Note: Note: Note: Note:\r
34\r
35Revision History\r
36\r
37--*/\r
38\r
39#ifndef _EFI_LEGACY_BIOS_THUNK_H_\r
40#define _EFI_LEGACY_BIOS_THUNK_H_\r
41\r
42#include EFI_PROTOCOL_DEFINITION (LegacyBios)\r
43\r
44#define EFI_LEGACY_BIOS_THUNK_PROTOCOL_GUID \\r
45 { \\r
7ccf38a3 46 0x4c51a7ba, 0x7195, 0x442d, {0x87, 0x92, 0xbe, 0xea, 0x6e, 0x2f, 0xf6, 0xec} \\r
3eb9473e 47 }\r
48\r
49EFI_FORWARD_DECLARATION (EFI_LEGACY_BIOS_THUNK_PROTOCOL);\r
50\r
51typedef\r
52BOOLEAN\r
53(EFIAPI *EFI_LEGACY_BIOS_THUNK_INT86) (\r
54 IN EFI_LEGACY_BIOS_THUNK_PROTOCOL * This,\r
55 IN UINT8 BiosInt,\r
56 IN OUT EFI_IA32_REGISTER_SET * Regs\r
57 )\r
58/*++\r
59\r
60 Routine Description:\r
61 Thunk to 16-bit real mode and execute a software interrupt with a vector \r
62 of BiosInt. Regs will contain the 16-bit register context on entry and \r
63 exit.\r
64\r
65 Arguments:\r
66 This - Protocol instance pointer.\r
67 BiosInt - Processor interrupt vector to invoke\r
68 Reg - Register contexted passed into (and returned) from thunk to \r
69 16-bit mode\r
70\r
71 Returns:\r
72 FALSE - Thunk completed, and there were no BIOS errors in the target code.\r
73 See Regs for status.\r
74 TRUE - There was a BIOS erro in the target code.\r
75\r
76--*/\r
77;\r
78\r
79typedef\r
80BOOLEAN\r
81(EFIAPI *EFI_LEGACY_BIOS_THUNK_FARCALL86) (\r
82 IN EFI_LEGACY_BIOS_THUNK_PROTOCOL * This,\r
83 IN UINT16 Segment,\r
84 IN UINT16 Offset,\r
85 IN EFI_IA32_REGISTER_SET * Regs,\r
86 IN VOID *Stack,\r
87 IN UINTN StackSize\r
88 )\r
89/*++\r
90\r
91 Routine Description:\r
92 Thunk to 16-bit real mode and call Segment:Offset. Regs will contain the \r
93 16-bit register context on entry and exit. Arguments can be passed on \r
94 the Stack argument\r
95\r
96 Arguments:\r
97 This - Protocol instance pointer.\r
98 Segment - Segemnt of 16-bit mode call\r
99 Offset - Offset of 16-bit mdoe call\r
100 Reg - Register contexted passed into (and returned) from thunk to \r
101 16-bit mode\r
102 Stack - Caller allocated stack used to pass arguments\r
103 StackSize - Size of Stack in bytes\r
104\r
105 Returns:\r
106 FALSE - Thunk completed, and there were no BIOS errors in the target code.\r
107 See Regs for status.\r
108 TRUE - There was a BIOS erro in the target code.\r
109\r
110--*/\r
111;\r
112\r
9c092841 113struct _EFI_LEGACY_BIOS_THUNK_PROTOCOL {\r
3eb9473e 114 EFI_LEGACY_BIOS_THUNK_INT86 Int86;\r
115 EFI_LEGACY_BIOS_THUNK_FARCALL86 FarCall86;\r
9c092841 116};\r
3eb9473e 117\r
118extern EFI_GUID gEfiLegacyBiosThunkProtocolGuid;\r
119\r
120#endif\r