4 * UTLB unit test support
6 * Copyright (c) 2006 Nathan Keynes.
8 * This program is free software; you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License as published by
10 * the Free Software Foundation; either version 2 of the License, or
11 * (at your option) any later version.
13 * This program is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 * GNU General Public License for more details.
24 #define TLB_VALID 0x00000100
25 #define TLB_USERMODE 0x00000040
26 #define TLB_WRITABLE 0x00000020
27 #define TLB_USERWRITABLE (TLB_WRITABLE|TLB_USERMODE)
28 #define TLB_SIZE_MASK 0x00000090
29 #define TLB_SIZE_1K 0x00000000
30 #define TLB_SIZE_4K 0x00000010
31 #define TLB_SIZE_64K 0x00000080
32 #define TLB_SIZE_1M 0x00000090
33 #define TLB_CACHEABLE 0x00000008
34 #define TLB_DIRTY 0x00000004
35 #define TLB_SHARE 0x00000002
36 #define TLB_WRITETHRU 0x00000001
38 void set_tlb_enabled( int flag );
39 void invalidate_tlb();
40 void set_sv_enabled( int flag );
41 void set_storequeue_protected( int flag );
42 void set_asid( int asid );
43 void load_utlb_entry( int entryNo, uint32_t vpn, uint32_t ppn, int asid, uint32_t mode );
46 #define ACCESS_READONLY 1
47 #define ACCESS_PRIVONLY 2
48 #define ACCESS_USERMISS 4
49 void check_utlb_access( uint32_t addr, uint32_t direct_addr, int mode );
51 #endif /* !TEST_UTLB */
.