aboutsummaryrefslogtreecommitdiff
path: root/target/mips/tcg/tcg-internal.h
blob: a39ff45d58f08ca67b0b85d6219aa4df7c0c150d (plain)
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
/*
 * MIPS internal definitions and helpers (TCG accelerator)
 *
 * SPDX-License-Identifier: GPL-2.0-or-later
 *
 * This work is licensed under the terms of the GNU GPL, version 2 or later.
 * See the COPYING file in the top-level directory.
 */

#ifndef MIPS_TCG_INTERNAL_H
#define MIPS_TCG_INTERNAL_H

#include "hw/core/cpu.h"
#include "cpu.h"

void mips_cpu_do_interrupt(CPUState *cpu);
bool mips_cpu_tlb_fill(CPUState *cs, vaddr address, int size,
                       MMUAccessType access_type, int mmu_idx,
                       bool probe, uintptr_t retaddr);

#if !defined(CONFIG_USER_ONLY)

void mmu_init(CPUMIPSState *env, const mips_def_t *def);

void update_pagemask(CPUMIPSState *env, target_ulong arg1, int32_t *pagemask);

void r4k_invalidate_tlb(CPUMIPSState *env, int idx, int use_extra);
uint32_t cpu_mips_get_random(CPUMIPSState *env);

hwaddr cpu_mips_translate_address(CPUMIPSState *env, target_ulong address,
                                  MMUAccessType access_type, uintptr_t retaddr);
void cpu_mips_tlb_flush(CPUMIPSState *env);

#endif /* !CONFIG_USER_ONLY */

#endif