📄 rdi_armul.h
字号:
/*
* ARM RDI - RDIInfo codes: rdi_armul.h
* Copyright (C) 1994-1999 Advanced RISC Machines Ltd.
* Copyright (C) 2000 - 2001 ARM Limited. All rights reserved.
*/
/*
* RCS $Revision: 1.13.2.10.18.7 $
* Checkin $Date: 2004/12/03 10:51:38 $
* Revising $Author: ljameson $
*/
#ifndef rdi_armul__h
#define rdi_armul__h
#ifndef rdi_info_h
# include "rdi_info.h" /* for ARMulInfo_Base */
#endif
#if defined(__cplusplus) && !defined(CLX_CPP_LINKAGE)
extern "C" {
#endif
#define ARMulInfo_Base RDIInfo_Reserved_ARMulateSubAgents_FirstInfo
/*
* Function: RDIInfo_DescribeCallback
* Purpose: Tell a debugger about one or more callbacks.
*
* Handle: Module
*
* Params:
* In: *((RDI_EventType *)arg1): Identifies the set of
* events for which the callback applies.
* If arg1==NULL then list all the callbacks.
* Out: *((RDI_CallbackDesc *)arg2): Description of the
* callback.
*
* Returns: RDIError_NoError:
* RDIError_UnimplementedMessage: Module doesn't describe
* callbacks.
* RDIError_UnimplementedType: Module doesn't describe
* this callback.
*/
#define RDIInfo_DescribeCallback (ARMulInfo_Base+0)
/*
* Function: RDIInfo_RegisterCallback
* Purpose: Give a callback (method-pointer) to a module to be
* called when an event occurs.
*
* Handle: Module
*
* Params:
* In: *((RDI_EventType *)arg1): Identifies the set of
* events for which the callback applies.
* In: *((RDI_CallbackDesc *)arg2): Description of the
* callback to be registered.
*
* Returns: RDIError_NoError: Callback accepted
* RDIError_UnimplementedMessage: Callback not accepted
*
* Post-conditions: If the callback was (successfully) registered, it has
* been added to a list of callbacks for that class of event.
* Note that there is no provision for chained callbacks.
*/
#define RDIInfo_RegisterCallback (ARMulInfo_Base+1)
#define RDIInfo_DeregisterCallback (ARMulInfo_Base+2) /* 0x0762 */
#define RDIInfo_QueryCallback (ARMulInfo_Base+3) /* 0x0763 */
/*
* Function: RDIInfo_QueryBus
* Purpose: Return a pointer to an ARMul_Bus structure, on which
* a peripheral can register it's access-range(s).
*
* Handle: Module
*
* Params:
* In: (char *)arg1: String which identifies the set of
* events for which the callback applies.
* Out: *(ARMul_Bus**)arg2): Pointer to the ARMul_Bus.
*
* Returns: RDIError_NoError: Callback accepted
* RDIError_UnimplementedMessage: Callback not accepted
*/
#define RDIInfo_QueryBus (ARMulInfo_Base+4) /* 0x0764 */
/*
* Purpose: Return a pointer to an ARMul_MemInterface structure.
* Handle: Module
*
* Params:
* In: *arg1: ID of the memory-interface, as defined in
* armulif/armul_callbackid.h
* Out: *(ARMul_MemInterface**)arg2): Pointer to the interface.
*
* Returns: RDIError_NoError: Interface exists.
* RDIError_UnimplementedMessage: No such interface.
*/
#define RDIInfo_QueryMemInterface (ARMulInfo_Base+5) /* 0x0765 */
/* ]]] End of UNDER-CONSTRUCTION */
/*
* Function: RDIInfo_RaiseEvent
* Purpose: A peripheral can raise (any) event. It will be
* propagated to those components that have registered
* with the ARMulCallbackID_EventHandler Callback.
*
* Pre-conditions: None
*
* Params:
* In: handle - Handle of the processor MODULE that the
* peripheral is attached to
* reason - RDIInfo_RaiseEvent
* arg1 - (struct ARMul_Event *)
* arg2 - NULL
*
* Returns: RDIError_NoError: Event raised
* RDIError_UnimplementedMessage: The module cannot raise
* events (should not happen!)
*
* Post-conditions:
*
* Note: the pointer in arg1 has to be something of the same size as
* struct ARMul_Event -- the code in ARMulator (rather perversely)
* copies it, truncating any extra data you might want to stuff in
* it. (Grrr!) */
typedef struct ARMul_Event
{
unsigned event;
uint32 data1;
uint32 data2;
} ARMul_Event;
#define RDIInfo_RaiseEvent (ARMulInfo_Base+6) /*0x0766 */
/*
* List of predefined events (ARMul_Event.event)
* NB Events are classified by bits 16..20, which define
* a number from 0x00 to 0x1f.
* Event-listeners are registered with a bit-mask of classes of
* events which they care about, so an event-mask of 3 means
* CoreEvents + MMUEvents.
*x
* In order to minimise the total cost of these events, we aim to
* split them into classes such that most classes either
* (a) normally have no event-handlers registered, or
* (b) describe events which are very rare (but may often have many listeners).
*
*/
/* Core events - these happen fairly often, but not every instruction.
* In a normal (untraced) system, there should be no listener to these.
* (Coprocessors which need to know if the core is in a privileged mode
* ask the core, on the assumption that such coprocessor-accesses are rarer
* than these events.)
*/
#define CoreEvent 0x00000
#define CoreEventSel (1 << (CoreEvent >> 16))
/* Sent by cycle-callable core models. Usage uncertain. */
#define CoreEvent_Reset 0x00001
/* Sent when core responds to IRQ, FIQ etc. */
#define CoreEvent_UndefinedInstr 0x00002
#define CoreEvent_SWI 0x00003
#define CoreEvent_PrefetchAbort 0x00004
#define CoreEvent_DataAbort 0x00005
#define CoreEvent_AddrExceptn 0x00006
#define CoreEvent_IRQ 0x00007
#define CoreEvent_FIQ 0x00008
#define CoreEvent_Breakpoint 0x00009 /* processor hit a breakpoint */
#define CoreEvent_Watchpoint 0x0000a /* processor accessed a watchpoint */
/* These are now deprecated: Use SignalEvent's instead */
#if 1
# define CoreEvent_IRQSpotted 0x00017 /* Before masking with "IF" flags */
# define CoreEvent_FIQSpotted 0x00018 /* to see if it will be taken */
#endif
#define CoreEvent_JavaException 0x00018
#define CoreEvent_ModeChange 0x00019
/* Events defined by MMUlator:
* These are fairly frequent, and will cause slight slowdown.
* !Todo: Later, make clients look these up in the EventNumbers toolconf!
*/
#define MMUEvent 0x10000
#define MMUEventSel (1 << (MMUEvent >> 16))
#define MMUEvent_DLineFetch 0x10001 /* or I line fetch in mixed cache */
#define MMUEvent_ILineFetch 0x10002
#define MMUEvent_WBStall 0x10003
#define MMUEvent_DTLBWalk 0x10004 /* or I TLB walk in mixed cache */
#define MMUEvent_ITLBWalk 0x10005
#define MMUEvent_LineWB 0x10006 /* i.e. replacing a dirty line */
#define MMUEvent_DCacheStall 0x10007 /* line fetch had to stall core */
#define MMUEvent_ICacheStall 0x10008
#define MMUEvent_WaitForInt 0x10009 /* Enter low power mode and Wait For Interrupt */
#define MMUEvent_CR7Write 0x1000A
/* This class of events, like the trace events, is very common,
* so any listener registered will cause a noticable slowdown. */
#define PipeEvent 0x20000
#define PipeEventSel (1 << (PUEvent >> 16))
/* Events from the ARM8 Prefetch Unit */
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -