]> git.proxmox.com Git - mirror_edk2.git/blob - MdeModulePkg/Universal/EbcDxe/EbcDebugger/EdbDisasm.h
MdeModulePkg/EbcDxe: add EBC Debugger
[mirror_edk2.git] / MdeModulePkg / Universal / EbcDxe / EbcDebugger / EdbDisasm.h
1 /*++
2
3 Copyright (c) 2007, 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 EdbDisasm.h
15
16 Abstract:
17
18
19 --*/
20
21 #ifndef _EFI_EDB_DISASM_H_
22 #define _EFI_EDB_DISASM_H_
23
24 #include <Uefi.h>
25
26 //
27 // Definition for instruction OPCODE, MODIFIER, and OPERAND
28 //
29 #define GET_OPCODE(Addr) (UINT8)((*(UINT8 *)(UINTN)(Addr)) & 0x3F)
30 #define GET_MODIFIERS(Addr) (UINT8)((*(UINT8 *)(UINTN)(Addr)) & 0xC0)
31 #define GET_OPCODE_BYTE(Addr) (UINT8)(*(UINT8 *)(UINTN)(Addr))
32 #define GET_OPERANDS(Addr) (UINT8)(*(UINT8 *)(UINTN)((Addr) + 1))
33
34 typedef
35 UINTN
36 (* EDB_DISASM_INSTRUCTION) (
37 IN EFI_PHYSICAL_ADDRESS InstructionAddress,
38 IN EFI_SYSTEM_CONTEXT SystemContext,
39 OUT CHAR16 **DisAsmString
40 );
41
42 #endif