riscv: De-Arm a few names
These names were inherited from the arm64 port and should be changed to the RISC-V terminology. Reviewed by: jhb (mentor), kp, markj Approved by: jhb (mentor), kp, markj Differential Revision: https://reviews.freebsd.org/D26671
This commit is contained in:
parent
b954d81662
commit
da8944d96d
@ -40,12 +40,12 @@ __FBSDID("$FreeBSD$");
|
||||
#include <machine/trap.h>
|
||||
#include <machine/riscvreg.h>
|
||||
|
||||
.macro save_registers el
|
||||
.macro save_registers mode
|
||||
addi sp, sp, -(TF_SIZE)
|
||||
|
||||
sd ra, (TF_RA)(sp)
|
||||
|
||||
.if \el == 0 /* We came from userspace. */
|
||||
.if \mode == 0 /* We came from userspace. */
|
||||
sd gp, (TF_GP)(sp)
|
||||
.option push
|
||||
.option norelax
|
||||
@ -88,7 +88,7 @@ __FBSDID("$FreeBSD$");
|
||||
sd a6, (TF_A + 6 * 8)(sp)
|
||||
sd a7, (TF_A + 7 * 8)(sp)
|
||||
|
||||
.if \el == 1
|
||||
.if \mode == 1
|
||||
/* Store kernel sp */
|
||||
li t1, TF_SIZE
|
||||
add t0, sp, t1
|
||||
@ -110,9 +110,9 @@ __FBSDID("$FreeBSD$");
|
||||
sd t0, (TF_SCAUSE)(sp)
|
||||
.endm
|
||||
|
||||
.macro load_registers el
|
||||
.macro load_registers mode
|
||||
ld t0, (TF_SSTATUS)(sp)
|
||||
.if \el == 0
|
||||
.if \mode == 0
|
||||
/* Ensure user interrupts will be enabled on eret */
|
||||
li t1, SSTATUS_SPIE
|
||||
or t0, t0, t1
|
||||
@ -130,7 +130,7 @@ __FBSDID("$FreeBSD$");
|
||||
ld t0, (TF_SEPC)(sp)
|
||||
csrw sepc, t0
|
||||
|
||||
.if \el == 0
|
||||
.if \mode == 0
|
||||
/* We go to userspace. Load user sp */
|
||||
ld t0, (TF_SP)(sp)
|
||||
csrw sscratch, t0
|
||||
|
@ -158,7 +158,7 @@ dump_regs(struct trapframe *frame)
|
||||
}
|
||||
|
||||
static void
|
||||
svc_handler(struct trapframe *frame)
|
||||
ecall_handler(struct trapframe *frame)
|
||||
{
|
||||
struct thread *td;
|
||||
|
||||
@ -172,7 +172,7 @@ svc_handler(struct trapframe *frame)
|
||||
}
|
||||
|
||||
static void
|
||||
data_abort(struct trapframe *frame, int usermode)
|
||||
page_fault_handler(struct trapframe *frame, int usermode)
|
||||
{
|
||||
struct vm_map *map;
|
||||
uint64_t stval;
|
||||
@ -290,7 +290,7 @@ do_trap_supervisor(struct trapframe *frame)
|
||||
break;
|
||||
case EXCP_STORE_PAGE_FAULT:
|
||||
case EXCP_LOAD_PAGE_FAULT:
|
||||
data_abort(frame, 0);
|
||||
page_fault_handler(frame, 0);
|
||||
break;
|
||||
case EXCP_BREAKPOINT:
|
||||
#ifdef KDTRACE_HOOKS
|
||||
@ -353,11 +353,11 @@ do_trap_user(struct trapframe *frame)
|
||||
case EXCP_STORE_PAGE_FAULT:
|
||||
case EXCP_LOAD_PAGE_FAULT:
|
||||
case EXCP_INST_PAGE_FAULT:
|
||||
data_abort(frame, 1);
|
||||
page_fault_handler(frame, 1);
|
||||
break;
|
||||
case EXCP_USER_ECALL:
|
||||
frame->tf_sepc += 4; /* Next instruction */
|
||||
svc_handler(frame);
|
||||
ecall_handler(frame);
|
||||
break;
|
||||
case EXCP_ILLEGAL_INSTRUCTION:
|
||||
#ifdef FPE
|
||||
|
Loading…
Reference in New Issue
Block a user