TianoCore EDK2 master
|
Go to the source code of this file.
Data Structures | |
struct | EBC_INSTRUCTION_BUFFER |
Macros | |
#define | STACK_REMAIN_SIZE (1024 * 4) |
Functions | |
UINT64 EFIAPI | EbcLLEbcInterpret (VOID) |
UINT64 EFIAPI | EbcLLExecuteEbcImageEntryPoint (VOID) |
VOID | PushU64 (IN VM_CONTEXT *VmPtr, IN UINT64 Arg) |
UINT64 EFIAPI | EbcInterpret (IN UINTN Arg1, IN UINTN Arg2, IN UINTN Arg3, IN UINTN Arg4, IN UINTN Arg5, IN UINTN Arg6, IN UINTN Arg7, IN UINTN Arg8, IN UINTN EntryPoint, IN CONST UINTN Args9_16[]) |
UINT64 EFIAPI | ExecuteEbcImageEntryPoint (IN EFI_HANDLE ImageHandle, IN EFI_SYSTEM_TABLE *SystemTable, IN UINTN EntryPoint) |
EFI_STATUS | EbcCreateThunks (IN EFI_HANDLE ImageHandle, IN VOID *EbcEntryPoint, OUT VOID **Thunk, IN UINT32 Flags) |
VOID | EbcLLCALLEX (IN VM_CONTEXT *VmPtr, IN UINTN FuncAddr, IN UINTN NewStackPointer, IN VOID *FramePtr, IN UINT8 Size) |
Variables | |
CONST EBC_INSTRUCTION_BUFFER | mEbcInstructionBufferTemplate |
This module contains EBC support routines that are customized based on the target AArch64 processor.
Copyright (c) 2016, Linaro, Ltd. All rights reserved.
Copyright (c) 2015, The Linux Foundation. All rights reserved.
Copyright (c) 2006 - 2014, Intel Corporation. All rights reserved.
SPDX-License-Identifier: BSD-2-Clause-Patent
Definition in file EbcSupport.c.
#define STACK_REMAIN_SIZE (1024 * 4) |
Definition at line 20 of file EbcSupport.c.
EFI_STATUS EbcCreateThunks | ( | IN EFI_HANDLE | ImageHandle, |
IN VOID * | EbcEntryPoint, | ||
OUT VOID ** | Thunk, | ||
IN UINT32 | Flags | ||
) |
Create thunks for an EBC image entry point, or an EBC protocol service.
ImageHandle | Image handle for the EBC image. If not null, then we're creating a thunk for an image entry point. |
EbcEntryPoint | Address of the EBC code that the thunk is to call |
Thunk | Returned thunk we create here |
Flags | Flags indicating options for creating the thunk |
EFI_SUCCESS | The thunk was created successfully. |
EFI_INVALID_PARAMETER | The parameter of EbcEntryPoint is not 16-bit aligned. |
EFI_OUT_OF_RESOURCES | There is not enough memory to created the EBC Thunk. |
EFI_BUFFER_TOO_SMALL | EBC_THUNK_SIZE is not larger enough. |
Definition at line 362 of file EbcSupport.c.
UINT64 EFIAPI EbcInterpret | ( | IN UINTN | Arg1, |
IN UINTN | Arg2, | ||
IN UINTN | Arg3, | ||
IN UINTN | Arg4, | ||
IN UINTN | Arg5, | ||
IN UINTN | Arg6, | ||
IN UINTN | Arg7, | ||
IN UINTN | Arg8, | ||
IN UINTN | EntryPoint, | ||
IN CONST UINTN | Args9_16[] | ||
) |
Begin executing an EBC image.
This is a thunk function.
Arg1 | The 1st argument. |
Arg2 | The 2nd argument. |
Arg3 | The 3rd argument. |
Arg4 | The 4th argument. |
Arg5 | The 5th argument. |
Arg6 | The 6th argument. |
Arg7 | The 7th argument. |
Arg8 | The 8th argument. |
EntryPoint | The entrypoint of EBC code. |
Args9_16[] | Array containing arguments #9 to #16. |
Definition at line 102 of file EbcSupport.c.
VOID EbcLLCALLEX | ( | IN VM_CONTEXT * | VmPtr, |
IN UINTN | FuncAddr, | ||
IN UINTN | NewStackPointer, | ||
IN VOID * | FramePtr, | ||
IN UINT8 | Size | ||
) |
This function is called to execute an EBC CALLEX instruction. The function check the callee's content to see whether it is common native code or a thunk to another piece of EBC code. If the callee is common native code, use EbcLLCAllEXASM to manipulate, otherwise, set the VM->IP to target EBC code directly to avoid another VM be startup which cost time and stack space.
VmPtr | Pointer to a VM context. |
FuncAddr | Callee's address |
NewStackPointer | New stack pointer after the call |
FramePtr | New frame pointer after the call |
Size | The size of call instruction |
Definition at line 436 of file EbcSupport.c.
UINT64 EFIAPI EbcLLEbcInterpret | ( | VOID | ) |
Begin executing an EBC image. This is used for Ebc Thunk call.
UINT64 EFIAPI EbcLLExecuteEbcImageEntryPoint | ( | VOID | ) |
Begin executing an EBC image. This is used for Ebc image entrypoint.
UINT64 EFIAPI ExecuteEbcImageEntryPoint | ( | IN EFI_HANDLE | ImageHandle, |
IN EFI_SYSTEM_TABLE * | SystemTable, | ||
IN UINTN | EntryPoint | ||
) |
Begin executing an EBC image.
ImageHandle | image handle for the EBC application we're executing |
SystemTable | standard system table passed into an driver's entry point |
EntryPoint | The entrypoint of EBC code. |
Definition at line 246 of file EbcSupport.c.
VOID PushU64 | ( | IN VM_CONTEXT * | VmPtr, |
IN UINT64 | Arg | ||
) |
Pushes a 64 bit unsigned value to the VM stack.
VmPtr | The pointer to current VM context. |
Arg | The value to be pushed. |
Definition at line 67 of file EbcSupport.c.