From ffcb883adff508497f71fae6ca72a8fa70483edc Mon Sep 17 00:00:00 2001 From: Fumiya Shigemitsu Date: Mon, 21 Oct 2019 21:01:07 +0900 Subject: Fix minor typos --- kernel/vm.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/kernel/vm.c b/kernel/vm.c index 4f65d4e..636f11a 100644 --- a/kernel/vm.c +++ b/kernel/vm.c @@ -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) { -- cgit v1.2.3 From b557e7c32e935b9bb2f5d8ed8503de52f43cf87f Mon Sep 17 00:00:00 2001 From: Jonathan Kimmitt Date: Thu, 16 Jan 2020 15:05:27 +0000 Subject: Update ramdisk.c The qemu syntax for a ram disk was documented incorrectly. The documented syntax is here: https://qemu.weilnetz.de/doc/qemu-doc.html --- kernel/ramdisk.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kernel/ramdisk.c b/kernel/ramdisk.c index 9901294..eb60ee7 100644 --- a/kernel/ramdisk.c +++ b/kernel/ramdisk.c @@ -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" -- cgit v1.2.3 From 9eff4b0871ca68376bc409c991fbce414e700921 Mon Sep 17 00:00:00 2001 From: Takahiro Date: Sat, 18 Apr 2020 14:49:54 -0700 Subject: Write interrupt ack register in virtio_disk_intr() --- kernel/virtio_disk.c | 1 + 1 file changed, 1 insertion(+) diff --git a/kernel/virtio_disk.c b/kernel/virtio_disk.c index 3cff024..06e0645 100644 --- a/kernel/virtio_disk.c +++ b/kernel/virtio_disk.c @@ -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); } -- cgit v1.2.3 From c24844714bf68feb8965c16be6ad9c82e27cc530 Mon Sep 17 00:00:00 2001 From: Asami Doi Date: Fri, 20 Mar 2020 12:33:32 +0900 Subject: update initcode to avoid using the compressed extension --- kernel/proc.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/kernel/proc.c b/kernel/proc.c index cf7f260..417e30a 100644 --- a/kernel/proc.c +++ b/kernel/proc.c @@ -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. -- cgit v1.2.3 From f14aa421c456875fbb5fff0ef2f5c4154f11e38d Mon Sep 17 00:00:00 2001 From: Frans Kaashoek Date: Mon, 10 Aug 2020 13:55:26 -0400 Subject: Generate initcode without compressed extensions --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 96f1c14..a85add2 100644 --- a/Makefile +++ b/Makefile @@ -79,7 +79,7 @@ $K/kernel: $(OBJS) $K/kernel.ld $U/initcode $(OBJDUMP) -t $K/kernel | sed '1,/SYMBOL TABLE/d; s/ .* / /; /^$$/d' > $K/kernel.sym $U/initcode: $U/initcode.S - $(CC) $(CFLAGS) -nostdinc -I. -Ikernel -c $U/initcode.S -o $U/initcode.o + $(CC) $(CFLAGS) -march=rv64g -nostdinc -I. -Ikernel -c $U/initcode.S -o $U/initcode.o $(LD) $(LDFLAGS) -N -e start -Ttext 0 -o $U/initcode.out $U/initcode.o $(OBJCOPY) -S -O binary $U/initcode.out $U/initcode $(OBJDUMP) -S $U/initcode.o > $U/initcode.asm -- cgit v1.2.3 From 2db95f08b14f2779a31cb9e3e830f762f36f2660 Mon Sep 17 00:00:00 2001 From: Frans Kaashoek Date: Mon, 10 Aug 2020 16:25:51 -0400 Subject: Typo (thanks yt ) --- kernel/entry.S | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kernel/entry.S b/kernel/entry.S index ef5a56a..62fe1f2 100644 --- a/kernel/entry.S +++ b/kernel/entry.S @@ -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 -- cgit v1.2.3 From 737bd3a55d9380906f097f1d82d47fe2b23bf486 Mon Sep 17 00:00:00 2001 From: Frans Kaashoek Date: Mon, 10 Aug 2020 16:42:33 -0400 Subject: Ack bug finders. --- README | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/README b/README index 87a3833..38e6f5f 100644 --- a/README +++ b/README @@ -15,15 +15,17 @@ Clements. We are also grateful for the bug reports and patches contributed by Silas Boyd-Wickizer, Anton Burtsev, Dan Cross, Cody Cutler, Mike CAT, -Tej Chajed, eyalz800, Nelson Elhage, Saar Ettinger, Alice Ferrazzi, -Nathaniel Filardo, Peter Froehlich, Yakir Goaron,Shivam Handa, Bryan -Henry, Jim Huang, Alexander Kapshuk, Anders Kaseorg, kehao95, Wolfgang -Keller, Eddie Kohler, Austin Liew, Imbar Marinescu, Yandong Mao, Matan -Shabtay, Hitoshi Mitake, Carmi Merimovich, Mark Morrissey, mtasm, Joel -Nider, Greg Price, Ayan Shafqat, Eldar Sehayek, Yongming Shen, Cam -Tenny, tyfkda, Rafael Ubal, Warren Toomey, Stephen Tu, Pablo Ventura, -Xi Wang, Keiichi Watanabe, Nicolas Wolovick, wxdao, Grant Wu, Jindong -Zhang, Icenowy Zheng, and Zou Chang Wei. +Tej Chajed, Asami Doi, eyalz800, , Nelson Elhage, Saar Ettinger, Alice +Ferrazzi, Nathaniel Filardo, Peter Froehlich, Yakir Goaron,Shivam +Handa, Bryan Henry, jaichenhengjie, Jim Huang, Alexander Kapshuk, +Anders Kaseorg, kehao95, Wolfgang Keller, Jonathan Kimmitt, Eddie +Kohler, Austin Liew, Imbar Marinescu, Yandong Mao, Matan Shabtay, +Hitoshi Mitake, Carmi Merimovich, Mark Morrissey, mtasm, Joel Nider, +Greg Price, Ayan Shafqat, Eldar Sehayek, Yongming Shen, Fumiya +Shigemitsu, Takahiro, Cam Tenny, tyfkda, Rafael Ubal, Warren Toomey, +Stephen Tu, Pablo Ventura, Xi Wang, Keiichi Watanabe, Nicolas +Wolovick, wxdao, Grant Wu, Jindong Zhang, Icenowy Zheng, and Zou Chang +Wei. The code in the files that constitute xv6 is Copyright 2006-2019 Frans Kaashoek, Robert Morris, and Russ Cox. -- cgit v1.2.3 From 468946781fd551d69252f13a41ffc77c5e30fae9 Mon Sep 17 00:00:00 2001 From: Frans Kaashoek Date: Mon, 10 Aug 2020 19:41:57 -0400 Subject: copyright and 6.S081 --- README | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README b/README index 38e6f5f..06035bb 100644 --- a/README +++ b/README @@ -28,13 +28,13 @@ Wolovick, wxdao, Grant Wu, Jindong Zhang, Icenowy Zheng, and Zou Chang Wei. The code in the files that constitute xv6 is -Copyright 2006-2019 Frans Kaashoek, Robert Morris, and Russ Cox. +Copyright 2006-2020 Frans Kaashoek, Robert Morris, and Russ Cox. ERROR REPORTS Please send errors and suggestions to Frans Kaashoek and Robert Morris (kaashoek,rtm@mit.edu). The main purpose of xv6 is as a teaching -operating system for MIT's 6.828, so we are more interested in +operating system for MIT's 6.S081, so we are more interested in simplifications and clarifications than new features. BUILDING AND RUNNING XV6 -- cgit v1.2.3 From 315c37c0f1e7c05f7b7d0ec145a2002b0612c49c Mon Sep 17 00:00:00 2001 From: Frans Kaashoek Date: Mon, 10 Aug 2020 20:28:12 -0400 Subject: Update to the latest specs --- doc/riscv-privileged-20190608-1.pdf | Bin 0 -> 533858 bytes doc/riscv-privileged-v1.10.pdf | Bin 536816 -> 0 bytes doc/riscv-spec-20191213.pdf | Bin 0 -> 1021610 bytes doc/riscv-spec-v2.2.pdf | Bin 615016 -> 0 bytes 4 files changed, 0 insertions(+), 0 deletions(-) create mode 100644 doc/riscv-privileged-20190608-1.pdf delete mode 100644 doc/riscv-privileged-v1.10.pdf create mode 100644 doc/riscv-spec-20191213.pdf delete mode 100644 doc/riscv-spec-v2.2.pdf diff --git a/doc/riscv-privileged-20190608-1.pdf b/doc/riscv-privileged-20190608-1.pdf new file mode 100644 index 0000000..2303a01 Binary files /dev/null and b/doc/riscv-privileged-20190608-1.pdf differ diff --git a/doc/riscv-privileged-v1.10.pdf b/doc/riscv-privileged-v1.10.pdf deleted file mode 100644 index 6942fe7..0000000 Binary files a/doc/riscv-privileged-v1.10.pdf and /dev/null differ diff --git a/doc/riscv-spec-20191213.pdf b/doc/riscv-spec-20191213.pdf new file mode 100644 index 0000000..533c1cb Binary files /dev/null and b/doc/riscv-spec-20191213.pdf differ diff --git a/doc/riscv-spec-v2.2.pdf b/doc/riscv-spec-v2.2.pdf deleted file mode 100644 index e4a4634..0000000 Binary files a/doc/riscv-spec-v2.2.pdf and /dev/null differ -- cgit v1.2.3