2 * OpenRISC helper routines
4 * Copyright (c) 2009 Stuart Brady <stuart.brady@gmail.com>
5 * Copyright (c) 2009 Laurent Desnogues
7 * This library is free software; you can redistribute it and/or
8 * modify it under the terms of the GNU Library General Public
9 * License as published by the Free Software Foundation; either
10 * version 2 of the License, or (at your option) any later version.
12 * This library is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15 * Library General Public License for more details.
17 * You should have received a copy of the GNU Library General Public
18 * License along with this library; if not, write to the Free Software
19 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301 USA
23 #if !defined(CONFIG_USER_ONLY)
25 #define MMUSUFFIX _mmu
28 #include "softmmu_template.h"
31 #include "softmmu_template.h"
34 #include "softmmu_template.h"
37 #include "softmmu_template.h"
40 void tlb_fill(target_ulong addr
, int is_write
, int mmu_idx
, void *retaddr
)
44 target_ulong phys_addr
;
47 /* XXX: hack to restore env in all cases, even if not called from
52 /* XXX: flat mapping for the moment... */
54 prot
= PAGE_READ
| PAGE_WRITE
| PAGE_EXEC
;
55 ret
= tlb_set_page(env
, addr
& TARGET_PAGE_MASK
, phys_addr
, prot
, mmu_idx
, 1);