mstart -> start
This commit is contained in:
parent
54178ad94d
commit
936afc6e1a
|
@ -6,7 +6,7 @@
|
||||||
.section .data
|
.section .data
|
||||||
.globl stack0
|
.globl stack0
|
||||||
.section .text
|
.section .text
|
||||||
.globl mstart
|
.globl start
|
||||||
.section .text
|
.section .text
|
||||||
.globl _entry
|
.globl _entry
|
||||||
_entry:
|
_entry:
|
||||||
|
@ -20,7 +20,7 @@ _entry:
|
||||||
addi a1, a1, 1
|
addi a1, a1, 1
|
||||||
mul a0, a0, a1
|
mul a0, a0, a1
|
||||||
add sp, sp, a0
|
add sp, sp, a0
|
||||||
# jump to mstart() in start.c
|
# jump to start() in start.c
|
||||||
call mstart
|
call start
|
||||||
junk:
|
junk:
|
||||||
j junk
|
j junk
|
||||||
|
|
|
@ -6,9 +6,7 @@
|
||||||
|
|
||||||
volatile static int started = 0;
|
volatile static int started = 0;
|
||||||
|
|
||||||
// Bootstrap processor starts running C code here.
|
// start() jumps here in supervisor mode on all CPUs.
|
||||||
// Allocate a real stack and switch to it, first
|
|
||||||
// doing some setup required for memory allocator to work.
|
|
||||||
void
|
void
|
||||||
main()
|
main()
|
||||||
{
|
{
|
||||||
|
|
|
@ -17,7 +17,7 @@ extern void machinevec();
|
||||||
|
|
||||||
// entry.S jumps here in machine mode on stack0.
|
// entry.S jumps here in machine mode on stack0.
|
||||||
void
|
void
|
||||||
mstart()
|
start()
|
||||||
{
|
{
|
||||||
// set M Previous Privilege mode to Supervisor, for mret.
|
// set M Previous Privilege mode to Supervisor, for mret.
|
||||||
unsigned long x = r_mstatus();
|
unsigned long x = r_mstatus();
|
||||||
|
|
Loading…
Reference in a new issue