Changeset View
Changeset View
Standalone View
Standalone View
sys/cddl/dev/fbt/aarch64/fbt_isa.c
Show First 20 Lines • Show All 90 Lines • ▼ Show 20 Lines | fbt_provide_module_function(linker_file_t lf, int symindx, | ||||
modname = opaque; | modname = opaque; | ||||
name = symval->name; | name = symval->name; | ||||
/* Check if function is excluded from instrumentation */ | /* Check if function is excluded from instrumentation */ | ||||
if (fbt_excluded(name)) | if (fbt_excluded(name)) | ||||
return (0); | return (0); | ||||
/* | |||||
* Instrumenting certain exception handling functions can lead to FBT | |||||
* recursion, so exclude from instrumentation. | |||||
*/ | |||||
if (strcmp(name, "handle_el1h_sync") == 0 || | |||||
strcmp(name, "do_el1h_sync") == 0) | |||||
return (1); | |||||
instr = (uint32_t *)(symval->value); | instr = (uint32_t *)(symval->value); | ||||
limit = (uint32_t *)(symval->value + symval->size); | limit = (uint32_t *)(symval->value + symval->size); | ||||
/* Look for stp (pre-indexed) operation */ | /* Look for stp (pre-indexed) operation */ | ||||
for (; instr < limit; instr++) { | for (; instr < limit; instr++) { | ||||
if ((*instr & LDP_STP_MASK) == STP_64) | if ((*instr & LDP_STP_MASK) == STP_64) | ||||
break; | break; | ||||
} | } | ||||
▲ Show 20 Lines • Show All 71 Lines • Show Last 20 Lines |