blob: 8e27eb8b380ab3e05f48fee2f14b4195c727aa23 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
|
/******************************************************************************
*
* Copyright (c) 1995-1999 Palm Computing, Inc. or its subsidiaries.
* All rights reserved.
*
* File: M68KHwr.h
*
* Description:
* Pilot debugger remote hardware/system info
*
* History:
* 1/18/95 RM - Created by Ron Marianetti
*
*****************************************************************************/
#ifndef __M68KHWR_H
#define __M68KHWR_H
// Pilot common definitions
#include <PalmTypes.h>
/***********************************************************************
* Breakpoint words we use
***********************************************************************/
#define m68kTrapInstr 0x4E40
#define m68kTrapVectorMask 0x000F
/***********************************************************************
* 68000 Exception Vector table
***********************************************************************/
typedef struct M68KExcTableType {
UInt32 initStack; // initial stack pointer
UInt32 initPC; // initial PC
UInt32 busErr; // 08
UInt32 addressErr; // 0C
UInt32 illegalInstr; // 10
UInt32 divideByZero; // 14
UInt32 chk; // 18
UInt32 trap; // 1C
UInt32 privilege; // 20
UInt32 trace; // 24
UInt32 aTrap; // 28
UInt32 fTrap; // 2C
UInt32 reserved12; // 30
UInt32 coproc; // 34
UInt32 formatErr; // 38
UInt32 unitializedInt; // 3C
UInt32 reserved[8]; // 40-5C
UInt32 spuriousInt; // 60
UInt32 autoVec1; // 64
UInt32 autoVec2; // 68
UInt32 autoVec3; // 6C
UInt32 autoVec4; // 70
UInt32 autoVec5; // 74
UInt32 autoVec6; // 78
UInt32 autoVec7; // 7C
UInt32 trapN[16]; // 80 - BC
UInt32 unassigned[16]; // C0 - FC
} M68KExcTableType;
/**************************************************************************************
* structure for the Motorolla 68000 processor registers (variables).
*
* WARNING:
* This structure is used as the body of the 'read regs' command response
* packet. Any changes to it will require changes in the nub's code.
*
**************************************************************************************/
typedef struct M68KRegsType {
UInt32 d[8]; /* data registers */
UInt32 a[7]; /* address registers */
UInt32 usp; /* user stack pointer */
UInt32 ssp; /* supervisor stack pointer */
UInt32 pc; /* program counter */
UInt16 sr; /* status register */
} M68KRegsType;
/**************************************************************************************
* bit masks for testing M68000 status register fields
**************************************************************************************/
/* trace mode */
#define m68kSrTraceMask 0x08000
#define m68kSrTraceBit 15
/* supervisor state */
#define m68kSrSupervisorMask 0x02000
/* interrupt mask */
#define m68kSrInterruptMask 0x00700
#define m68kSrInterruptOffset 8 /* offset for right-shifting interrupt mask */
/* condition codes */
#define m68kSrExtendMask 0x00010
#define m68kSrNegativeMask 0x00008
#define m68kSrZeroMask 0x00004
#define m68kSrOverflowMask 0x00002
#define m68kSrCarryMask 0x00001
#endif //__M68KHWR_H
|