⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 tmgrem.h

📁 realview22.rar
💻 H
📖 第 1 页 / 共 3 页
字号:
/*
; ============================================================================
; TMGREM - remote interface base defines and typedefs.
;
; Library Name: <sim or remu or rclient>
;
; Module Name:  TMGREM.H
; Module Descr: Common defines and typedefs.
; Creation Date:1998
; Author:       Paul Kimelman
; CVS Info:     $Revision: 1.1 $ $Date: 2002/07/03 16:56:04 $ $Author: gevans $
;
; THIS INFORMATION IS PROPRIETARY TO
; ARM Ltd
; ----------------------------------------------------------------------
; Copyright (c) 1998-2002  ARM Ltd.
; ALL RIGHTS RESERVED;
;
; Revisions of TMGREM.H: (latest revision on top)
; #.#  Name  Date      Description
; ---  ----- --------  -----------------------------------------------------
;
; Implementation notes:
;
; GENERAL
; -------
;
;       This file contains the common defines, enums, and typedefs used
; by the simulator interface, the remote-emulation interface, and the
; remote client interface. Many of these are from standard ASPEX header
; files so this is used to concentrate to one file. This file should not
; be used by base TVS or VABS files as it will cause name collisions.
;
;       To insure integrity of common data, rclient will include this
; and the base headers, using #define to rename things so it can validate
; sizes and positions of structures on init. Likewise with the enums.
;
; -----------------------------------------------------------------------------
; Description:
; ----------------------------------------------------------------------------
;                               NOTICE
;
;       This code is proprietary and secret; the use of this source is
; restricted, and all rights are reserved.
;
;       If reading for interest, enjoy.
;
;       If maintaining, read comments carefully! There are some inter-depen-
; dencies and connectivities. Areas with particular connection are marked.
; There are some variable protocols that are not self evident: check all uses
; of variables before making big changes.
; ============================================================================
;
#
*/

#ifndef TMGREM_H
#define TMGREM_H

  /* REM_SIM is the remote services callback block. This is used
     when the simulator/emulator code wants access to the GUI. Use
     tmgserv.h to get the structure definitions. This is normally 
     only needed at all if host services are required (such as 
     sockets, WinMSGs (MSW) or select channels (UNIX), or access 
     back to the debugger (dialogs, etc)). The EE_VPID vpid arg
     should be the SIM_HANDLE returned on connect.              */
#define REM_SIM TM_SERVICES
struct REM_SIM;                 /* forward declare empty */

  /* SIMTYP is used to define type of simulator emulator that a
     SIM_ABS defines. The normal value is SIMTYP_PROCESSOR.  */
typedef enum
{
  SIMTYP_PROCESSOR,             /* normal processor */
  SIMTYP_CYCLEACC,              /* cycle accurate simulator */
  SIMTYP_COSIM,                 /* co-simulation simulator */
  SIMTYP_SYSTEM,                /* complete system simulator */
  SIMTYP_EMULATOR=32            /* not a simulator (EMUAPI) */
} SIM_TYPE;

#ifndef _TMG_BREAK              /* cannot have duplicate defines */
  /* Hardware Breakpoints (called that even with simulators) are
     used to test break conditions that cannot be handled with
     simple patching or PC testing. The first part of a HW break
     is what type of bus access is being measured - read, write,
     read|write, execute, other (such as pin states). Then, we
     we determine what part of the access is measured: address
     (and by single, range, masked-range), data (and by single,
     range, masked-range), sampled input (pins, etc). Then, we
     can determine actions: countdown (pass count), then trigger
     (enable another break), output or stop. The SIMBRK_xxx
     config flags indicate what is possible as well as the
     sim_hwbreak table.                                 */
typedef enum
{
  HWBADDR_NONE,                 /* no address */
  HWBADDR_ADDR,                 /* single address */
  HWBADDR_RANGE,                /* address range */
  HWBADDR_MASK                  /* address + mask (~0 is all) */
} HWBRK_ADDR;
#define HWBRK_ADDR UINT8
typedef enum
{
  HWBDATA_NONE,                 /* no data */
  HWBDATA_ADDR,                 /* single data value */
  HWBDATA_RANGE,                /* data range */
  HWBDATA_MASK                  /* data + mask (~0 is all) */
} HWBRK_DATA;
#define HWBRK_DATA UINT8


  /* REM_BREAK_ENTRY is the breakpoint request structure. This
     allows requests of HW-style breakpoints including specialized
     functionality such as global breaks (pins and the like) and
     cross triggering.                                          */
typedef struct _REM_BREAK_ENTRY
{
  UINT32        handle;         /* handle (to be filled on add) */
  HWBRK_ADDR    addr_valid;     /* HWBADDR_xx flags for addr */
  HWBRK_DATA    data_valid;     /* HWBDATA_xx flags for data */
  UINT16        flags;          /* HWBFLG_xx flags */
  UINT32        addr;           /* address to test (or start) */
  UINT32        page;           /* optional page of memory */
  UINT32        addr2;          /* end of range or mask */
  UINT32        data;           /* data to test */
  UINT32        data2;          /* end of range or mask */
  UINT32        count;          /* pass count start */
  UINT32        then_handle;    /* output trigger enable */
  UINT32        output;         /* output bits (HWBOUT_xxx) */
  UINT32        input;          /* input bits (HWBIN_xxx) */
  UINT32        priv;           /* private to owner */
  UINT32        priv2;
} REM_BREAK_ENTRY;

#endif                          /* !_TMG_BREAK */

  /* now define memory mapping objects for actual memory control */
#ifndef _TMG_MULTI              /* cannot have duplicate defines */
    /* we first define the ACCESS controls for read and write access */
typedef enum                    /* same as tmgmulti.h @*/
{                               /* access rights to memory */
  VMMACC_RAM,                   /* read and write */
  VMMACC_ROM,                   /* read */
  VMMACC_WOM,                   /* write */
  VMMACC_NOM,                   /* neither read nor write */
  VMMACC_AUTO,                  /* only read/write by loader, else ROM */
  VMMACC_PROMPT,                /* only read/write by loader, else ROM */
  VMMACC_FLASH,                 /* read */
  VMMACC_RESERVED=7             /* settable by VABS as needed */
} VMM_ACCESS;
#define VMM_ACCESS UINT8
#define VMM_ACCESS_BASE 0x7F    /* mask of all base accesses avail */

typedef enum                    /* same as tmgmulti.h @*/
{                               /* type of memory page as needed */
  VMMTYP_ANY,                   /* any type of memory */
  VMMTYP_PROG,                  /* program (code/text) memory */
  VMMTYP_DATA,                  /* data space memory */
  VMMTYP_IO,                    /* I/O space memory */
  VMMTYP_RESERVED               /* settable by VABS as needed */
} VMM_TYPE;
#define VMM_TYPE UINT8
#define VMM_TYPE_BASE 0x0F      /* all base pages available */
#define VMM_TYPE_ONE  0x01      /* only ANY is supported */

  /* now flags for map items - same as tmgmulti.h @*/
#define VMMFLG_READABLE 0x01    /* is readable */
#define VMMFLG_WRITABLE 0x02    /* is writable */
#define VMMFLG_SECT     0x04    /* mapped from section - can combine */
#define VMMFLG_DEFAULT  0x08    /* filled in by us as default space */
#define VMMFLG_AUTOMAP  0x10    /* added by auto-mapper */
#define VMMFLG_ACCSZ    0x0700  /* access size as 1, 2, 4 (<<8) */
  /* now attributes */
#define VMMATR_INTERN   0x02    /* internal memory (default is extern) */
#define VMMATR_SHARED   0x04    /* memory region is shared on bus */
#define VMMATR_DUALACC  0x08    /* dual access */
#define VMMATR_VOLATILE 0x10    /* reading is volatile */
#define VMMATR_DUALPORT 0x20    /* memory is dual-ported */
#define VMMATR_EXTOVER  0x40    /* overlays internal memory (for sim) */

  /* union for holding the value of a register in the register array cache.
     Registers whose size is <= sizeof(UINT32) are stored as UINT32s in the
     reg32 field.
     Registers whose size is > sizeof(UINT32) and <= 8 are stored in the
     reg64 array.
     Registers whose size is > 8 are stored in a spill_over area allocated
     at the end of the regular register cache array. The index into the
     spill_over area for the register is stored in the regular register
     array slot. In order to simplify and generically capture access to
     register array value two macros VpidSetRegEntry and VpidAccessRegEntry
     are defined which could be used in the TVS and the VABS               */
typedef union _REGVAL           /* same as tmgmulti.h @*/
{                               /* union for holding a register value */
  UINT32        index;          /* index of the spill over area for long regs */
  UINT32        reg32;          /* holds reg whose size is <= sizeof(UINT32) */
  UINT32        reg64[2];       /* holds reg whose size is <= 8 */
} REGVAL;

#define BREAK_ENTRY REM_BREAK_ENTRY
#endif                          /* !_TMG_MULTI */

typedef struct _SIM_MAP_ITEM    /* used for adding/updating/del maps */
{                               /* one per mapped region */
  VMM_ACCESS    access;         /* access rules */

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -