From 77816723f1afd2a3b8ed21bd6aa7151fa15eeb95 Mon Sep 17 00:00:00 2001 From: James Foster Date: Wed, 8 Apr 2020 20:21:51 -0700 Subject: [PATCH 1/4] Correct filename in comment. --- boot.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/boot.cc b/boot.cc index 5909750..ade3d96 100644 --- a/boot.cc +++ b/boot.cc @@ -14,7 +14,7 @@ // the boot device (hard drive) into memory at address 0x7C00, and jumps to // that address. // -// The boot loader is contained in bootstart.S and boot.c. Control starts +// The boot loader is contained in bootstart.S and boot.cc. Control starts // in bootstart.S, which initializes the CPU and sets up a stack, then // transfers here. This code reads in the kernel image and calls the // kernel. From dde9f04daba0063db47af58edc6d2e0c237fdb87 Mon Sep 17 00:00:00 2001 From: James Foster Date: Sun, 26 Apr 2020 11:02:37 -0700 Subject: [PATCH 2/4] Remove comments that seem wrong or no longer apply. --- lib.hh | 2 -- 1 file changed, 2 deletions(-) diff --git a/lib.hh b/lib.hh index 08f3adb..899196f 100644 --- a/lib.hh +++ b/lib.hh @@ -249,7 +249,6 @@ struct bitset_view { // System call numbers (passed in `%rax` at `syscall` time) -// Used in pset 1: #define SYSCALL_GETPID 1 #define SYSCALL_YIELD 2 #define SYSCALL_PAUSE 3 @@ -257,7 +256,6 @@ struct bitset_view { #define SYSCALL_PANIC 5 #define SYSCALL_PAGE_ALLOC 6 #define SYSCALL_FORK 7 -// Used in later psets: #define SYSCALL_EXIT 8 #define SYSCALL_READ 9 #define SYSCALL_WRITE 10 From f31fc1d67734d7b7383c84c4e5a8dba9e08047bf Mon Sep 17 00:00:00 2001 From: James Foster Date: Mon, 4 May 2020 10:45:45 -0700 Subject: [PATCH 3/4] Update name of default application. --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 4cf9b83..ce71e8d 100644 --- a/README.md +++ b/README.md @@ -22,7 +22,7 @@ and CPU resets to the standard error. This setting will also cause QEMU to quit after encountering a [triple fault][] (normally it will reboot). `make run-PROGRAM` runs `p-PROGRAM.cc` as the first non-init process. The -default is `alloc`. +default is `allocator`. `make HALT=1 run-PROGRAM` should make QEMU exit once all processes are done. From b290590c0be2c7949161ca7b449ee6c354e3a5d7 Mon Sep 17 00:00:00 2001 From: James Foster Date: Tue, 5 May 2020 17:19:15 -0700 Subject: [PATCH 4/4] Identify some issues with running an alternate process. --- README.md | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index ce71e8d..a699545 100644 --- a/README.md +++ b/README.md @@ -22,7 +22,11 @@ and CPU resets to the standard error. This setting will also cause QEMU to quit after encountering a [triple fault][] (normally it will reboot). `make run-PROGRAM` runs `p-PROGRAM.cc` as the first non-init process. The -default is `allocator`. +default is `allocator`. If you choose an alternate first process, note a +couple things: + +* An initial process like p-testkalloc.cc calls panic(), but without a console this gives a [page fault](https://github.com/CS161/chickadee/issues/14). +* build/chickadee.gdb is hard-coded to load symbols for p-allocator.cc, so this file must be [modified](https://github.com/CS161/chickadee/issues/13) if you want to debug an alternate process. `make HALT=1 run-PROGRAM` should make QEMU exit once all processes are done.