#include <stdlib.h>
#include <string.h>
#include <unistd.h>
#include <stdio.h>
#include "dbg_msg.h"
#include "jt_arm.h"
#include "jt_cp15.h"
#include "jt_instr.h"
ARM920 CP15-MMU Interface
unsigned int jtag_arm920_CP15PhysRegRead | ( | int | nreg | ) |
Read from "physical" CP15 Register.
Some of the CP15 Registers having an direct access like
chain 15 the length is 40 bits Physical access mode to CP15
bit [0] = 1; bit [1..32]: register value bit [33.38]: register address bit [39]: read/write
nreg | register address number |
References DBG_LEVEL_JTAG_ICERT_LOW, dbgPrintf(), instr_intest, INTEST, jtag_arm_set_chain(), jtag_exchange_data(), jtag_send_instr(), jtag_supp_bitstr2int_MSB_First(), jtag_supp_int2bitstr_MSB_First(), and scan_chain.
Referenced by jtag_arm920_CP15_CleanDcache(), jtag_arm920_CP15_DrainWriteBuffer(), jtag_arm920_CP15_InvalidateICache(), jtag_arm920_CP15_InvalidateTLB(), jtag_arm920_CP15_ReadDTTB(), jtag_arm920_CP15_ReadITTB(), jtag_arm9_ReadCP15Info(), and jtag_test().
void jtag_arm920_CP15PhysRegWrite | ( | int | nreg, | |
unsigned int | regdata | |||
) |
Write data into "physical" CP15 Register.
Some of the CP15 Registers having an direct access like
chain 15 the length is 40 bits Physical access mode to CP15
bit [0] = 1; bit [1..32]: register value bit [33.38]: register address bit [39]: read/write
nreg | register address number | |
regdata | register value |
References DBG_LEVEL_JTAG_ICERT_LOW, DBG_LEVEL_JTAG_INSTR, dbgPrintf(), IF_DBG, instr_intest, INTEST, jtag_arm_set_chain(), jtag_exchange_data(), jtag_send_instr(), jtag_supp_int2bitstr_MSB_First(), and scan_chain.
Referenced by jtag_arm920_CP15_CleanDcache(), jtag_arm920_CP15_DrainWriteBuffer(), jtag_arm920_CP15_InvalidateICache(), jtag_arm920_CP15_InvalidateTLB(), jtag_arm920_CP15_ReadDTTB(), and jtag_arm920_CP15_ReadITTB().
void jtag_arm920_CP15Interpret | ( | unsigned int | cp15instr | ) |
Write CP15 ARM instruction into chain.
This instruction will be interpreted at next System speed run.
chain 15 the length is 40 bits Interpreted access mode to CP15
bit [0] = 0; bit [1..32]: MCR or MRC instr. bit [33.38]: 00000 bit [39]: = 0 write ()
cp15instr | CP15 ARM instruction |
References DBG_LEVEL_JTAG_ICERT_LOW, DBG_LEVEL_JTAG_INSTR, dbgPrintf(), IF_DBG, instr_intest, INTEST, jtag_arm_set_chain(), jtag_exchange_data(), jtag_send_instr(), jtag_supp_int2bitstr_MSB_First(), and scan_chain.
Referenced by jtag_arm920_CP15_CleanDcache(), jtag_arm920_CP15_DrainWriteBuffer(), jtag_arm920_CP15_InvalidateICache(), jtag_arm920_CP15_InvalidateTLB(), jtag_arm920_CP15_ReadDTTB(), and jtag_arm920_CP15_ReadITTB().
unsigned int jtag_arm920_CP15_ReadITTB | ( | void | ) |
Collect Translation Lookaside Buffer Table Base address for Instructions from CP15
- |
References ARM_LDR, ARM_MRC_CP15_5_R0_C15_C1_2, ARM_NOP, ARM_STR, DBG_LEVEL_GDB_ARM_INFO, dbgPrintf(), DEBUG_REPEAT_SPEED, DEBUG_SPEED, instr_intest, INTEST, jtag_arm920_CP15Interpret(), jtag_arm920_CP15PhysRegRead(), jtag_arm920_CP15PhysRegWrite(), jtag_arm9_mov_chain1_data(), jtag_arm_chain1_sysspeed_restart(), jtag_arm_set_chain(), jtag_send_instr(), MMU920_PHYSACCESS_CP15_REGADDRESS_C15_STATE, READ_WRITE, SYSTEM_SPEED, and WRITE_ONLY.
Referenced by jtag_test().
unsigned int jtag_arm920_CP15_ReadDTTB | ( | void | ) |
Collect Translation Lookaside Buffer Table Base address for Data from CP15
- |
References ARM_LDR, ARM_MRC_CP15_0_R0_C2_C2_2, ARM_NOP, ARM_STR, DBG_LEVEL_GDB_ARM_INFO, dbgPrintf(), DEBUG_REPEAT_SPEED, DEBUG_SPEED, instr_intest, INTEST, jtag_arm920_CP15Interpret(), jtag_arm920_CP15PhysRegRead(), jtag_arm920_CP15PhysRegWrite(), jtag_arm9_mov_chain1_data(), jtag_arm_chain1_sysspeed_restart(), jtag_arm_set_chain(), jtag_send_instr(), MMU920_PHYSACCESS_CP15_REGADDRESS_C15_STATE, READ_WRITE, SYSTEM_SPEED, and WRITE_ONLY.
Referenced by jtag_test().
void jtag_arm920_CP15_CleanDcache | ( | void | ) |
clean D Cache by running through all cache lines using index format:
31 (32-A) L 0 |index|----|seg|--|
Clean DCache single entry MCR p15, 0, <Rd>, c7, c10, 2 cn=7, cm=10, op1=0, op2=2
- |
References ARM_LDMIA, ARM_MCR_CP15_0_R0_C7_C10_2, ARM_NOP, ARM_STR, DBG_LEVEL_JTAG_ICERT_LOW, DBG_LEVEL_JTAG_INSTR, dbgPrintf(), DEBUG_REPEAT_SPEED, DEBUG_SPEED, IF_DBG, instr_intest, INTEST, jtag_arm920_CP15Interpret(), jtag_arm920_CP15PhysRegRead(), jtag_arm920_CP15PhysRegWrite(), jtag_arm9_mov_chain1_data(), jtag_arm_chain1_sysspeed_restart(), jtag_arm_set_chain(), jtag_send_instr(), MMU920_PHYSACCESS_CP15_REGADDRESS_C15_STATE, SYSTEM_SPEED, and WRITE_ONLY.
void jtag_arm920_CP15_DrainWriteBuffer | ( | void | ) |
drain write buffer
drain write buffer MCR p15, 0, <Rd>, c7, c10, 4 cn=7, cm=10, op1=0, op2=4
- |
References ARM_LDMIA, ARM_MCR_CP15_0_R0_C7_C10_4, ARM_NOP, ARM_STR, DBG_LEVEL_JTAG_ICERT_LOW, DBG_LEVEL_JTAG_INSTR, dbgPrintf(), DEBUG_REPEAT_SPEED, DEBUG_SPEED, IF_DBG, instr_intest, INTEST, jtag_arm920_CP15Interpret(), jtag_arm920_CP15PhysRegRead(), jtag_arm920_CP15PhysRegWrite(), jtag_arm9_mov_chain1_data(), jtag_arm_chain1_sysspeed_restart(), jtag_arm_set_chain(), jtag_send_instr(), MMU920_PHYSACCESS_CP15_REGADDRESS_C15_STATE, SYSTEM_SPEED, and WRITE_ONLY.
void jtag_arm920_CP15_InvalidateICache | ( | void | ) |
invalidate ICache
inval Instruction Cache MCR p15, 0, <Rd>, c7, c5, 0 cn=7, cm=5, op1=0, op2=0
- |
References ARM_LDMIA, ARM_MCR_CP15_0_R0_C7_C5_0, ARM_NOP, ARM_STR, DBG_LEVEL_JTAG_ICERT_LOW, DBG_LEVEL_JTAG_INSTR, dbgPrintf(), DEBUG_REPEAT_SPEED, DEBUG_SPEED, IF_DBG, instr_intest, INTEST, jtag_arm920_CP15Interpret(), jtag_arm920_CP15PhysRegRead(), jtag_arm920_CP15PhysRegWrite(), jtag_arm9_mov_chain1_data(), jtag_arm_chain1_sysspeed_restart(), jtag_arm_set_chain(), jtag_send_instr(), MMU920_PHYSACCESS_CP15_REGADDRESS_C15_STATE, SYSTEM_SPEED, and WRITE_ONLY.
void jtag_arm920_CP15_InvalidateTLB | ( | void | ) |
invalidate TLB's
inval TLB MCR p15, 0, <Rd>, c8, c7, 0 cn=8, cm=7, op1=0, op2=0
- |
References ARM_LDMIA, ARM_MCR_CP15_0_R0_C8_C7_0, ARM_NOP, ARM_STR, DBG_LEVEL_JTAG_ICERT_LOW, DBG_LEVEL_JTAG_INSTR, dbgPrintf(), DEBUG_REPEAT_SPEED, DEBUG_SPEED, IF_DBG, instr_intest, INTEST, jtag_arm920_CP15Interpret(), jtag_arm920_CP15PhysRegRead(), jtag_arm920_CP15PhysRegWrite(), jtag_arm9_mov_chain1_data(), jtag_arm_chain1_sysspeed_restart(), jtag_arm_set_chain(), jtag_send_instr(), MMU920_PHYSACCESS_CP15_REGADDRESS_C15_STATE, SYSTEM_SPEED, and WRITE_ONLY.