Compare commits

..

No commits in common. "146e7f65ca5e0076fac2560c02062bfb805a3144" and "ced7c79bd81372f01354dfd36d913b00dee6520c" have entirely different histories.

5 changed files with 2 additions and 10 deletions

View file

@ -30,11 +30,10 @@ main()
} else {
while(started == 0) {}
__sync_synchronize();
printf("Hart/Core [%d]: Starting\n", cpuid());
printf("hart %d starting\n", cpuid());
kvminithart(); // turn on paging
trapinithart(); // install kernel trap vector
plicinithart(); // ask PLIC for device interrupts
printf("Hart/Core [%d]: Online\n", cpuid());
}
scheduler();

View file

@ -23,8 +23,6 @@
#define UART0 0x10000000L
#define UART0_IRQ 10
#define QEMU_POWER 0x100000
// virtio mmio interface
#define VIRTIO0 0x10001000
#define VIRTIO0_IRQ 1

View file

@ -100,6 +100,5 @@ sys_trace(void)
void
sys_halt(void)
{
(*(volatile u32 *)QEMU_POWER) = 0x5555;
panic("sys_poweroff");
/* TODO: Implement sys_halt */
}

View file

@ -21,9 +21,6 @@ kvmmake(void)
kpgtbl = (pagetable_t)kalloc();
memset(kpgtbl, 0, PGSIZE);
// Map qemu
kvmmap(kpgtbl, QEMU_POWER, QEMU_POWER, PGSIZE, PTE_R | PTE_W);
// uart registers
kvmmap(kpgtbl, UART0, UART0, PGSIZE, PTE_R | PTE_W);

View file

@ -4,7 +4,6 @@
int
main(int argc, char *argv[])
{
printf("System powering down...\n");
halt();
return 0;
}