1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
1.2 +++ b/test/sh4/utlb.h Mon Jan 26 12:32:23 2009 +0000
1.5 + * $Id: utlb.c 831 2008-08-13 10:32:00Z nkeynes $
1.7 + * UTLB unit test support
1.9 + * Copyright (c) 2006 Nathan Keynes.
1.11 + * This program is free software; you can redistribute it and/or modify
1.12 + * it under the terms of the GNU General Public License as published by
1.13 + * the Free Software Foundation; either version 2 of the License, or
1.14 + * (at your option) any later version.
1.16 + * This program is distributed in the hope that it will be useful,
1.17 + * but WITHOUT ANY WARRANTY; without even the implied warranty of
1.18 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
1.19 + * GNU General Public License for more details.
1.22 +#include <../lib.h>
1.25 +#define TEST_UTLB 1
1.27 +#define TLB_VALID 0x00000100
1.28 +#define TLB_USERMODE 0x00000040
1.29 +#define TLB_WRITABLE 0x00000020
1.30 +#define TLB_USERWRITABLE (TLB_WRITABLE|TLB_USERMODE)
1.31 +#define TLB_SIZE_MASK 0x00000090
1.32 +#define TLB_SIZE_1K 0x00000000
1.33 +#define TLB_SIZE_4K 0x00000010
1.34 +#define TLB_SIZE_64K 0x00000080
1.35 +#define TLB_SIZE_1M 0x00000090
1.36 +#define TLB_CACHEABLE 0x00000008
1.37 +#define TLB_DIRTY 0x00000004
1.38 +#define TLB_SHARE 0x00000002
1.39 +#define TLB_WRITETHRU 0x00000001
1.41 +void set_tlb_enabled( int flag );
1.42 +void invalidate_tlb();
1.43 +void set_sv_enabled( int flag );
1.44 +void set_storequeue_protected( int flag );
1.45 +void set_asid( int asid );
1.46 +void load_utlb_entry( int entryNo, uint32_t vpn, uint32_t ppn, int asid, uint32_t mode );
1.48 +#define ACCESS_OK 0
1.49 +#define ACCESS_READONLY 1
1.50 +#define ACCESS_PRIVONLY 2
1.51 +#define ACCESS_USERMISS 4
1.52 +void check_utlb_access( uint32_t addr, uint32_t direct_addr, int mode );
1.54 +#endif /* !TEST_UTLB */