Darshit Shah [Tue, 24 Oct 2017 13:14:58 +0000 (15:14 +0200)]
Modify the linker script to match the generated binary
Newer versions of GCC (tested with GCC 7), emit more sections in the
binary. Fix the computation of the start of the BSS section to prevent
zeroing out parts of the data section
Ben Pfaff [Tue, 9 Feb 2016 04:48:37 +0000 (20:48 -0800)]
pintos: Avoid apparent name collision in definition of SIGALRM subroutine.
Without this patch, modern versions of Perl issue the following warnings:
Prototype mismatch: sub main::SIGVTALRM () vs none at
.../src/utils/pintos line 188.
Constant subroutine SIGVTALRM redefined at
.../src/utils/pintos line 180.
Changing the name of the function avoids the warning.
Thanks to Geoffrey Knopf for reporting this problem.
Ben Pfaff [Tue, 9 Feb 2016 04:47:10 +0000 (20:47 -0800)]
pintos: Avoid literal control character in Perl variable name.
Modern versions of Perl prefer a caret in variable names over literal
control characters and issue a warning if the control character is used.
This fixes the warning.
John Ousterhout [Thu, 17 Dec 2015 23:29:33 +0000 (15:29 -0800)]
Make docs compile again
With newer versions oF packages such as texinfo and Perl, the
documentation no longer compiled. Fixed various issues, and
removed dvi and ps from default output formats, since software
to generate them is becoming less widely available.
John Ousterhout [Fri, 14 Dec 2012 22:51:09 +0000 (14:51 -0800)]
Added more userprog tests, mostly relating to boundary conditions
involving invalid pages (e.g., position system call opcode with first
bytes in a valid page and remaining bytes in a nonexistent page).
Recent clang version, detect attemps to dereference or call NULL, and
eliminate the code.
../../tests/userprog/bad-read.c:11:9: warning: indirection of
non-volatile null pointer will be deleted, not trap [-Wnull-dereference]
*(int *) NULL);
^~~~~~~~~~~~~
This patchs adds the volatile modifier as necessary.
It allows to use clang to compile the tests.
Russ Ross [Thu, 25 Aug 2011 03:41:30 +0000 (20:41 -0700)]
Fix boot under Bochs when Pintos is compiled with recent GCC.
When compiled according to the instructions, bochs fails to load
the project 1 kernel. This seems to be due to the latest gcc using an
instruction that bochs is not compiled to support. Adding the
'--enable-cpu-level=6' configure option to Bochs, as this commit does,
seems to work.
Ben Pfaff [Thu, 16 Dec 2010 05:42:12 +0000 (21:42 -0800)]
squish-pty: Flush buffered data from pty to stdout when pty's slave closed
When the slave side of the pty is closed, the "read" system call returns
EIO. In this situation, squish-pty failed to flush any output that it
already had in its buffer (up to 16 bytes) to stdout. This could cause
the "Powering off..." message printed by Pintos just before exiting to
be missing from the output.
This usually didn't happen, because there are two other exit paths from
the relay() function that does most of squish-pty's work. The most common
exit path was (evidently) the one which detected that the child process
had died, which did properly flush the buffer. (The third path was wrong
too, and this patch fixes that one too.)
This patch fixes the problem by using a single exit path from relay() that
always reads any remaining input from the pty (if it is open) and flushes
it to stdout.
Reported by Borja Sotomayor <borja@cs.uchicago.edu>.
Ben Pfaff [Sat, 1 May 2010 18:20:14 +0000 (11:20 -0700)]
Make.config: Use a different method to detect --build-id support.
Some versions of ld accept /dev/null as a valid input file. Others will
not. The latter versions will give false negatives for --buil-id support,
which breaks linking of Pintos userspace programs. So use a different
method, that I hope will be more reliable, to detect --build-id support.
Ben Pfaff [Tue, 20 Jan 2009 06:32:57 +0000 (22:32 -0800)]
Remove unnecessary optimization barrier.
The compiler can't optimize out the load of "ticks" here because
it can't look into intr_disable() and intr_set_level() and know that
they don't modify "ticks".
Thanks to Martin <mfleener@stanford.edu> for pointing this out.
Ben Pfaff [Thu, 4 Dec 2008 05:56:59 +0000 (21:56 -0800)]
Avoid long pauses on serial timeout on boot on physical hardware.
The Pintos loader writes status to the serial port as well as the
VGA console, but this doesn't work out so well on at least some
real hardware when nothing is connected to the serial port: each
character can take a second or so to display because the BIOS
waits for a serial timeout each time. So, on the first serial
timeout, replace the "int $0x14" call by a pair of no-ops.
The rest of the changes are part of the struggle not to exceed
the maximum loader size.
Ben Pfaff [Thu, 4 Dec 2008 05:42:42 +0000 (21:42 -0800)]
Remove MIT copyright notice and license.
Pintos used to contain a loader and I/O functions derived from MIT
code, but this has now been entirely eliminated, so there is no
longer any reason to retain the MIT copyright notice or license.
Ben Pfaff [Thu, 4 Dec 2008 05:41:18 +0000 (21:41 -0800)]
Rewrite the I/O port code.
The contents of these functions was derived from code used in the
Massachusetts Institute of Technology's 6.828 advanced operating
systems course.
I deleted the contents of these functions and then rewrote them from
scratch without reference to the earlier code, working only from the
function comments (which I wrote earlier).
Godmar Back [Fri, 14 Nov 2008 06:13:54 +0000 (01:13 -0500)]
added section "Accessing User Memory", including explanation of why
pinning is necessary
added FAQ for why stack growth may cause page faults above stack pointer
minor edits to other sections
Godmar Back [Thu, 13 Nov 2008 02:17:21 +0000 (21:17 -0500)]
added btthreadall to dump all threads
added loadusersymbols to load user symbols from file
updated documentation to reflect behavior of qemu's and bochs's gdbstubs
Ben Pfaff [Wed, 12 Nov 2008 06:19:01 +0000 (22:19 -0800)]
Implement a proper block layer with partition support.
This is in preparation for introducing new block devices, in
particular USB storage-based block devices so that Pintos can boot
from USB memory sticks on notebook and desktop PCs.
This block layer was inspired by one from Anthony Romano
<chz@vt.edu> but it has been extensively (perhaps entirely) rewritten.
Thus, bugs must certainly be blamed on the committer.
Ben Pfaff [Mon, 10 Nov 2008 00:19:48 +0000 (16:19 -0800)]
Get rid of power_off_when_done global variable.
This global variable was not named according to the convention that a
global variable name start with its module name. Furthermore, its usage
was somewhat scattered across the source tree.
This commit introduces new functions shutdown() and shutdown_configure()
to improve the situation.
Ben Pfaff [Sun, 9 Nov 2008 23:21:21 +0000 (15:21 -0800)]
Allow Bochs users to reboot by clicking the "user" button.
The "user_shortcut" Bochs option allows specifying a key combination to
send to the VM when the user clicks on the "user" button in the Bochs
headerbar.
From Godmar, crossported from his usb-integration-aug08 branch.
Ben Pfaff [Sun, 9 Nov 2008 23:22:25 +0000 (15:22 -0800)]
Use 9600 bps for Pintos serial, to match the speed used by the loader.
It is important that Pintos and its loader use the same serial speed, so
that a terminal program connected to a serial port can be set to a sane
speed. The ideal choice would be 115200 bps, for maximum speed, but the
Pintos loader uses the BIOS to do serial output, and the BIOS supports a
maximum speed of 9600 bps.
From Godmar, crossported from his usb-integration-aug08 branch.
Ben Pfaff [Fri, 7 Nov 2008 05:54:04 +0000 (21:54 -0800)]
Eliminate user_page_limit global symbol.
The name "user_page_limit" did not follow the naming convention, which
stated that its name should start with palloc_ since it is defined in
palloc.c. But it was only used in one function, so it was better off
as a function parameter anyhow.
Godmar Back [Wed, 27 Aug 2008 14:34:24 +0000 (14:34 +0000)]
removed 'address' option for Bochs.
It makes Bochs > 2.2.6 fail with "[MEM0 ] ROM: System BIOS must end at 0xfffff"
and, according to http://www.nabble.com/Strange-error-message-when-bringing-up-a-CVS-build-td7532679.html
isn't even necessary for 2.2.6
Ben Pfaff [Thu, 21 Aug 2008 04:49:45 +0000 (04:49 +0000)]
Use --build-id=none to avoid build-id sections on FC8.
These build-id sections cause the Pintos ELF loader to reject
binaries. The preferred way to eliminate them would be to add
/DISCARD/ : { *(.note.gnu.build-id) }
to the linker script, but (as reported by Godmar Back) this causes a
segmentation fault in ld, as reported in a bug filed at:
http://sourceware.org/bugzilla/show_bug.cgi?id=5025