]> git.proxmox.com Git - mirror_edk2.git/blob - MdeModulePkg/Universal/EbcDxe/EbcDebugger/EdbDisasm.h
MdeModulePkg: Replace BSD License with BSD+Patent License
[mirror_edk2.git] / MdeModulePkg / Universal / EbcDxe / EbcDebugger / EdbDisasm.h
1 /** @file
2
3 Copyright (c) 2007, Intel Corporation. All rights reserved.<BR>
4 SPDX-License-Identifier: BSD-2-Clause-Patent
5
6
7 **/
8
9 #ifndef _EFI_EDB_DISASM_H_
10 #define _EFI_EDB_DISASM_H_
11
12 #include <Uefi.h>
13
14 //
15 // Definition for instruction OPCODE, MODIFIER, and OPERAND
16 //
17 #define GET_OPCODE(Addr) (UINT8)((*(UINT8 *)(UINTN)(Addr)) & 0x3F)
18 #define GET_MODIFIERS(Addr) (UINT8)((*(UINT8 *)(UINTN)(Addr)) & 0xC0)
19 #define GET_OPCODE_BYTE(Addr) (UINT8)(*(UINT8 *)(UINTN)(Addr))
20 #define GET_OPERANDS(Addr) (UINT8)(*(UINT8 *)(UINTN)((Addr) + 1))
21
22 typedef
23 UINTN
24 (* EDB_DISASM_INSTRUCTION) (
25 IN EFI_PHYSICAL_ADDRESS InstructionAddress,
26 IN EFI_SYSTEM_CONTEXT SystemContext,
27 OUT CHAR16 **DisAsmString
28 );
29
30 #endif