tc_coherence.h
1.23 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
/*
* Copyright (C) 1996-1998 by the Board of Trustees
* of Leland Stanford Junior University.
*
* This file is part of the SimOS distribution.
* See LICENSE file for terms of the license.
*
*/
/***
NAME
icache_coherence
PURPOSE
This maintains a bitmap so we can detect when chunks (pages or
lines are obvious candidates) that have
code executed off of them are written to. Eventually we may have
cacheflush system calls routed here.
When a write is detected, all translation state is flushed.
NOTES
***/
#ifndef TC_COHERENCE_H
#define TC_COHERENCE_H
#if 0
/* #define CODE 4*/
/*#define DATA 7*/
typedef enum { ICHECK_FULL = 19,
ICHECK_MOST = 17,
ICHECK_SOME = 13,
ICHECK_NONE = 11 } Icheck_t;
extern Icheck_t ICheckLevel;
/* One bit for each line of physical memory */
/* Both MP and MP_IN_UP lay out consecutive cpus consecutively */
#endif
extern void TCcoherence_init(MA startAddr);
extern void TCcoherence_flush(void);
extern void TCcoherence_mark_code( MA start, MA finish );
/* 0 - return normally, 1 - return via set_pc... */
extern int TCcoherence_check( MA start, MA finish );
extern int TCcoherence_is_code(MA pAddr );
#endif /* TC_COHERENCE */