]>
Devi Nivas Git - cs3210-lab1.git/log
Russ Cox [Wed, 2 Sep 2009 14:41:08 +0000 (07:41 -0700)]
Fix TLS for PIC systems
Nickolai Zeldovich [Wed, 2 Sep 2009 06:03:46 +0000 (02:03 -0400)]
fix bootblock build with gcc 4.4
Russ Cox [Mon, 31 Aug 2009 06:02:08 +0000 (23:02 -0700)]
assorted fixes:
* rename c/cp to cpu/proc
* rename cpu.context to cpu.scheduler
* fix some comments
* formatting for printout
Russ Cox [Sat, 8 Aug 2009 08:07:30 +0000 (01:07 -0700)]
shuffle and tweak for formatting.
pdf has very good page breaks now.
would be a good copy for fall 2009.
Russ Cox [Mon, 13 Jul 2009 16:34:45 +0000 (09:34 -0700)]
exec tweaks
Russ Cox [Mon, 13 Jul 2009 02:07:30 +0000 (19:07 -0700)]
remove //DOC in the right place
Russ Cox [Mon, 13 Jul 2009 01:56:00 +0000 (18:56 -0700)]
strip //DOC comments during printing
Russ Cox [Mon, 13 Jul 2009 01:39:07 +0000 (18:39 -0700)]
merge
Russ Cox [Mon, 13 Jul 2009 01:33:37 +0000 (18:33 -0700)]
more doc tweaks
Silas Boyd-Wickizer [Sun, 12 Jul 2009 19:28:14 +0000 (15:28 -0400)]
undo
Silas Boyd-Wickizer [Sun, 12 Jul 2009 19:17:29 +0000 (15:17 -0400)]
test commit email
Russ Cox [Sun, 12 Jul 2009 02:28:29 +0000 (19:28 -0700)]
initproc, usegment, swtch tweaks
Russ Cox [Sun, 12 Jul 2009 02:26:51 +0000 (19:26 -0700)]
spinlock: rename parameter lock -> lk
Russ Cox [Sun, 12 Jul 2009 02:26:29 +0000 (19:26 -0700)]
mmu.h: unused SEG_NULL
Russ Cox [Sun, 12 Jul 2009 02:26:01 +0000 (19:26 -0700)]
rearrangements and cleanup for text
Russ Cox [Sun, 12 Jul 2009 02:24:56 +0000 (19:24 -0700)]
trap cleanup
IRQ_OFFSET -> T_IRQ0 (a trap number not an IRQ number)
T_SYSCALL 0x30 -> 0x40 (move out of IRQ range)
Russ Cox [Sun, 12 Jul 2009 02:15:32 +0000 (19:15 -0700)]
bootasm cleanup
Russ Cox [Sun, 12 Jul 2009 01:17:32 +0000 (18:17 -0700)]
s/IRQ_OFFSET/T_IRQ0/: it's a trap number, not an irq number.
move the SYSCALL number up, so does not overlap the IRQ traps.
rsc [Sun, 31 May 2009 05:13:51 +0000 (05:13 +0000)]
compile fixes
rsc [Sun, 31 May 2009 05:12:21 +0000 (05:12 +0000)]
group locks into structs they protect.
few naming nits.
rsc [Sun, 31 May 2009 02:14:04 +0000 (02:14 +0000)]
usys.S: put before init.c, STUB -> SYSCALL
rsc [Sun, 31 May 2009 02:11:27 +0000 (02:11 +0000)]
exec sanity check
rsc [Sun, 31 May 2009 02:07:51 +0000 (02:07 +0000)]
simplify
rsc [Sun, 31 May 2009 02:07:26 +0000 (02:07 +0000)]
use ftable like btable and itable
rsc [Sun, 31 May 2009 01:53:08 +0000 (01:53 +0000)]
fix bug fix
rsc [Sun, 31 May 2009 01:44:20 +0000 (01:44 +0000)]
tidy fs.c; bmap callers always expected allocation
rsc [Sun, 31 May 2009 01:34:46 +0000 (01:34 +0000)]
inode reuse bug.
Suppose an inode has been used and freed.
It is left marked I_VALID (the bug).
Now ialloc comes along and reuses the
inode. It writes the new inode type to disk
and returns iget(dev, inum) to get the
cache entry. Iget sees that the inode is valid
and doesn't bother refreshing from disk.
Now when the caller iupdates, it will write
out a zero type and the file or directory has
disappeared.
rsc [Sun, 31 May 2009 01:29:17 +0000 (01:29 +0000)]
bio.c: use struct like icache does
rsc [Sun, 31 May 2009 01:29:01 +0000 (01:29 +0000)]
ide.c: make names more regular
rsc [Sun, 31 May 2009 01:12:08 +0000 (01:12 +0000)]
clean up %fs %gs use
rsc [Sun, 31 May 2009 01:00:38 +0000 (01:00 +0000)]
sync with c; .text is implied
rsc [Sun, 31 May 2009 00:59:37 +0000 (00:59 +0000)]
drop NADDRS and INDIRECT; too many names
rsc [Sun, 31 May 2009 00:39:17 +0000 (00:39 +0000)]
tab police
rsc [Sun, 31 May 2009 00:38:51 +0000 (00:38 +0000)]
move fork into proc.c
rsc [Sun, 31 May 2009 00:31:20 +0000 (00:31 +0000)]
missed this file in last checkin
rsc [Sun, 31 May 2009 00:28:45 +0000 (00:28 +0000)]
Some proc cleanup, moving some of copyproc into allocproc.
Also, an experiment: use "thread-local" storage for c and cp
instead of the #define macro for curproc[cpu()].
rsc [Sun, 31 May 2009 00:26:10 +0000 (00:26 +0000)]
move T_DIR etc into stat.h; move type up
rsc [Sun, 31 May 2009 00:24:11 +0000 (00:24 +0000)]
Add serial port input/output.
Delete parallel port output.
Works well with qemu -nographic mode.
rsc [Sun, 31 May 2009 00:23:00 +0000 (00:23 +0000)]
slight rearrangement; sleep on b not buf.
rsc [Tue, 26 May 2009 16:58:33 +0000 (16:58 +0000)]
Add MIT license file; update xv6-rev2.tar.gz with LICENSE.
Other files unchanged.
rsc [Sun, 8 Mar 2009 22:07:13 +0000 (22:07 +0000)]
be consistent: no underscores in function names
rsc [Sun, 8 Mar 2009 21:41:30 +0000 (21:41 +0000)]
xv6: boot loader adjustments
do Bochs breakpoint and spin in bootasm.S.
not needed in bootmain too.
fix readseg bug (rounding of va).
zero segments when memsz > filesz.
no need to clear BSS in kernel main.
make bootother.S like bootasm.S
rsc [Sun, 8 Mar 2009 21:38:30 +0000 (21:38 +0000)]
xv6: use stosb for memset
rsc [Sun, 8 Mar 2009 21:27:57 +0000 (21:27 +0000)]
xv6/x86.h: add stosb, fix bugs in insl/outsl (rep not repne)
rsc [Sun, 8 Mar 2009 20:56:38 +0000 (20:56 +0000)]
xv6/x86.h: inline assembly cleanup
rtm [Mon, 20 Oct 2008 18:05:48 +0000 (18:05 +0000)]
Explain why itrunc() is OK w.r.t. crashes.
kolya [Fri, 17 Oct 2008 12:42:13 +0000 (12:42 +0000)]
try harder to get directory refcounts right
kolya [Thu, 16 Oct 2008 15:18:49 +0000 (15:18 +0000)]
make mkdir crash-safer, as noticed by many students on midterm
kolya [Thu, 16 Oct 2008 15:00:23 +0000 (15:00 +0000)]
free the indirect block
kolya [Wed, 15 Oct 2008 17:42:56 +0000 (17:42 +0000)]
as rtm noticed, avoid doubly-freeing pipe page
kolya [Wed, 15 Oct 2008 05:15:32 +0000 (05:15 +0000)]
indent
kolya [Wed, 15 Oct 2008 05:14:10 +0000 (05:14 +0000)]
cleaner swtch.S
kolya [Wed, 15 Oct 2008 05:01:39 +0000 (05:01 +0000)]
save cpus.intena in sched(), so we get the right EFLAGS.IF value once a
timer-preempted kernel thread resumes execution in trap() after yield().
otherwise the kernel could get an arbitrary number of nested timer intrs.
kolya [Wed, 15 Oct 2008 04:57:02 +0000 (04:57 +0000)]
check cp->killed before returning to user from a timer interrupt
kolya [Wed, 15 Oct 2008 04:54:24 +0000 (04:54 +0000)]
update .cvsignore
kolya [Sun, 12 Oct 2008 20:19:16 +0000 (20:19 +0000)]
minor cleanup
kolya [Sun, 12 Oct 2008 19:54:11 +0000 (19:54 +0000)]
minor cleanup with STUB macro
kolya [Sun, 12 Oct 2008 18:45:30 +0000 (18:45 +0000)]
include explicitly initialized globals (int x = 0;) in cross-refs,
also thanks to greg price.
kolya [Sun, 12 Oct 2008 18:33:14 +0000 (18:33 +0000)]
fix: when two names only differed in case, crossrefs only included one of them.
thanks to greg price.
rtm [Wed, 8 Oct 2008 18:57:13 +0000 (18:57 +0000)]
be clear what the root i-number is
rtm [Sun, 28 Sep 2008 10:53:54 +0000 (10:53 +0000)]
document lock->locked=0 vs xchg(&lock->locked, 0)
kolya [Wed, 24 Sep 2008 18:20:56 +0000 (18:20 +0000)]
trap 9 does not push ec: fix from Greg Price <price@mit.edu>
kolya [Wed, 24 Sep 2008 01:48:31 +0000 (01:48 +0000)]
always save and restore %fs, %gs to ensure old segment entries are never
accessible to user from the hidden CPU segment registers.
rtm [Thu, 11 Sep 2008 10:22:01 +0000 (10:22 +0000)]
restore std toolprefix
rtm [Thu, 11 Sep 2008 10:20:40 +0000 (10:20 +0000)]
omit *.d from tar file
kaashoek [Tue, 9 Sep 2008 11:42:44 +0000 (11:42 +0000)]
add copyright notice
kolya [Wed, 3 Sep 2008 14:10:47 +0000 (14:10 +0000)]
make bochsrc work for bochs 2.2.6
kolya [Wed, 3 Sep 2008 14:05:52 +0000 (14:05 +0000)]
make pdf, ps, tarball
kaashoek [Wed, 3 Sep 2008 12:29:44 +0000 (12:29 +0000)]
nits in index.txt
add slides for shell, x86 intro, x86 virtual memory (deleted JOS from slides)
rsc [Wed, 3 Sep 2008 04:50:04 +0000 (04:50 +0000)]
DO NOT MAIL: xv6 web pages
rtm [Thu, 28 Aug 2008 17:57:47 +0000 (17:57 +0000)]
simplify growproc
rtm [Thu, 28 Aug 2008 00:53:24 +0000 (00:53 +0000)]
avoid a bug w/ exit()
rtm [Thu, 28 Aug 2008 00:52:05 +0000 (00:52 +0000)]
the old explanation of AP startup might have been correct, but
I understand this one.
kolya [Fri, 22 Aug 2008 00:26:22 +0000 (00:26 +0000)]
clean up circular buffers, so pipe can queue 512 bytes rather than 511
kolya [Thu, 21 Aug 2008 23:24:02 +0000 (23:24 +0000)]
fix obvious printf nits after reading through code
rsc [Wed, 20 Aug 2008 18:00:35 +0000 (18:00 +0000)]
now rev2
rsc [Wed, 20 Aug 2008 18:00:24 +0000 (18:00 +0000)]
add nice font
rsc [Wed, 20 Aug 2008 18:00:13 +0000 (18:00 +0000)]
formatting updates
rsc [Wed, 20 Aug 2008 17:59:29 +0000 (17:59 +0000)]
bochs faster
rsc [Wed, 20 Aug 2008 17:46:32 +0000 (17:46 +0000)]
xv6: latest (as of January 2008)
rsc [Thu, 20 Dec 2007 18:27:07 +0000 (18:27 +0000)]
oops - wrong bit (vic zandy)
rsc [Wed, 28 Nov 2007 20:47:22 +0000 (20:47 +0000)]
fork minibug
rsc [Wed, 28 Nov 2007 20:47:10 +0000 (20:47 +0000)]
More complete lapic startup (thanks Silas)
rsc [Wed, 28 Nov 2007 20:17:04 +0000 (20:17 +0000)]
bda[0xE] is a 16-bit segment number,
not a real address. So shift 4.
Reported by Silas.
Jim McKie says this code only matters
on ancient EISA MP systems.
rtm [Sat, 20 Oct 2007 18:25:38 +0000 (18:25 +0000)]
proc_wait -> wait
rsc [Fri, 12 Oct 2007 04:21:04 +0000 (04:21 +0000)]
Model verifying that wakeup really
can be called after release without
causing deadlock.
rsc [Mon, 1 Oct 2007 20:43:15 +0000 (20:43 +0000)]
Incorporate new understanding of/with Intel SMP spec.
Dropped cmpxchg in favor of xchg, to match lecture notes.
Use xchg to release lock, for future protection and to
keep gcc from acting clever.
rsc [Sun, 30 Sep 2007 14:30:04 +0000 (14:30 +0000)]
Re: why cpuid() in locking code?
rtm wrote:
> Why does acquire() call cpuid()? Why does release() call cpuid()?
The cpuid in acquire is redundant with the cmpxchg, as you said.
I have removed the cpuid from acquire.
The cpuid in release is actually doing something important,
but not on the hardware. It keeps gcc from reordering the
lock->locked assignment above the other two during optimization.
(Not that current gcc -O2 would choose to do that, but it is allowed to.)
I have replaced the cpuid in release with a "gcc barrier" that
keeps gcc from moving things around but has no hardware effect.
On a related note, I don't think the cpuid in mpmain is necessary,
for the same reason that the cpuid wasn't needed in release.
As to the question of whether
acquire();
x = protected;
release();
might read protected after release(), I still haven't convinced
myself whether it can. I'll put the cpuid back into release if
we determine that it can.
Russ
rsc [Sun, 30 Sep 2007 14:20:47 +0000 (14:20 +0000)]
tricks
rsc [Thu, 27 Sep 2007 21:37:45 +0000 (21:37 +0000)]
interrupts during system calls
"It just works."
rsc [Thu, 27 Sep 2007 21:25:37 +0000 (21:25 +0000)]
Final word on the locking fiasco?
Change pushcli / popcli so that they can never turn on
interrupts unexpectedly. That is, if interrupts are on,
then pushcli(); popcli(); turns them off and back on, but
if they are off to begin with, then pushcli(); popcli(); is
a no-op.
I think our fundamental mistake was having a primitive
(release and then popcli nee spllo) that could turn
interrupts on at unexpected moments instead of being
explicit about when we want to start allowing interrupts.
With the new semantics, all the manual fiddling of ncli
to force interrupts off in certain sections goes away.
In return, we must explicitly mark the places where
we want to enable interrupts unconditionally, by calling sti().
There is only one: inside the scheduler loop.
rsc [Thu, 27 Sep 2007 21:02:03 +0000 (21:02 +0000)]
cleaner
rsc [Thu, 27 Sep 2007 20:38:53 +0000 (20:38 +0000)]
yank out stack overflow checking ugliness
rsc [Thu, 27 Sep 2007 20:32:45 +0000 (20:32 +0000)]
okay, that was long enough - revert
rsc [Thu, 27 Sep 2007 20:29:50 +0000 (20:29 +0000)]
test: store curproc at top of stack
I don't actually think this is worthwhile, but I figured
I would check it in before reverting it, so that it can
be in the revision history.
Pros:
* curproc doesn't need to turn on/off interrupts
* scheduler doesn't have to edit curproc anymore
Cons:
* it's ugly
* all the stack computation is more complicated.
* it doesn't actually simplify anything but curproc,
and even curproc is harder to follow.
rsc [Thu, 27 Sep 2007 20:25:32 +0000 (20:25 +0000)]
nit
rsc [Thu, 27 Sep 2007 20:09:40 +0000 (20:09 +0000)]
rename splhi/spllo to pushcli/popcli
rsc [Thu, 27 Sep 2007 19:39:10 +0000 (19:39 +0000)]
overkill: use segments to catch stack overflow (delete before next year)
rsc [Thu, 27 Sep 2007 19:35:25 +0000 (19:35 +0000)]
now spllo is okay
rsc [Thu, 27 Sep 2007 19:33:46 +0000 (19:33 +0000)]
better lapic writes, suggested by cliff