mstart -> start

This commit is contained in:
Robert Morris 2019-07-23 14:31:12 -04:00
parent 54178ad94d
commit 936afc6e1a
3 changed files with 5 additions and 7 deletions

View file

@ -6,7 +6,7 @@
.section .data
.globl stack0
.section .text
.globl mstart
.globl start
.section .text
.globl _entry
_entry:
@ -20,7 +20,7 @@ _entry:
addi a1, a1, 1
mul a0, a0, a1
add sp, sp, a0
# jump to mstart() in start.c
call mstart
# jump to start() in start.c
call start
junk:
j junk

View file

@ -6,9 +6,7 @@
volatile static int started = 0;
// Bootstrap processor starts running C code here.
// Allocate a real stack and switch to it, first
// doing some setup required for memory allocator to work.
// start() jumps here in supervisor mode on all CPUs.
void
main()
{

View file

@ -17,7 +17,7 @@ extern void machinevec();
// entry.S jumps here in machine mode on stack0.
void
mstart()
start()
{
// set M Previous Privilege mode to Supervisor, for mret.
unsigned long x = r_mstatus();