target: use 'ULL' suffix for long constants
On 32 bit hosts, gcc should consider constants without suffix as 32 bits values. Use the suffix 'ULL' to guarantee it is a 64 bit. Detected through 'sparse' tool. Change-Id: I205ca986968fef9a536f87492d1f6c80e41829f3 Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com> Reviewed-on: https://review.openocd.org/c/openocd/+/7601 Tested-by: jenkins
This commit is contained in:
parent
314f4c665f
commit
ea62f8e22a
|
@ -588,7 +588,7 @@ static int aarch64_restore_one(struct target *target, int current,
|
|||
resume_pc &= 0xFFFFFFFC;
|
||||
break;
|
||||
case ARM_STATE_AARCH64:
|
||||
resume_pc &= 0xFFFFFFFFFFFFFFFC;
|
||||
resume_pc &= 0xFFFFFFFFFFFFFFFCULL;
|
||||
break;
|
||||
case ARM_STATE_THUMB:
|
||||
case ARM_STATE_THUMB_EE:
|
||||
|
@ -1248,7 +1248,7 @@ static int aarch64_set_breakpoint(struct target *target,
|
|||
| (byte_addr_select << 5)
|
||||
| (3 << 1) | 1;
|
||||
brp_list[brp_i].used = 1;
|
||||
brp_list[brp_i].value = breakpoint->address & 0xFFFFFFFFFFFFFFFC;
|
||||
brp_list[brp_i].value = breakpoint->address & 0xFFFFFFFFFFFFFFFCULL;
|
||||
brp_list[brp_i].control = control;
|
||||
bpt_value = brp_list[brp_i].value;
|
||||
|
||||
|
@ -1300,28 +1300,28 @@ static int aarch64_set_breakpoint(struct target *target,
|
|||
buf_set_u32(code, 0, 32, opcode);
|
||||
|
||||
retval = target_read_memory(target,
|
||||
breakpoint->address & 0xFFFFFFFFFFFFFFFE,
|
||||
breakpoint->address & 0xFFFFFFFFFFFFFFFEULL,
|
||||
breakpoint->length, 1,
|
||||
breakpoint->orig_instr);
|
||||
if (retval != ERROR_OK)
|
||||
return retval;
|
||||
|
||||
armv8_cache_d_inner_flush_virt(armv8,
|
||||
breakpoint->address & 0xFFFFFFFFFFFFFFFE,
|
||||
breakpoint->address & 0xFFFFFFFFFFFFFFFEULL,
|
||||
breakpoint->length);
|
||||
|
||||
retval = target_write_memory(target,
|
||||
breakpoint->address & 0xFFFFFFFFFFFFFFFE,
|
||||
breakpoint->address & 0xFFFFFFFFFFFFFFFEULL,
|
||||
breakpoint->length, 1, code);
|
||||
if (retval != ERROR_OK)
|
||||
return retval;
|
||||
|
||||
armv8_cache_d_inner_flush_virt(armv8,
|
||||
breakpoint->address & 0xFFFFFFFFFFFFFFFE,
|
||||
breakpoint->address & 0xFFFFFFFFFFFFFFFEULL,
|
||||
breakpoint->length);
|
||||
|
||||
armv8_cache_i_inner_inval_virt(armv8,
|
||||
breakpoint->address & 0xFFFFFFFFFFFFFFFE,
|
||||
breakpoint->address & 0xFFFFFFFFFFFFFFFEULL,
|
||||
breakpoint->length);
|
||||
|
||||
breakpoint->is_set = true;
|
||||
|
@ -1453,7 +1453,7 @@ static int aarch64_set_hybrid_breakpoint(struct target *target, struct breakpoin
|
|||
| (iva_byte_addr_select << 5)
|
||||
| (3 << 1) | 1;
|
||||
brp_list[brp_2].used = 1;
|
||||
brp_list[brp_2].value = breakpoint->address & 0xFFFFFFFFFFFFFFFC;
|
||||
brp_list[brp_2].value = breakpoint->address & 0xFFFFFFFFFFFFFFFCULL;
|
||||
brp_list[brp_2].control = control_iva;
|
||||
retval = aarch64_dap_write_memap_register_u32(target, armv8->debug_base
|
||||
+ CPUV8_DBG_BVR_BASE + 16 * brp_list[brp_2].brpn,
|
||||
|
@ -1577,29 +1577,29 @@ static int aarch64_unset_breakpoint(struct target *target, struct breakpoint *br
|
|||
/* restore original instruction (kept in target endianness) */
|
||||
|
||||
armv8_cache_d_inner_flush_virt(armv8,
|
||||
breakpoint->address & 0xFFFFFFFFFFFFFFFE,
|
||||
breakpoint->address & 0xFFFFFFFFFFFFFFFEULL,
|
||||
breakpoint->length);
|
||||
|
||||
if (breakpoint->length == 4) {
|
||||
retval = target_write_memory(target,
|
||||
breakpoint->address & 0xFFFFFFFFFFFFFFFE,
|
||||
breakpoint->address & 0xFFFFFFFFFFFFFFFEULL,
|
||||
4, 1, breakpoint->orig_instr);
|
||||
if (retval != ERROR_OK)
|
||||
return retval;
|
||||
} else {
|
||||
retval = target_write_memory(target,
|
||||
breakpoint->address & 0xFFFFFFFFFFFFFFFE,
|
||||
breakpoint->address & 0xFFFFFFFFFFFFFFFEULL,
|
||||
2, 1, breakpoint->orig_instr);
|
||||
if (retval != ERROR_OK)
|
||||
return retval;
|
||||
}
|
||||
|
||||
armv8_cache_d_inner_flush_virt(armv8,
|
||||
breakpoint->address & 0xFFFFFFFFFFFFFFFE,
|
||||
breakpoint->address & 0xFFFFFFFFFFFFFFFEULL,
|
||||
breakpoint->length);
|
||||
|
||||
armv8_cache_i_inner_inval_virt(armv8,
|
||||
breakpoint->address & 0xFFFFFFFFFFFFFFFE,
|
||||
breakpoint->address & 0xFFFFFFFFFFFFFFFEULL,
|
||||
breakpoint->length);
|
||||
}
|
||||
breakpoint->is_set = false;
|
||||
|
|
|
@ -236,7 +236,7 @@ static int armv8_read_ttbcr(struct target *target)
|
|||
armv8->pa_size = armv8_pa_size((ttbcr_64 >> 32) & 7);
|
||||
armv8->page_size = (ttbcr_64 >> 14) & 3;
|
||||
armv8->armv8_mmu.ttbr1_used = (((ttbcr_64 >> 16) & 0x3F) != 0) ? 1 : 0;
|
||||
armv8->armv8_mmu.ttbr0_mask = 0x0000FFFFFFFFFFFF;
|
||||
armv8->armv8_mmu.ttbr0_mask = 0x0000FFFFFFFFFFFFULL;
|
||||
retval += dpm->instr_read_data_r0_64(dpm,
|
||||
ARMV8_MRS(SYSTEM_TTBR0_EL1 | (armv8->armv8_mmu.ttbr1_used), 0),
|
||||
&armv8->ttbr_base);
|
||||
|
|
|
@ -73,26 +73,26 @@ static const struct {
|
|||
const char *feature;
|
||||
} regs[] = {
|
||||
/* general purpose registers */
|
||||
{ EAX, "eax", 0x000000D01D660000, 0, 32, REG_TYPE_INT32, "general", "org.gnu.gdb.i386.core" },
|
||||
{ ECX, "ecx", 0x000000501D660000, 1, 32, REG_TYPE_INT32, "general", "org.gnu.gdb.i386.core" },
|
||||
{ EDX, "edx", 0x000000901D660000, 2, 32, REG_TYPE_INT32, "general", "org.gnu.gdb.i386.core" },
|
||||
{ EBX, "ebx", 0x000000101D660000, NOT_PMREG, 32, REG_TYPE_INT32, "general", "org.gnu.gdb.i386.core" },
|
||||
{ ESP, "esp", 0x000000E01D660000, NOT_PMREG, 32, REG_TYPE_DATA_PTR, "general", "org.gnu.gdb.i386.core" },
|
||||
{ EBP, "ebp", 0x000000601D660000, NOT_PMREG, 32, REG_TYPE_DATA_PTR, "general", "org.gnu.gdb.i386.core" },
|
||||
{ ESI, "esi", 0x000000A01D660000, NOT_PMREG, 32, REG_TYPE_INT32, "general", "org.gnu.gdb.i386.core" },
|
||||
{ EDI, "edi", 0x000000201D660000, NOT_PMREG, 32, REG_TYPE_INT32, "general", "org.gnu.gdb.i386.core" },
|
||||
{ EAX, "eax", 0x000000D01D660000ULL, 0, 32, REG_TYPE_INT32, "general", "org.gnu.gdb.i386.core" },
|
||||
{ ECX, "ecx", 0x000000501D660000ULL, 1, 32, REG_TYPE_INT32, "general", "org.gnu.gdb.i386.core" },
|
||||
{ EDX, "edx", 0x000000901D660000ULL, 2, 32, REG_TYPE_INT32, "general", "org.gnu.gdb.i386.core" },
|
||||
{ EBX, "ebx", 0x000000101D660000ULL, NOT_PMREG, 32, REG_TYPE_INT32, "general", "org.gnu.gdb.i386.core" },
|
||||
{ ESP, "esp", 0x000000E01D660000ULL, NOT_PMREG, 32, REG_TYPE_DATA_PTR, "general", "org.gnu.gdb.i386.core" },
|
||||
{ EBP, "ebp", 0x000000601D660000ULL, NOT_PMREG, 32, REG_TYPE_DATA_PTR, "general", "org.gnu.gdb.i386.core" },
|
||||
{ ESI, "esi", 0x000000A01D660000ULL, NOT_PMREG, 32, REG_TYPE_INT32, "general", "org.gnu.gdb.i386.core" },
|
||||
{ EDI, "edi", 0x000000201D660000ULL, NOT_PMREG, 32, REG_TYPE_INT32, "general", "org.gnu.gdb.i386.core" },
|
||||
|
||||
/* instruction pointer & flags */
|
||||
{ EIP, "eip", 0x000000C01D660000, 3, 32, REG_TYPE_CODE_PTR, "general", "org.gnu.gdb.i386.core" },
|
||||
{ EFLAGS, "eflags", 0x000000401D660000, 4, 32, REG_TYPE_INT32, "general", "org.gnu.gdb.i386.core" },
|
||||
{ EIP, "eip", 0x000000C01D660000ULL, 3, 32, REG_TYPE_CODE_PTR, "general", "org.gnu.gdb.i386.core" },
|
||||
{ EFLAGS, "eflags", 0x000000401D660000ULL, 4, 32, REG_TYPE_INT32, "general", "org.gnu.gdb.i386.core" },
|
||||
|
||||
/* segment registers */
|
||||
{ CS, "cs", 0x000000281D660000, 5, 32, REG_TYPE_INT32, "general", "org.gnu.gdb.i386.core" },
|
||||
{ SS, "ss", 0x000000C81D660000, NOT_PMREG, 32, REG_TYPE_INT32, "general", "org.gnu.gdb.i386.core" },
|
||||
{ DS, "ds", 0x000000481D660000, NOT_PMREG, 32, REG_TYPE_INT32, "general", "org.gnu.gdb.i386.core" },
|
||||
{ ES, "es", 0x000000A81D660000, NOT_PMREG, 32, REG_TYPE_INT32, "general", "org.gnu.gdb.i386.core" },
|
||||
{ FS, "fs", 0x000000881D660000, NOT_PMREG, 32, REG_TYPE_INT32, "general", "org.gnu.gdb.i386.core" },
|
||||
{ GS, "gs", 0x000000081D660000, NOT_PMREG, 32, REG_TYPE_INT32, "general", "org.gnu.gdb.i386.core" },
|
||||
{ CS, "cs", 0x000000281D660000ULL, 5, 32, REG_TYPE_INT32, "general", "org.gnu.gdb.i386.core" },
|
||||
{ SS, "ss", 0x000000C81D660000ULL, NOT_PMREG, 32, REG_TYPE_INT32, "general", "org.gnu.gdb.i386.core" },
|
||||
{ DS, "ds", 0x000000481D660000ULL, NOT_PMREG, 32, REG_TYPE_INT32, "general", "org.gnu.gdb.i386.core" },
|
||||
{ ES, "es", 0x000000A81D660000ULL, NOT_PMREG, 32, REG_TYPE_INT32, "general", "org.gnu.gdb.i386.core" },
|
||||
{ FS, "fs", 0x000000881D660000ULL, NOT_PMREG, 32, REG_TYPE_INT32, "general", "org.gnu.gdb.i386.core" },
|
||||
{ GS, "gs", 0x000000081D660000ULL, NOT_PMREG, 32, REG_TYPE_INT32, "general", "org.gnu.gdb.i386.core" },
|
||||
|
||||
/* floating point unit registers - not accessible via JTAG - here to satisfy GDB */
|
||||
{ ST0, "st0", 0x0, NOT_AVAIL_REG, 32, REG_TYPE_INT32, "general", "org.gnu.gdb.i386.core" },
|
||||
|
@ -113,56 +113,56 @@ static const struct {
|
|||
{ FOP, "fop", 0x0, NOT_AVAIL_REG, 32, REG_TYPE_INT32, "general", "org.gnu.gdb.i386.core" },
|
||||
|
||||
/* control registers */
|
||||
{ CR0, "cr0", 0x000000001D660000, 6, 32, REG_TYPE_INT32, "general", "org.gnu.gdb.i386.sys" },
|
||||
{ CR2, "cr2", 0x000000BC1D660000, 7, 32, REG_TYPE_INT32, "general", "org.gnu.gdb.i386.sys" },
|
||||
{ CR3, "cr3", 0x000000801D660000, 8, 32, REG_TYPE_INT32, "general", "org.gnu.gdb.i386.sys" },
|
||||
{ CR4, "cr4", 0x0000002C1D660000, 9, 32, REG_TYPE_INT32, "general", "org.gnu.gdb.i386.sys" },
|
||||
{ CR0, "cr0", 0x000000001D660000ULL, 6, 32, REG_TYPE_INT32, "general", "org.gnu.gdb.i386.sys" },
|
||||
{ CR2, "cr2", 0x000000BC1D660000ULL, 7, 32, REG_TYPE_INT32, "general", "org.gnu.gdb.i386.sys" },
|
||||
{ CR3, "cr3", 0x000000801D660000ULL, 8, 32, REG_TYPE_INT32, "general", "org.gnu.gdb.i386.sys" },
|
||||
{ CR4, "cr4", 0x0000002C1D660000ULL, 9, 32, REG_TYPE_INT32, "general", "org.gnu.gdb.i386.sys" },
|
||||
|
||||
/* debug registers */
|
||||
{ DR0, "dr0", 0x0000007C1D660000, NOT_PMREG, 32, REG_TYPE_INT32, "general", "org.gnu.gdb.i386.sys" },
|
||||
{ DR1, "dr1", 0x000000FC1D660000, NOT_PMREG, 32, REG_TYPE_INT32, "general", "org.gnu.gdb.i386.sys" },
|
||||
{ DR2, "dr2", 0x000000021D660000, NOT_PMREG, 32, REG_TYPE_INT32, "general", "org.gnu.gdb.i386.sys" },
|
||||
{ DR3, "dr3", 0x000000821D660000, NOT_PMREG, 32, REG_TYPE_INT32, "general", "org.gnu.gdb.i386.sys" },
|
||||
{ DR6, "dr6", 0x000000301D660000, 10, 32, REG_TYPE_INT32, "general", "org.gnu.gdb.i386.sys" },
|
||||
{ DR7, "dr7", 0x000000B01D660000, 11, 32, REG_TYPE_INT32, "general", "org.gnu.gdb.i386.sys" },
|
||||
{ DR0, "dr0", 0x0000007C1D660000ULL, NOT_PMREG, 32, REG_TYPE_INT32, "general", "org.gnu.gdb.i386.sys" },
|
||||
{ DR1, "dr1", 0x000000FC1D660000ULL, NOT_PMREG, 32, REG_TYPE_INT32, "general", "org.gnu.gdb.i386.sys" },
|
||||
{ DR2, "dr2", 0x000000021D660000ULL, NOT_PMREG, 32, REG_TYPE_INT32, "general", "org.gnu.gdb.i386.sys" },
|
||||
{ DR3, "dr3", 0x000000821D660000ULL, NOT_PMREG, 32, REG_TYPE_INT32, "general", "org.gnu.gdb.i386.sys" },
|
||||
{ DR6, "dr6", 0x000000301D660000ULL, 10, 32, REG_TYPE_INT32, "general", "org.gnu.gdb.i386.sys" },
|
||||
{ DR7, "dr7", 0x000000B01D660000ULL, 11, 32, REG_TYPE_INT32, "general", "org.gnu.gdb.i386.sys" },
|
||||
|
||||
/* descriptor tables */
|
||||
{ IDTB, "idtbase", 0x000000581D660000, NOT_PMREG, 32, REG_TYPE_INT32, "general", "org.gnu.gdb.i386.sys" },
|
||||
{ IDTL, "idtlimit", 0x000000D81D660000, NOT_PMREG, 32, REG_TYPE_INT32, "general", "org.gnu.gdb.i386.sys" },
|
||||
{ IDTAR, "idtar", 0x000000981D660000, NOT_PMREG, 32, REG_TYPE_INT32, "general", "org.gnu.gdb.i386.sys" },
|
||||
{ GDTB, "gdtbase", 0x000000B81D660000, NOT_PMREG, 32, REG_TYPE_INT32, "general", "org.gnu.gdb.i386.sys" },
|
||||
{ GDTL, "gdtlimit", 0x000000781D660000, NOT_PMREG, 32, REG_TYPE_INT32, "general", "org.gnu.gdb.i386.sys" },
|
||||
{ GDTAR, "gdtar", 0x000000381D660000, NOT_PMREG, 32, REG_TYPE_INT32, "general", "org.gnu.gdb.i386.sys" },
|
||||
{ TR, "tr", 0x000000701D660000, NOT_PMREG, 32, REG_TYPE_INT32, "general", "org.gnu.gdb.i386.sys" },
|
||||
{ LDTR, "ldtr", 0x000000F01D660000, NOT_PMREG, 32, REG_TYPE_INT32, "general", "org.gnu.gdb.i386.sys" },
|
||||
{ LDTB, "ldbase", 0x000000041D660000, NOT_PMREG, 32, REG_TYPE_INT32, "general", "org.gnu.gdb.i386.sys" },
|
||||
{ LDTL, "ldlimit", 0x000000841D660000, NOT_PMREG, 32, REG_TYPE_INT32, "general", "org.gnu.gdb.i386.sys" },
|
||||
{ LDTAR, "ldtar", 0x000000F81D660000, NOT_PMREG, 32, REG_TYPE_INT32, "general", "org.gnu.gdb.i386.sys" },
|
||||
{ IDTB, "idtbase", 0x000000581D660000ULL, NOT_PMREG, 32, REG_TYPE_INT32, "general", "org.gnu.gdb.i386.sys" },
|
||||
{ IDTL, "idtlimit", 0x000000D81D660000ULL, NOT_PMREG, 32, REG_TYPE_INT32, "general", "org.gnu.gdb.i386.sys" },
|
||||
{ IDTAR, "idtar", 0x000000981D660000ULL, NOT_PMREG, 32, REG_TYPE_INT32, "general", "org.gnu.gdb.i386.sys" },
|
||||
{ GDTB, "gdtbase", 0x000000B81D660000ULL, NOT_PMREG, 32, REG_TYPE_INT32, "general", "org.gnu.gdb.i386.sys" },
|
||||
{ GDTL, "gdtlimit", 0x000000781D660000ULL, NOT_PMREG, 32, REG_TYPE_INT32, "general", "org.gnu.gdb.i386.sys" },
|
||||
{ GDTAR, "gdtar", 0x000000381D660000ULL, NOT_PMREG, 32, REG_TYPE_INT32, "general", "org.gnu.gdb.i386.sys" },
|
||||
{ TR, "tr", 0x000000701D660000ULL, NOT_PMREG, 32, REG_TYPE_INT32, "general", "org.gnu.gdb.i386.sys" },
|
||||
{ LDTR, "ldtr", 0x000000F01D660000ULL, NOT_PMREG, 32, REG_TYPE_INT32, "general", "org.gnu.gdb.i386.sys" },
|
||||
{ LDTB, "ldbase", 0x000000041D660000ULL, NOT_PMREG, 32, REG_TYPE_INT32, "general", "org.gnu.gdb.i386.sys" },
|
||||
{ LDTL, "ldlimit", 0x000000841D660000ULL, NOT_PMREG, 32, REG_TYPE_INT32, "general", "org.gnu.gdb.i386.sys" },
|
||||
{ LDTAR, "ldtar", 0x000000F81D660000ULL, NOT_PMREG, 32, REG_TYPE_INT32, "general", "org.gnu.gdb.i386.sys" },
|
||||
|
||||
/* segment registers */
|
||||
{ CSB, "csbase", 0x000000F41D660000, NOT_PMREG, 32, REG_TYPE_INT32, "general", "org.gnu.gdb.i386.sys" },
|
||||
{ CSL, "cslimit", 0x0000000C1D660000, NOT_PMREG, 32, REG_TYPE_INT32, "general", "org.gnu.gdb.i386.sys" },
|
||||
{ CSAR, "csar", 0x000000741D660000, 12, 32, REG_TYPE_INT32, "general", "org.gnu.gdb.i386.sys" },
|
||||
{ DSB, "dsbase", 0x000000941D660000, 13, 32, REG_TYPE_INT32, "general", "org.gnu.gdb.i386.sys" },
|
||||
{ DSL, "dslimit", 0x000000541D660000, 14, 32, REG_TYPE_INT32, "general", "org.gnu.gdb.i386.sys" },
|
||||
{ DSAR, "dsar", 0x000000141D660000, 15, 32, REG_TYPE_INT32, "general", "org.gnu.gdb.i386.sys" },
|
||||
{ ESB, "esbase", 0x0000004C1D660000, NOT_PMREG, 32, REG_TYPE_INT32, "general", "org.gnu.gdb.i386.sys" },
|
||||
{ ESL, "eslimit", 0x000000CC1D660000, NOT_PMREG, 32, REG_TYPE_INT32, "general", "org.gnu.gdb.i386.sys" },
|
||||
{ ESAR, "esar", 0x0000008C1D660000, NOT_PMREG, 32, REG_TYPE_INT32, "general", "org.gnu.gdb.i386.sys" },
|
||||
{ FSB, "fsbase", 0x000000641D660000, NOT_PMREG, 32, REG_TYPE_INT32, "general", "org.gnu.gdb.i386.sys" },
|
||||
{ FSL, "fslimit", 0x000000E41D660000, NOT_PMREG, 32, REG_TYPE_INT32, "general", "org.gnu.gdb.i386.sys" },
|
||||
{ FSAR, "fsar", 0x000000A41D660000, NOT_PMREG, 32, REG_TYPE_INT32, "general", "org.gnu.gdb.i386.sys" },
|
||||
{ GSB, "gsbase", 0x000000C41D660000, NOT_PMREG, 32, REG_TYPE_INT32, "general", "org.gnu.gdb.i386.sys" },
|
||||
{ GSL, "gslimit", 0x000000241D660000, NOT_PMREG, 32, REG_TYPE_INT32, "general", "org.gnu.gdb.i386.sys" },
|
||||
{ GSAR, "gsar", 0x000000441D660000, NOT_PMREG, 32, REG_TYPE_INT32, "general", "org.gnu.gdb.i386.sys" },
|
||||
{ SSB, "ssbase", 0x000000341D660000, NOT_PMREG, 32, REG_TYPE_INT32, "general", "org.gnu.gdb.i386.sys" },
|
||||
{ SSL, "sslimit", 0x000000B41D660000, NOT_PMREG, 32, REG_TYPE_INT32, "general", "org.gnu.gdb.i386.sys" },
|
||||
{ SSAR, "ssar", 0x000000D41D660000, 16, 32, REG_TYPE_INT32, "general", "org.gnu.gdb.i386.sys" },
|
||||
{ TSSB, "tssbase", 0x000000E81D660000, NOT_PMREG, 32, REG_TYPE_INT32, "general", "org.gnu.gdb.i386.sys" },
|
||||
{ TSSL, "tsslimit", 0x000000181D660000, NOT_PMREG, 32, REG_TYPE_INT32, "general", "org.gnu.gdb.i386.sys" },
|
||||
{ TSSAR, "tssar", 0x000000681D660000, NOT_PMREG, 32, REG_TYPE_INT32, "general", "org.gnu.gdb.i386.sys" },
|
||||
{ CSB, "csbase", 0x000000F41D660000ULL, NOT_PMREG, 32, REG_TYPE_INT32, "general", "org.gnu.gdb.i386.sys" },
|
||||
{ CSL, "cslimit", 0x0000000C1D660000ULL, NOT_PMREG, 32, REG_TYPE_INT32, "general", "org.gnu.gdb.i386.sys" },
|
||||
{ CSAR, "csar", 0x000000741D660000ULL, 12, 32, REG_TYPE_INT32, "general", "org.gnu.gdb.i386.sys" },
|
||||
{ DSB, "dsbase", 0x000000941D660000ULL, 13, 32, REG_TYPE_INT32, "general", "org.gnu.gdb.i386.sys" },
|
||||
{ DSL, "dslimit", 0x000000541D660000ULL, 14, 32, REG_TYPE_INT32, "general", "org.gnu.gdb.i386.sys" },
|
||||
{ DSAR, "dsar", 0x000000141D660000ULL, 15, 32, REG_TYPE_INT32, "general", "org.gnu.gdb.i386.sys" },
|
||||
{ ESB, "esbase", 0x0000004C1D660000ULL, NOT_PMREG, 32, REG_TYPE_INT32, "general", "org.gnu.gdb.i386.sys" },
|
||||
{ ESL, "eslimit", 0x000000CC1D660000ULL, NOT_PMREG, 32, REG_TYPE_INT32, "general", "org.gnu.gdb.i386.sys" },
|
||||
{ ESAR, "esar", 0x0000008C1D660000ULL, NOT_PMREG, 32, REG_TYPE_INT32, "general", "org.gnu.gdb.i386.sys" },
|
||||
{ FSB, "fsbase", 0x000000641D660000ULL, NOT_PMREG, 32, REG_TYPE_INT32, "general", "org.gnu.gdb.i386.sys" },
|
||||
{ FSL, "fslimit", 0x000000E41D660000ULL, NOT_PMREG, 32, REG_TYPE_INT32, "general", "org.gnu.gdb.i386.sys" },
|
||||
{ FSAR, "fsar", 0x000000A41D660000ULL, NOT_PMREG, 32, REG_TYPE_INT32, "general", "org.gnu.gdb.i386.sys" },
|
||||
{ GSB, "gsbase", 0x000000C41D660000ULL, NOT_PMREG, 32, REG_TYPE_INT32, "general", "org.gnu.gdb.i386.sys" },
|
||||
{ GSL, "gslimit", 0x000000241D660000ULL, NOT_PMREG, 32, REG_TYPE_INT32, "general", "org.gnu.gdb.i386.sys" },
|
||||
{ GSAR, "gsar", 0x000000441D660000ULL, NOT_PMREG, 32, REG_TYPE_INT32, "general", "org.gnu.gdb.i386.sys" },
|
||||
{ SSB, "ssbase", 0x000000341D660000ULL, NOT_PMREG, 32, REG_TYPE_INT32, "general", "org.gnu.gdb.i386.sys" },
|
||||
{ SSL, "sslimit", 0x000000B41D660000ULL, NOT_PMREG, 32, REG_TYPE_INT32, "general", "org.gnu.gdb.i386.sys" },
|
||||
{ SSAR, "ssar", 0x000000D41D660000ULL, 16, 32, REG_TYPE_INT32, "general", "org.gnu.gdb.i386.sys" },
|
||||
{ TSSB, "tssbase", 0x000000E81D660000ULL, NOT_PMREG, 32, REG_TYPE_INT32, "general", "org.gnu.gdb.i386.sys" },
|
||||
{ TSSL, "tsslimit", 0x000000181D660000ULL, NOT_PMREG, 32, REG_TYPE_INT32, "general", "org.gnu.gdb.i386.sys" },
|
||||
{ TSSAR, "tssar", 0x000000681D660000ULL, NOT_PMREG, 32, REG_TYPE_INT32, "general", "org.gnu.gdb.i386.sys" },
|
||||
/* probemode control register */
|
||||
{ PMCR, "pmcr", 0x000000421D660000, 17, 32, REG_TYPE_INT32, "general", "org.gnu.gdb.i386.sys" },
|
||||
{ PMCR, "pmcr", 0x000000421D660000ULL, 17, 32, REG_TYPE_INT32, "general", "org.gnu.gdb.i386.sys" },
|
||||
};
|
||||
|
||||
static const struct {
|
||||
|
@ -171,36 +171,36 @@ static const struct {
|
|||
uint64_t op;
|
||||
} instructions[] = {
|
||||
/* memory read/write */
|
||||
{ MEMRDB32, "MEMRDB32", 0x0909090909090851 },
|
||||
{ MEMRDB16, "MEMRDB16", 0x09090909090851E6 },
|
||||
{ MEMRDH32, "MEMRDH32", 0x090909090908D166 },
|
||||
{ MEMRDH16, "MEMRDH16", 0x090909090908D1E6 },
|
||||
{ MEMRDW32, "MEMRDW32", 0x09090909090908D1 },
|
||||
{ MEMRDW16, "MEMRDW16", 0x0909090908D1E666 },
|
||||
{ MEMWRB32, "MEMWRB32", 0x0909090909090811 },
|
||||
{ MEMWRB16, "MEMWRB16", 0x09090909090811E6 },
|
||||
{ MEMWRH32, "MEMWRH32", 0x0909090909089166 },
|
||||
{ MEMWRH16, "MEMWRH16", 0x09090909090891E6 },
|
||||
{ MEMWRW32, "MEMWRW32", 0x0909090909090891 },
|
||||
{ MEMWRW16, "MEMWRW16", 0x090909090891E666 },
|
||||
{ MEMRDB32, "MEMRDB32", 0x0909090909090851ULL },
|
||||
{ MEMRDB16, "MEMRDB16", 0x09090909090851E6ULL },
|
||||
{ MEMRDH32, "MEMRDH32", 0x090909090908D166ULL },
|
||||
{ MEMRDH16, "MEMRDH16", 0x090909090908D1E6ULL },
|
||||
{ MEMRDW32, "MEMRDW32", 0x09090909090908D1ULL },
|
||||
{ MEMRDW16, "MEMRDW16", 0x0909090908D1E666ULL },
|
||||
{ MEMWRB32, "MEMWRB32", 0x0909090909090811ULL },
|
||||
{ MEMWRB16, "MEMWRB16", 0x09090909090811E6ULL },
|
||||
{ MEMWRH32, "MEMWRH32", 0x0909090909089166ULL },
|
||||
{ MEMWRH16, "MEMWRH16", 0x09090909090891E6ULL },
|
||||
{ MEMWRW32, "MEMWRW32", 0x0909090909090891ULL },
|
||||
{ MEMWRW16, "MEMWRW16", 0x090909090891E666ULL },
|
||||
/* IO read/write */
|
||||
{ IORDB32, "IORDB32", 0x0909090909090937 },
|
||||
{ IORDB16, "IORDB16", 0x09090909090937E6 },
|
||||
{ IORDH32, "IORDH32", 0x090909090909B766 },
|
||||
{ IORDH16, "IORDH16", 0x090909090909B7E6 },
|
||||
{ IORDW32, "IORDW32", 0x09090909090909B7 },
|
||||
{ IORDW16, "IORDW16", 0x0909090909B7E666 },
|
||||
{ IOWRB32, "IOWRB32", 0x0909090909090977 },
|
||||
{ IOWRB16, "IOWRB16", 0x09090909090977E6 },
|
||||
{ IOWRH32, "IOWRH32", 0x090909090909F766 },
|
||||
{ IOWRH16, "IOWRH16", 0x090909090909F7E6 },
|
||||
{ IOWRW32, "IOWRW32", 0x09090909090909F7 },
|
||||
{ IOWRW16, "IOWRW16", 0x0909090909F7E666 },
|
||||
{ IORDB32, "IORDB32", 0x0909090909090937ULL },
|
||||
{ IORDB16, "IORDB16", 0x09090909090937E6ULL },
|
||||
{ IORDH32, "IORDH32", 0x090909090909B766ULL },
|
||||
{ IORDH16, "IORDH16", 0x090909090909B7E6ULL },
|
||||
{ IORDW32, "IORDW32", 0x09090909090909B7ULL },
|
||||
{ IORDW16, "IORDW16", 0x0909090909B7E666ULL },
|
||||
{ IOWRB32, "IOWRB32", 0x0909090909090977ULL },
|
||||
{ IOWRB16, "IOWRB16", 0x09090909090977E6ULL },
|
||||
{ IOWRH32, "IOWRH32", 0x090909090909F766ULL },
|
||||
{ IOWRH16, "IOWRH16", 0x090909090909F7E6ULL },
|
||||
{ IOWRW32, "IOWRW32", 0x09090909090909F7ULL },
|
||||
{ IOWRW16, "IOWRW16", 0x0909090909F7E666ULL },
|
||||
/* lakemont1 core shadow ram access opcodes */
|
||||
{ SRAMACCESS, "SRAMACCESS", 0x0000000E9D660000 },
|
||||
{ SRAM2PDR, "SRAM2PDR", 0x4CF0000000000000 },
|
||||
{ PDR2SRAM, "PDR2SRAM", 0x0CF0000000000000 },
|
||||
{ WBINVD, "WBINVD", 0x09090909090990F0 },
|
||||
{ SRAMACCESS, "SRAMACCESS", 0x0000000E9D660000ULL },
|
||||
{ SRAM2PDR, "SRAM2PDR", 0x4CF0000000000000ULL },
|
||||
{ PDR2SRAM, "PDR2SRAM", 0x0CF0000000000000ULL },
|
||||
{ WBINVD, "WBINVD", 0x09090909090990F0ULL },
|
||||
};
|
||||
|
||||
bool check_not_halted(const struct target *t)
|
||||
|
|
|
@ -29,7 +29,7 @@
|
|||
#undef LOWER16
|
||||
#define UPPER16(v) ((uint32_t)((v >> 16) & 0xFFFF))
|
||||
#define LOWER16(v) ((uint32_t)(v & 0xFFFF))
|
||||
#define MIPS64_PRACC_FASTDATA_AREA 0xffffffffFF200000
|
||||
#define MIPS64_PRACC_FASTDATA_AREA 0xffffffffFF200000ull
|
||||
#define MIPS64_PRACC_FASTDATA_SIZE 16
|
||||
#define MIPS64_FASTDATA_HANDLER_SIZE 0x80
|
||||
|
||||
|
|
Loading…
Reference in New Issue