[platform][riscv] add code to read the size of memory from the FDT

Tweak the novm allocator to let us more easily add a variable sized
arena at boot.

Also added code to trap secondary cpus and reenable the use of WFI
instruction.
This commit is contained in:
Travis Geiselbrecht
2019-11-02 18:13:02 -07:00
parent 5928d88a0e
commit bff17f7e99
5 changed files with 78 additions and 8 deletions

View File

@@ -40,7 +40,9 @@ void arch_init(void) {
void arch_idle(void) {
// disabled for now, QEMU seems to have some trouble emulating wfi properly
// also have trouble breaking into sifive-e board with openocd when wfi
// __asm__ volatile("wfi");
// NOTE: reenabling for now, will need to re-test on sifive board to see if this
// problem went away.
__asm__ volatile("wfi");
}
void arch_chain_load(void *entry, ulong arg0, ulong arg1, ulong arg2, ulong arg3) {