ev5.h
2.2 KB
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
/*
* Copyright (C) 1998 by the Board of Trustees
* of Leland Stanford Junior University.
* Copyright (C) 1998 Digital Equipment Corporation
*
* This file is part of the SimOS distribution.
* See LICENSE file for terms of the license.
*
*/
#ifndef EV5_H
#define EV5_H
#ifndef IMPLVER_EV4_FAMILY
#define IMPLVER_EV4_FAMILY 0 /* LCA/EV4/EV45 */
#endif
#ifndef IMPLVER_EV5_FAMILY
#define IMPLVER_EV5_FAMILY 1 /* EV5/EV56 */
#endif
#ifndef IMPLVER_EV6_FAMILY
#define IMPLVER_EV6_FAMILY 2 /* EV6 */
#endif
#undef DEBUG_DELTA_MMSTAT
typedef enum {
ACCESS_KERNEL=0,
ACCESS_KERNEL_SP0,
ACCESS_KERNEL_SP1,
ACCESS_KERNEL_SP01,
ACCESS_SUPERVISOR,
ACCESS_EXECUTIVE,
ACCESS_USER,
ACCESS_PAL , /* unused for I, could use it for D (not now)*/
NUM_QC_MODES } AccessModes;
extern AlphaTrapState *allocTrapState(AlphaTrapState *oldtrapstate);
extern void freeTrapState(AlphaTrapState *trapstate);
extern AlphaTrapState *initTrapState(AlphaTrapState *newTrapState, AlphaTrapState *oldtrapstate);
extern void EV5_InitPE(AlphaState *pe, int cpuNum);
extern MMUStatus EV5_ITranslateVirtual(AlphaState *P, PA *pAddr, int trapNow);
extern MMUStatus EV5_DTranslateVirtual(AlphaState *P, VA vA, int isWrite, int trapNow, PA *pAddr);
extern Reg EV5_MoveFromPriv(AlphaState *P, int priv);
extern void EV5_MoveToPriv(AlphaState *P, int priv, Reg val);
extern int EV5_CheckForInterrupts(AlphaState *P, const char *where);
extern void EV5_PALOpcode(AlphaState *P, Reg func);
extern void EV5_HwRei(AlphaState *P);
extern MMUStatus EV5_HW_Store(AlphaState *P, uint32 instr, Reg rbv, PA*, int *size);
extern MMUStatus EV5_HW_Load (AlphaState *P, uint32 instr, Reg rbv, PA*, int *size);
extern void EV5_MiscReadClearSet(AlphaState *P, Reg *rap,int set);
extern int EV5_SetExtInterrupt(AlphaState *P, int irq);
extern void EV5_ClearExtInterrupt(AlphaState *P, int irq);
extern void EV5_UpdateQCMode(AlphaState *, int type);
extern void EV5_UpdateQCAltMode(AlphaState *, int type);
extern int EV5_ShadowRegistersUsed(AlphaState *P, VA PC);
extern void EV5_SwitchShadowRegisters(AlphaState *P, Reg newPC, Reg newICSR);
extern void EV5_Trap(AlphaState *P, int trap);
#endif