a few core -> CPU
get rid of PDF generating support
This commit is contained in:
parent
b8a31c494c
commit
55bc96d419
10 changed files with 7 additions and 560 deletions
|
@ -2,7 +2,7 @@
|
|||
# there seem to be provided by qemu, as if it
|
||||
# were a ROM. the code at 0x1000 jumps to
|
||||
# 0x8000000, the _start function here,
|
||||
# in machine mode.
|
||||
# in machine mode. each CPU starts here.
|
||||
.section .data
|
||||
.globl stack0
|
||||
.section .text
|
||||
|
@ -11,8 +11,9 @@
|
|||
.globl _entry
|
||||
_entry:
|
||||
# set up a stack for C.
|
||||
# stack0 is declared in start,
|
||||
# with 4096 bytes per CPU.
|
||||
# stack0 is declared in start.c,
|
||||
# with a 4096-byte stack per CPU.
|
||||
# sp = stack0 + (hartid * 4096)
|
||||
la sp, stack0
|
||||
li a0, 1024*4
|
||||
csrr a1, mhartid
|
||||
|
|
|
@ -46,7 +46,7 @@ cpuid()
|
|||
return id;
|
||||
}
|
||||
|
||||
// Return this core's cpu struct.
|
||||
// Return this CPU's cpu struct.
|
||||
// Interrupts must be disabled.
|
||||
struct cpu*
|
||||
mycpu(void) {
|
||||
|
|
|
@ -52,7 +52,7 @@ release(struct spinlock *lk)
|
|||
|
||||
// Tell the C compiler and the CPU to not move loads or stores
|
||||
// past this point, to ensure that all the stores in the critical
|
||||
// section are visible to other cores before the lock is released.
|
||||
// section are visible to other CPUs before the lock is released.
|
||||
// On RISC-V, this turns into a fence instruction.
|
||||
__sync_synchronize();
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue