]> git.proxmox.com Git - mirror_edk2.git/blobdiff - EdkModulePkg/Universal/Ebc/Dxe/Ipf/EbcSupport.h
Make EdkModulePkg pass Intel IPF compiler with /W4 /WX switches, solving warning...
[mirror_edk2.git] / EdkModulePkg / Universal / Ebc / Dxe / Ipf / EbcSupport.h
diff --git a/EdkModulePkg/Universal/Ebc/Dxe/Ipf/EbcSupport.h b/EdkModulePkg/Universal/Ebc/Dxe/Ipf/EbcSupport.h
new file mode 100644 (file)
index 0000000..93c568e
--- /dev/null
@@ -0,0 +1,55 @@
+/*++\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
+  EbcSupport.h\r
+\r
+Abstract:\r
+\r
+  Definition of EBC Support function\r
+\r
+Revision History\r
+\r
+--*/\r
+\r
+#ifndef _IPF_EBC_SUPPORT_H_\r
+#define _IPF_EBC_SUPPORT_H_\r
+\r
+#define VM_STACK_SIZE   (1024 * 32)\r
+\r
+#define EBC_THUNK_SIZE  128\r
+\r
+//\r
+// For code execution, thunks must be aligned on 16-byte boundary\r
+//\r
+#define EBC_THUNK_ALIGNMENT 16\r
+\r
+//\r
+// Opcodes for IPF instructions. We'll need to hand-create thunk code (stuffing\r
+// bits) to insert a jump to the interpreter.\r
+//\r
+#define OPCODE_NOP              (UINT64) 0x00008000000\r
+#define OPCODE_BR_COND_SPTK_FEW (UINT64) 0x00100000000\r
+#define OPCODE_MOV_BX_RX        (UINT64) 0x00E00100000\r
+\r
+//\r
+// Opcode for MOVL instruction\r
+//\r
+#define MOVL_OPCODE 0x06\r
+\r
+VOID\r
+EbcAsmLLCALLEX (\r
+  IN UINTN    CallAddr,\r
+  IN UINTN    EbcSp\r
+  );\r
+\r
+#endif\r