]> git.proxmox.com Git - mirror_edk2.git/commitdiff
Add private protocol's definitions for DUET package.
authorklu2 <klu2@6f19259b-4bc3-4df7-8a09-765794883524>
Mon, 5 May 2008 08:05:14 +0000 (08:05 +0000)
committerklu2 <klu2@6f19259b-4bc3-4df7-8a09-765794883524>
Mon, 5 May 2008 08:05:14 +0000 (08:05 +0000)
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@5165 6f19259b-4bc3-4df7-8a09-765794883524

DuetPkg/Include/Protocol/LegacyBiosThunk.c [new file with mode: 0644]
DuetPkg/Include/Protocol/LegacyBiosThunk.h [new file with mode: 0644]

diff --git a/DuetPkg/Include/Protocol/LegacyBiosThunk.c b/DuetPkg/Include/Protocol/LegacyBiosThunk.c
new file mode 100644 (file)
index 0000000..a9d29dd
--- /dev/null
@@ -0,0 +1,30 @@
+/*++\r
+\r
+Copyright (c) 2006, Intel Corporation                                                         \r
+All rights reserved. This program and the accompanying materials                          \r
+are licensed and made available under the terms and conditions of the BSD License         \r
+which accompanies this distribution.  The full text of the license may be found at        \r
+http://opensource.org/licenses/bsd-license.php                                            \r
+                                                                                          \r
+THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,                     \r
+WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.             \r
+\r
+Module Name:\r
+\r
+  LegacyBiosThunk.c\r
+    \r
+Abstract:\r
+\r
+  Legacy BIOS Thunk Protocol\r
+\r
+Revision History\r
+\r
+--*/\r
+\r
+#include "Tiano.h"\r
+\r
+#include EFI_PROTOCOL_DEFINITION (LegacyBiosThunk)\r
+\r
+EFI_GUID  gEfiLegacyBiosThunkProtocolGuid = EFI_LEGACY_BIOS_THUNK_PROTOCOL_GUID;\r
+\r
+EFI_GUID_STRING(&gEfiLegacyBiosThunkProtocolGuid, "Legacy BIOS Thunk Protocol", "Legacy BIOS Thunk Protocol");\r
diff --git a/DuetPkg/Include/Protocol/LegacyBiosThunk.h b/DuetPkg/Include/Protocol/LegacyBiosThunk.h
new file mode 100644 (file)
index 0000000..fd84389
--- /dev/null
@@ -0,0 +1,119 @@
+/*++\r
+\r
+Copyright (c) 2006, Intel Corporation                                                         \r
+All rights reserved. This program and the accompanying materials                          \r
+are licensed and made available under the terms and conditions of the BSD License         \r
+which accompanies this distribution.  The full text of the license may be found at        \r
+http://opensource.org/licenses/bsd-license.php                                            \r
+                                                                                          \r
+THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,                     \r
+WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.             \r
+\r
+Module Name:\r
+\r
+  LegacyBiosThunk.h\r
+    \r
+Abstract:\r
+\r
+  The EFI Legacy BIOS Thunk Protocol is used to abstract Thunk16 call.\r
+\r
+  Note: The names for EFI_IA32_REGISTER_SET elements were picked to follow \r
+  well known naming conventions.\r
+\r
+  Thunk - A thunk is a transition from one processor mode to another. A Thunk\r
+          is a transition from native EFI mode to 16-bit mode. A reverse thunk\r
+          would be a transition from 16-bit mode to native EFI mode.\r
+\r
+\r
+  Note: Note: Note: Note: Note: Note: Note:\r
+\r
+  You most likely should not use this protocol! Find the EFI way to solve the\r
+  problem to make your code portable\r
+\r
+  Note: Note: Note: Note: Note: Note: Note:\r
+\r
+Revision History\r
+\r
+--*/\r
+\r
+#ifndef _EFI_LEGACY_BIOS_THUNK_H_\r
+#define _EFI_LEGACY_BIOS_THUNK_H_\r
+\r
+\r
+#define EFI_LEGACY_BIOS_THUNK_PROTOCOL_GUID \\r
+  { \\r
+    0x4c51a7ba, 0x7195, 0x442d, 0x87, 0x92, 0xbe, 0xea, 0x6e, 0x2f, 0xf6, 0xec \\r
+  }\r
+\r
+typedef struct _EFI_LEGACY_BIOS_THUNK_PROTOCOL EFI_LEGACY_BIOS_THUNK_PROTOCOL;\r
+\r
+typedef\r
+BOOLEAN\r
+(EFIAPI *EFI_LEGACY_BIOS_THUNK_INT86) (\r
+  IN EFI_LEGACY_BIOS_THUNK_PROTOCOL   * This,\r
+  IN  UINT8                           BiosInt,\r
+  IN OUT  EFI_IA32_REGISTER_SET       * Regs\r
+  )\r
+/*++\r
+\r
+  Routine Description:\r
+    Thunk to 16-bit real mode and execute a software interrupt with a vector \r
+    of BiosInt. Regs will contain the 16-bit register context on entry and \r
+    exit.\r
+\r
+  Arguments:\r
+    This    - Protocol instance pointer.\r
+    BiosInt - Processor interrupt vector to invoke\r
+    Reg     - Register contexted passed into (and returned) from thunk to \r
+              16-bit mode\r
+\r
+  Returns:\r
+    FALSE   - Thunk completed, and there were no BIOS errors in the target code.\r
+              See Regs for status.\r
+    TRUE    - There was a BIOS erro in the target code.\r
+\r
+--*/\r
+;\r
+\r
+typedef\r
+BOOLEAN\r
+(EFIAPI *EFI_LEGACY_BIOS_THUNK_FARCALL86) (\r
+  IN EFI_LEGACY_BIOS_THUNK_PROTOCOL   * This,\r
+  IN  UINT16                          Segment,\r
+  IN  UINT16                          Offset,\r
+  IN  EFI_IA32_REGISTER_SET           * Regs,\r
+  IN  VOID                            *Stack,\r
+  IN  UINTN                           StackSize\r
+  )\r
+/*++\r
+\r
+  Routine Description:\r
+    Thunk to 16-bit real mode and call Segment:Offset. Regs will contain the \r
+    16-bit register context on entry and exit. Arguments can be passed on \r
+    the Stack argument\r
+\r
+  Arguments:\r
+    This      - Protocol instance pointer.\r
+    Segment   - Segemnt of 16-bit mode call\r
+    Offset    - Offset of 16-bit mdoe call\r
+    Reg       - Register contexted passed into (and returned) from thunk to \r
+                16-bit mode\r
+    Stack     - Caller allocated stack used to pass arguments\r
+    StackSize - Size of Stack in bytes\r
+\r
+  Returns:\r
+    FALSE     - Thunk completed, and there were no BIOS errors in the target code.\r
+                See Regs for status.\r
+    TRUE      - There was a BIOS erro in the target code.\r
+\r
+--*/\r
+;\r
+\r
+struct _EFI_LEGACY_BIOS_THUNK_PROTOCOL {\r
+  EFI_LEGACY_BIOS_THUNK_INT86                 Int86;\r
+  EFI_LEGACY_BIOS_THUNK_FARCALL86             FarCall86;\r
+};\r
+\r
+extern EFI_GUID gEfiLegacyBiosThunkProtocolGuid;\r
+\r
+#endif\r