tb.h
1.29 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
/*
* 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.
*
*/
/*
* tb.h
*/
#ifndef TB_H
#define TB_H
#include "checkpoint.h"
typedef struct TBEntry {
int index;
Reg reg;
unsigned int valid;
unsigned long tag;
unsigned long pfn;
unsigned int xre;
unsigned int xwe;
unsigned int asma;
unsigned int ford;
unsigned int fow;
unsigned int asn;
unsigned int gh;
} TBEntry;
struct TBState;
typedef enum TBType {TB_NONE,TB_INSTR,TB_DATA} TBType;
extern TBEntry *TBLookup(struct TBState *, TBType , Reg pfn,
Reg currentASN );
extern void TBInsert(struct TBState *, TBType, int index,
Reg pte, Reg tag, Reg asn);
extern void TBRemove(struct TBState *, TBType, int index);
extern TBEntry *TBIndex(struct TBState *, TBType, int index);
extern struct TBState *TBInit();
extern struct QCTable *TBNewMode(struct TBState *, TBType type, int newMode);
extern void TBNewASN(struct TBState *, TBType type, int oldASN);
extern char *TBPrint(struct TBState *tb, TBType type );
extern void TBCheckpoint( CptDescriptor *cptd, int cpu, struct TBState *);
#endif