182537b71Srtmxv6 is a re-implementation of Dennis Ritchie's and Ken Thompson's Unix 282537b71SrtmVersion 6 (v6). xv6 loosely follows the structure and style of v6, 382537b71Srtmbut is implemented for a modern x86-based multiprocessor using ANSI C. 4b52151e0Skaashoek 5bc54fa39SrtmACKNOWLEDGMENTS 62e898063Skaashoek 7f0400600Srscxv6 is inspired by John Lions's Commentary on UNIX 6th Edition (Peer 882537b71Srtmto Peer Communications; ISBN: 1-57398-013-7; 1st edition (June 14, 91cb183a9Srsc2000)). See also http://pdos.csail.mit.edu/6.828/2007/v6.html, which 1082537b71Srtmprovides pointers to on-line resources for v6. 11b52151e0Skaashoek 1282537b71Srtmxv6 borrows code from the following sources: 1382537b71Srtm JOS (asm.h, elf.h, mmu.h, bootasm.S, ide.c, console.c, and others) 14*82bb0b56SAustin Clements Plan 9 (entryother.S, mp.h, mp.c, lapic.c) 15801affcdSkaashoek FreeBSD (ioapic.c) 1682537b71Srtm NetBSD (console.c) 17801affcdSkaashoek 18801affcdSkaashoekThe following people made contributions: 19801affcdSkaashoek Russ Cox (context switching, locking) 20801affcdSkaashoek Cliff Frey (MP) 21801affcdSkaashoek Xiao Yu (MP) 224d245c79SAustin Clements Nickolai Zeldovich 234d245c79SAustin Clements Austin Clements 24801affcdSkaashoek 25dd645ef1SAustin ClementsIn addition, we are grateful for the patches contributed by Greg 26dd645ef1SAustin ClementsPrice, Yandong Mao, and Hitoshi Mitake. 277b814133SAustin Clements 28fa1b3410SrscThe code in the files that constitute xv6 is 29d9818bddSFrans KaashoekCopyright 2006-2011 Frans Kaashoek, Robert Morris, and Russ Cox. 302e898063Skaashoek 312e898063SkaashoekERROR REPORTS 322e898063Skaashoek 33801affcdSkaashoekIf you spot errors or have suggestions for improvement, please send 34bc54fa39Srtmemail to Frans Kaashoek and Robert Morris (kaashoek,rtm@csail.mit.edu). 35641e29c5Skaashoek 36bc54fa39SrtmBUILDING AND RUNNING XV6 374d33ef86Srsc 384d33ef86SrscTo build xv6 on an x86 ELF machine (like Linux or FreeBSD), run "make". 394d33ef86SrscOn non-x86 or non-ELF machines (like OS X, even on x86), you will 404d33ef86Srscneed to install a cross-compiler gcc suite capable of producing x86 ELF 411cb183a9Srscbinaries. See http://pdos.csail.mit.edu/6.828/2007/tools.html. 424d33ef86SrscThen run "make TOOLPREFIX=i386-jos-elf-". 434d33ef86Srsc 44f0400600SrscTo run xv6, you can use Bochs or QEMU, both PC simulators. 45f0400600SrscBochs makes debugging easier, but QEMU is much faster. 464d33ef86SrscTo run in Bochs, run "make bochs" and then type "c" at the bochs prompt. 474d245c79SAustin ClementsTo run in QEMU, run "make qemu". 484d33ef86Srsc 494d245c79SAustin ClementsTo create a typeset version of the code, run "make xv6.pdf". This 504d245c79SAustin Clementsrequires the "mpage" utility. See http://www.mesa.nl/pub/mpage/. 51