Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F166504087
D26671.id77881.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
2 KB
Referenced Files
None
Subscribers
None
D26671.id77881.diff
View Options
Index: sys/riscv/riscv/exception.S
===================================================================
--- sys/riscv/riscv/exception.S
+++ sys/riscv/riscv/exception.S
@@ -40,12 +40,12 @@
#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 @@
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 @@
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 @@
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
Index: sys/riscv/riscv/trap.c
===================================================================
--- sys/riscv/riscv/trap.c
+++ sys/riscv/riscv/trap.c
@@ -158,7 +158,7 @@
}
static void
-svc_handler(struct trapframe *frame)
+ecall_handler(struct trapframe *frame)
{
struct thread *td;
@@ -170,7 +170,7 @@
}
static void
-data_abort(struct trapframe *frame, int usermode)
+page_fault_handler(struct trapframe *frame, int usermode)
{
struct vm_map *map;
uint64_t stval;
@@ -288,7 +288,7 @@
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
@@ -351,11 +351,11 @@
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
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Fri, Aug 14, 8:52 PM (2 h, 35 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
36764215
Default Alt Text
D26671.id77881.diff (2 KB)
Attached To
Mode
D26671: riscv: De-Arm a couple of names
Attached
Detach File
Event Timeline
Log In to Comment