tlb.h
1.24 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
#ifndef __TLB_H__
#define __TLB_H__
#ident "IP22diags/tlb/tlb.h: $Revision: 1.1.1.1 $"
#include "uif.h"
#define PAGESIZE (1 << TLBHI_VPNSHIFT)
/*
* Primitive TLB operations: get and set key/value, lookup, and invalidate.
* unsigned int index;
* unsigned int pid, vpn;
* unsigned int key;
* unsigned int value;
* NB: tlbmatch() returns -1 if the key formed from pid and vpn isn't found.
*/
unsigned int get_tlbhi(/* index */);
unsigned int get_tlblo0(/* index */);
unsigned int get_tlblo1(/* index */);
void tlbwired(/* index, tlbpid, vaddr, pte, pte2 */);
int probe_tlb(/* vpn, pid */);
void invaltlb(/* index */);
void tlbpurge(/* void */);
/*
* Test functions. They share a common interface consisting of the following
* arguments (some are unused by certain tests) and a return value
* which signals success (0) or failure (!0).
* unsigned int pt[NTLBENTRIES]; // test page table
* unsigned int *uncachedp; // K1seg ptr to mapped mem
* unsigned int *cachedp; // K0seg ptr to mapped mem
*/
int tlbglobal(/* pt */);
int tlbmod(/* pt */);
int tlbnocache(/* pt, uncachedp, cachedp */);
int tlbvalid(/* pt */);
int tlbmem(/* pt */);
int tlbprobe(/* pt */);
int tlbpid(/* pt */);
int tlbtranslate(/* pt, uncachedp */);
#endif /* __TLB_H__ */