/* * On p10 predecessors, quadword is handle differently then * other instructions.
*/ if (!cpu_has_feature(CPU_FTR_ARCH_31) && size == 16)
align_size = HW_BREAKPOINT_SIZE_QUADWORD;
/* * If hw has multiple DAWR registers, we also need to check all * dawrx constraint bits to confirm this is _really_ a valid event. * If type is UNKNOWN, but privilege level matches, consider it as * a positive match.
*/ staticbool check_dawrx_constraints(struct pt_regs *regs, int type, struct arch_hw_breakpoint *info)
{ if (OP_IS_LOAD(type) && !(info->type & HW_BRK_TYPE_READ)) returnfalse;
/* * The Cache Management instructions other than dcbz never * cause a match. i.e. if type is CACHEOP, the instruction * is dcbz, and dcbz is treated as Store.
*/ if ((OP_IS_STORE(type) || type == CACHEOP) && !(info->type & HW_BRK_TYPE_WRITE)) returnfalse;
if (is_kernel_addr(regs->nip) && !(info->type & HW_BRK_TYPE_KERNEL)) returnfalse;
if (user_mode(regs) && !(info->type & HW_BRK_TYPE_USER)) returnfalse;
returntrue;
}
/* * Return true if the event is valid wrt dawr configuration, * including extraneous exception. Otherwise return false.
*/ bool wp_check_constraints(struct pt_regs *regs, ppc_inst_t instr, unsignedlong ea, int type, int size, struct arch_hw_breakpoint *info)
{ bool in_user_range = dar_in_user_range(regs->dar, info); bool dawrx_constraints;
/* * 8xx supports only one breakpoint and thus we can * unconditionally return true.
*/ if (IS_ENABLED(CONFIG_PPC_8xx)) { if (!in_user_range)
info->type |= HW_BRK_TYPE_EXTRANEOUS_IRQ; returntrue;
}
if (unlikely(ppc_inst_equal(instr, ppc_inst(0)))) { if (cpu_has_feature(CPU_FTR_ARCH_31) &&
!dar_in_hw_range(regs->dar, info)) returnfalse;
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.