Search
lxdream.org :: lxdream/test/sh4/utlb.h
lxdream 0.9.1
released Jun 29
Download Now
filename test/sh4/utlb.h
changeset 976:e57a25d9eb7d
next1022:43f35b12ece7
author nkeynes
date Tue Mar 24 11:15:57 2009 +0000 (15 years ago)
permissions -rw-r--r--
last change Add preliminary implementation of the GDB remote debugging server - attaches to
either or both the SH4 and ARM
view annotate diff log raw
     1 /**
     2  * $Id: utlb.c 831 2008-08-13 10:32:00Z nkeynes $
     3  * 
     4  * UTLB unit test support
     5  *
     6  * Copyright (c) 2006 Nathan Keynes.
     7  *
     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.
    12  *
    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.
    17  */
    19 #include <../lib.h>
    21 #ifndef TEST_UTLB
    22 #define TEST_UTLB 1
    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 );
    45 #define ACCESS_OK        0
    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 */
.