Update FAQ.
[pintos-anon] / doc / userprog.texi
index da9fe3d1774cc40d887f101149283f4d56fd6947..3473e961ac1aeaa4b163e6a4808429305ead487e 100644 (file)
@@ -34,8 +34,6 @@ this illusion.
 
 Before we delve into the details of the new code that you'll be
 working with, you should probably undo the test cases from project 1.
-All you need to do is make sure the original @file{threads/test.c} is
-in place.  This will stop the tests from being run.
 
 @menu
 * Project 2 Code::              
@@ -103,7 +101,7 @@ The Task-State Segment (TSS) is used for 80@var{x}86 architectural
 task switching.  Pintos uses the TSS only for switching stacks when a
 user process enters an interrupt handler, as does Linux.  @strong{You
 should not need to modify these files for any of the projects.}
-However, you can read the code if you're interested in how the GDT
+However, you can read the code if you're interested in how the TSS
 works.
 @end table
 
@@ -398,6 +396,14 @@ You may find the code for @func{thread_join} to be useful in
 implementing the join syscall, but besides that, you can use
 the original code provided for project 1.
 
+@item
+@b{All my user programs die with page faults.}
+
+This will generally happen if you haven't implemented problem 2-1
+yet.  The reason is that the basic C library for user programs tries
+to read @var{argc} and @var{argv} off the stack.  Because the stack
+isn't properly set up yet, this causes a page fault.
+
 @item
 @b{Is there a way I can disassemble user programs?}
 
@@ -419,7 +425,7 @@ is compiled as a unit.)  If you wish to port libraries to Pintos, feel
 free.
 
 @item
-@b{How do I compile new user programs? How do I make 'echo' compile?}
+@b{How do I compile new user programs?}
 
 You need to modify @file{tests/Makefile}.
 
@@ -787,7 +793,7 @@ user program (assuming for this example that the stack bottom is
 @item @t{0xbfffffe0} @tab @code{argv[2]} @tab @t{0xbffffff8}
 @item @t{0xbfffffdc} @tab @code{argv[1]} @tab @t{0xbffffff5}
 @item @t{0xbfffffd8} @tab @code{argv[0]} @tab @t{0xbfffffed}
-@item @t{0xbfffffd4} @tab @code{argv} @tab @t{0xbffffffd8}
+@item @t{0xbfffffd4} @tab @code{argv} @tab @t{0xbfffffd8}
 @item @t{0xbfffffd0} @tab @code{argc} @tab 4
 @item @t{0xbfffffcc} @tab ``return address'' @tab 0
 @end multitable
@@ -852,7 +858,7 @@ arbitrary:
 @html
 <CENTER>
 @end html
-@multitable {Address} {Value}
+@multitable {@t{0xbffffe7c}} {Value}
 @item Address @tab Value
 @item @t{0xbffffe7c} @tab 3
 @item @t{0xbffffe78} @tab 2