/* The general idea here is that the copyout must happen in * exactly the same order in which the userspace expects these * regs. Now, the sequence in userspace does not match the * sequence in the kernel, so everything past the 32 gprs * happens one at a time.
*/
membuf_write(&to, ®s->r00, 32*sizeof(unsignedlong)); /* Must be exactly same sequence as struct user_regs_struct */
membuf_store(&to, regs->sa0);
membuf_store(&to, regs->lc0);
membuf_store(&to, regs->sa1);
membuf_store(&to, regs->lc1);
membuf_store(&to, regs->m0);
membuf_store(&to, regs->m1);
membuf_store(&to, regs->usr);
membuf_store(&to, regs->preds);
membuf_store(&to, regs->gp);
membuf_store(&to, regs->ugp);
membuf_store(&to, pt_elr(regs)); // pc
membuf_store(&to, (unsignedlong)pt_cause(regs)); // cause
membuf_store(&to, pt_badva(regs)); // badva #if CONFIG_HEXAGON_ARCH_VERSION >=4
membuf_store(&to, regs->cs0);
membuf_store(&to, regs->cs1); return membuf_zero(&to, sizeof(unsignedlong)); #else return membuf_zero(&to, 3 * sizeof(unsignedlong)); #endif
}
/* Ignore the rest, if needed */ if (!ret)
user_regset_copyin_ignore(&pos, &count, &kbuf, &ubuf,
ignore_offset, -1); else return ret;
/* * This is special; SP is actually restored by the VM via the * special event record which is set by the special trap.
*/
regs->hvmer.vmpsp = regs->r29; return 0;
}
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.