]> git.proxmox.com Git - mirror_edk2.git/blob - MdeModulePkg/Universal/EbcDxe/Ipf/EbcSupport.h
f6c929ba3ee579fdb0bec572e4d3fcada3d1a9c1
[mirror_edk2.git] / MdeModulePkg / Universal / EbcDxe / Ipf / EbcSupport.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 EbcSupport.h
15
16 Abstract:
17
18 Definition of EBC Support function
19
20 Revision History
21
22 --*/
23
24 #ifndef _IPF_EBC_SUPPORT_H_
25 #define _IPF_EBC_SUPPORT_H_
26
27 #define VM_STACK_SIZE (1024 * 32)
28
29 #define EBC_THUNK_SIZE 128
30 #define STACK_REMAIN_SIZE (1024 * 4)
31
32 //
33 // For code execution, thunks must be aligned on 16-byte boundary
34 //
35 #define EBC_THUNK_ALIGNMENT 16
36
37 //
38 // Opcodes for IPF instructions. We'll need to hand-create thunk code (stuffing
39 // bits) to insert a jump to the interpreter.
40 //
41 #define OPCODE_NOP (UINT64) 0x00008000000
42 #define OPCODE_BR_COND_SPTK_FEW (UINT64) 0x00100000000
43 #define OPCODE_MOV_BX_RX (UINT64) 0x00E00100000
44
45 //
46 // Opcode for MOVL instruction
47 //
48 #define MOVL_OPCODE 0x06
49
50 VOID
51 EbcAsmLLCALLEX (
52 IN UINTN CallAddr,
53 IN UINTN EbcSp
54 );
55
56 #endif