Merge branch 'riscv' of g.csail.mit.edu:xv6-dev into riscv
This commit is contained in:
commit
af9abaca05
|
@ -31,7 +31,6 @@ extern struct cpu cpus[NCPU];
|
||||||
// per-process data for the trap handling code in trampoline.S.
|
// per-process data for the trap handling code in trampoline.S.
|
||||||
// sits in a page by itself just under the trampoline page in the
|
// sits in a page by itself just under the trampoline page in the
|
||||||
// user page table. not specially mapped in the kernel page table.
|
// user page table. not specially mapped in the kernel page table.
|
||||||
// the sscratch register points here.
|
|
||||||
// uservec in trampoline.S saves user registers in the trapframe,
|
// uservec in trampoline.S saves user registers in the trapframe,
|
||||||
// then initializes registers from the trapframe's
|
// then initializes registers from the trapframe's
|
||||||
// kernel_sp, kernel_hartid, kernel_satp, and jumps to kernel_trap.
|
// kernel_sp, kernel_hartid, kernel_satp, and jumps to kernel_trap.
|
||||||
|
|
|
@ -217,13 +217,6 @@ r_satp()
|
||||||
return x;
|
return x;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Supervisor Scratch register, for early trap handler in trampoline.S.
|
|
||||||
static inline void
|
|
||||||
w_sscratch(uint64 x)
|
|
||||||
{
|
|
||||||
asm volatile("csrw sscratch, %0" : : "r" (x));
|
|
||||||
}
|
|
||||||
|
|
||||||
static inline void
|
static inline void
|
||||||
w_mscratch(uint64 x)
|
w_mscratch(uint64 x)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue