|
@@ -210,6 +210,40 @@ int aarch64_gdb_set_sve_reg(CPUARMState *env, uint8_t *buf, int reg)
|
|
|
return 0;
|
|
|
}
|
|
|
|
|
|
+int aarch64_gdb_get_pauth_reg(CPUARMState *env, GByteArray *buf, int reg)
|
|
|
+{
|
|
|
+ switch (reg) {
|
|
|
+ case 0: /* pauth_dmask */
|
|
|
+ case 1: /* pauth_cmask */
|
|
|
+ case 2: /* pauth_dmask_high */
|
|
|
+ case 3: /* pauth_cmask_high */
|
|
|
+ /*
|
|
|
+ * Note that older versions of this feature only contained
|
|
|
+ * pauth_{d,c}mask, for use with Linux user processes, and
|
|
|
+ * thus exclusively in the low half of the address space.
|
|
|
+ *
|
|
|
+ * To support system mode, and to debug kernels, two new regs
|
|
|
+ * were added to cover the high half of the address space.
|
|
|
+ * For the purpose of pauth_ptr_mask, we can use any well-formed
|
|
|
+ * address within the address space half -- here, 0 and -1.
|
|
|
+ */
|
|
|
+ {
|
|
|
+ bool is_data = !(reg & 1);
|
|
|
+ bool is_high = reg & 2;
|
|
|
+ uint64_t mask = pauth_ptr_mask(env, -is_high, is_data);
|
|
|
+ return gdb_get_reg64(buf, mask);
|
|
|
+ }
|
|
|
+ default:
|
|
|
+ return 0;
|
|
|
+ }
|
|
|
+}
|
|
|
+
|
|
|
+int aarch64_gdb_set_pauth_reg(CPUARMState *env, uint8_t *buf, int reg)
|
|
|
+{
|
|
|
+ /* All pseudo registers are read-only. */
|
|
|
+ return 0;
|
|
|
+}
|
|
|
+
|
|
|
static void output_vector_union_type(GString *s, int reg_width,
|
|
|
const char *name)
|
|
|
{
|