From c05c73b0838fc1b3fea87bc0ffa7b80b0556a2cb Mon Sep 17 00:00:00 2001 From: Laurent Vivier Date: Thu, 18 Jan 2018 20:38:42 +0100 Subject: target/m68k: add Transparent Translation Add ittr0, ittr1, dttr0, dttr1 and manage Transparent Translations Signed-off-by: Laurent Vivier Reviewed-by: Richard Henderson Message-Id: <20180118193846.24953-4-laurent@vivier.eu> --- target/m68k/cpu.h | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) (limited to 'target/m68k/cpu.h') diff --git a/target/m68k/cpu.h b/target/m68k/cpu.h index 38a74476ee..1c2bbac56d 100644 --- a/target/m68k/cpu.h +++ b/target/m68k/cpu.h @@ -76,6 +76,14 @@ #define EXCP_RTE 0x100 #define EXCP_HALT_INSN 0x101 +#define M68K_DTTR0 0 +#define M68K_DTTR1 1 +#define M68K_ITTR0 2 +#define M68K_ITTR1 3 + +#define M68K_MAX_TTR 2 +#define TTR(type, index) ttr[((type & ACCESS_CODE) == ACCESS_CODE) * 2 + index] + #define NB_MMU_MODES 2 #define TARGET_INSN_START_EXTRA_WORDS 1 @@ -122,6 +130,7 @@ typedef struct CPUM68KState { uint32_t urp; uint32_t srp; bool fault; + uint32_t ttr[4]; } mmu; /* Control registers. */ @@ -318,6 +327,15 @@ typedef enum { #define M68K_PDT_INDIRECT(entry) ((entry & 3) == 2) #define M68K_INDIRECT_POINTER(addr) (addr & ~3) +/* bits for 68040 MMU Transparent Translation Registers */ +#define M68K_TTR_ADDR_BASE 0xff000000 +#define M68K_TTR_ADDR_MASK 0x00ff0000 +#define M68K_TTR_ADDR_MASK_SHIFT 8 +#define M68K_TTR_ENABLED 0x00008000 +#define M68K_TTR_SFIELD 0x00006000 +#define M68K_TTR_SFIELD_USER 0x0000 +#define M68K_TTR_SFIELD_SUPER 0x2000 + /* m68k Control Registers */ /* ColdFire */ -- cgit v1.2.3