Changeset View
Changeset View
Standalone View
Standalone View
sys/arm64/arm64/identcpu.c
| Show First 20 Lines • Show All 2,520 Lines • ▼ Show 20 Lines | get_kernel_reg_iss(u_int iss, uint64_t *val) | ||||
| for (i = 0; i < nitems(user_regs); i++) { | for (i = 0; i < nitems(user_regs); i++) { | ||||
| if (user_regs[i].iss == iss) { | if (user_regs[i].iss == iss) { | ||||
| *val = CPU_DESC_FIELD(kern_cpu_desc, i); | *val = CPU_DESC_FIELD(kern_cpu_desc, i); | ||||
| return (true); | return (true); | ||||
| } | } | ||||
| } | } | ||||
| return (false); | panic("%s: Invalid register %x", __func__, iss); | ||||
| } | } | ||||
| /* | /* | ||||
| * Fetch the specified register's value, ensuring that individual field values | * Fetch the specified register's value, ensuring that individual field values | ||||
| * do not exceed those in the mask. | * do not exceed those in the mask. | ||||
| */ | */ | ||||
| bool | bool | ||||
| get_kernel_reg_iss_masked(u_int iss, uint64_t *valp, uint64_t mask) | get_kernel_reg_iss_masked(u_int iss, uint64_t *valp, uint64_t mask) | ||||
| Show All 10 Lines | if (user_regs[i].iss == iss) { | ||||
| fields[j].type, val, fields[j].width, | fields[j].type, val, fields[j].width, | ||||
| fields[j].shift, fields[j].sign); | fields[j].shift, fields[j].sign); | ||||
| } | } | ||||
| *valp = mask; | *valp = mask; | ||||
| return (true); | return (true); | ||||
| } | } | ||||
| } | } | ||||
| return (false); | panic("%s: Invalid register %x", __func__, iss); | ||||
| } | } | ||||
| bool | bool | ||||
| get_user_reg_iss(u_int iss, uint64_t *val, bool fbsd) | get_user_reg_iss(u_int iss, uint64_t *val, bool fbsd) | ||||
| { | { | ||||
| int i; | int i; | ||||
| for (i = 0; i < nitems(user_regs); i++) { | for (i = 0; i < nitems(user_regs); i++) { | ||||
| ▲ Show 20 Lines • Show All 870 Lines • Show Last 20 Lines | |||||