Merge branch 'riscv' of g.csail.mit.edu:xv6-dev into riscv
This commit is contained in:
commit
e1a2cd59fa
11 changed files with 26 additions and 23 deletions
|
@ -1,7 +1,7 @@
|
|||
# qemu -kernel starts at 0x1000. the instructions
|
||||
# there seem to be provided by qemu, as if it
|
||||
# were a ROM. the code at 0x1000 jumps to
|
||||
# 0x8000000, the _start function here,
|
||||
# 0x80000000, the _start function here,
|
||||
# in machine mode. each CPU starts here.
|
||||
.section .data
|
||||
.globl stack0
|
||||
|
|
|
@ -183,13 +183,13 @@ proc_freepagetable(pagetable_t pagetable, uint64 sz)
|
|||
// a user program that calls exec("/init")
|
||||
// od -t xC initcode
|
||||
uchar initcode[] = {
|
||||
0x17, 0x05, 0x00, 0x00, 0x13, 0x05, 0x05, 0x02,
|
||||
0x97, 0x05, 0x00, 0x00, 0x93, 0x85, 0x05, 0x02,
|
||||
0x9d, 0x48, 0x73, 0x00, 0x00, 0x00, 0x89, 0x48,
|
||||
0x73, 0x00, 0x00, 0x00, 0xef, 0xf0, 0xbf, 0xff,
|
||||
0x2f, 0x69, 0x6e, 0x69, 0x74, 0x00, 0x00, 0x01,
|
||||
0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00
|
||||
0x17, 0x05, 0x00, 0x00, 0x13, 0x05, 0x45, 0x02,
|
||||
0x97, 0x05, 0x00, 0x00, 0x93, 0x85, 0x35, 0x02,
|
||||
0x93, 0x08, 0x70, 0x00, 0x73, 0x00, 0x00, 0x00,
|
||||
0x93, 0x08, 0x20, 0x00, 0x73, 0x00, 0x00, 0x00,
|
||||
0xef, 0xf0, 0x9f, 0xff, 0x2f, 0x69, 0x6e, 0x69,
|
||||
0x74, 0x00, 0x00, 0x24, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00
|
||||
};
|
||||
|
||||
// Set up first user process.
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
//
|
||||
// ramdisk that uses the disk image loaded by qemu -rdinit fs.img
|
||||
// ramdisk that uses the disk image loaded by qemu -initrd fs.img
|
||||
//
|
||||
|
||||
#include "types.h"
|
||||
|
|
|
@ -264,6 +264,7 @@ virtio_disk_intr()
|
|||
|
||||
disk.used_idx = (disk.used_idx + 1) % NUM;
|
||||
}
|
||||
*R(VIRTIO_MMIO_INTERRUPT_ACK) = *R(VIRTIO_MMIO_INTERRUPT_STATUS) & 0x3;
|
||||
|
||||
release(&disk.vdisk_lock);
|
||||
}
|
||||
|
|
|
@ -65,9 +65,9 @@ kvminithart()
|
|||
// A 64-bit virtual address is split into five fields:
|
||||
// 39..63 -- must be zero.
|
||||
// 30..38 -- 9 bits of level-2 index.
|
||||
// 21..39 -- 9 bits of level-1 index.
|
||||
// 21..29 -- 9 bits of level-1 index.
|
||||
// 12..20 -- 9 bits of level-0 index.
|
||||
// 0..12 -- 12 bits of byte offset within the page.
|
||||
// 0..11 -- 12 bits of byte offset within the page.
|
||||
pte_t *
|
||||
walk(pagetable_t pagetable, uint64 va, int alloc)
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue