Commit graph

1504 commits

Author SHA1 Message Date
Frans Kaashoek abf847a083 Start of an experiment to remove the use of gs for cpu local variables. 2017-01-31 17:47:16 -05:00
Frans Kaashoek 59cdd6c63b wolfgang keller 2017-01-30 20:24:13 -05:00
Frans Kaashoek b4f2235e43 Fix spelling Gaoron. 2017-01-30 20:11:23 -05:00
Frans Kaashoek d57d37eb87 Thanks to Wolfgang Keller <nubok@users.noreply.github.com> 2017-01-30 20:09:54 -05:00
Frans Kaashoek c383612a7d Thanks to Wolfgang Keller <nubok@users.noreply.github.com> 2017-01-30 20:07:42 -05:00
Antonio Gutierrez 1772853d39 Add support for qemu-system-x86_64 in 64bit hosts
As x86-64 is a superset of x86, we can use qemu-system-x86_64 to run
the OS image.

Signed-off-by: Antonio Gutierrez <chibby0ne@gmail.com>
2017-01-30 20:03:45 -05:00
Frans Kaashoek 906610efc9 Thanks to Jeehoon Kang <jeehoon.kang@sf.snu.ac.kr> 2017-01-30 20:01:33 -05:00
Peter Froehlich 8d1f99637a Fix long-standing switchuvm() inconsistency.
switchuvm() is supposed to switch the TSS and page table to the
process p it is passed. Alas, instead of using p to access the
kstack field, it used the global proc. This worked fine because
(a) most uses of switchuvm() pass proc anyway and (b) because in
the schedule, where we call switchuvm with the newly scheduled
process, we actually set the global proc before the call. But I
think it's still a bug, even if it never broke a test case. :-)
2017-01-30 19:31:24 -05:00
Peter H. Froehlich e916d668f7 Fix unsigned conversion bug.
Since readi() returns -1 for errors, checking with < against an unsigned
value is inadvisable. Checking with != works as intended however.
2017-01-30 19:31:24 -05:00
Frans Kaashoek 462930727f Cody 2017-01-30 09:38:19 -05:00
Cody Cutler ffe444926e fix possible memory leak in deallocuvm
when a zero PDE is encountered while searching for present PTEs to free,
resume searching at first entry of the next page table instead of the
current entry of the next page table.
2016-09-26 12:34:08 -04:00
Icenowy Zheng 91fd3470b0 Fixed broken build on newer gold linker with NaCl support
On platforms with NaCl support, ld.gold -V will return a "elf_i386_nacl" in
addition to "elf_i386", which will make the build fail.
2016-09-26 08:25:17 -04:00
Frans Kaashoek 907f23a5bb Add mikecat's argp test 2016-09-26 07:54:02 -04:00
MikeCAT 2a675089b1 fix memory region validation in argptr() 2016-09-26 07:52:17 -04:00
Frans Kaashoek 0df5f11bae Typo (Thanks to Austin Liew) 2016-09-25 08:27:26 -04:00
Frans Kaashoek 7ddba7a636 Merge branch 'master' of g.csail.mit.edu:xv6-dev 2016-09-19 07:02:08 -04:00
Frans Kaashoek 89826f41bd Check result of write (thans to Alexander Kapshuk <alexander.kapshuk@gmail) 2016-09-19 07:01:30 -04:00
Tej Chajed fc1a5da295
Fix a small README typo 2016-09-16 09:11:23 -04:00
Frans Kaashoek 912575ad12 Remove left-over print statements 2016-09-15 19:16:30 -04:00
Robert Morris d6dc5bcb2d Merge branch 'master' of g.csail.mit.edu:xv6-dev 2016-09-15 12:56:17 -04:00
Robert Morris aeaa308943 change allocproc() back to acquiring the ptable.lock.
fix bugs where caller incorrectly released lock on error return path.
2016-09-15 12:12:05 -04:00
Robert Morris 469aa8b9b3 xx 2016-09-15 12:01:52 -04:00
Frans Kaashoek 33188666da Delete two left-over print statements 2016-09-14 21:13:09 -04:00
Frans Kaashoek 6cec0211d8 Update comment a bit. 2016-09-14 13:01:53 -04:00
Frans Kaashoek da91a3a408 Add sleeplock.[ch] to listing 2016-09-14 08:43:57 -04:00
Frans Kaashoek e85cb90cbf one more BUSY 2016-09-13 14:51:44 -04:00
Frans Kaashoek 564a1cf0cb sleeplock files 2016-09-11 21:01:24 -04:00
Frans Kaashoek dec637bc59 Replace I_BUSY with sleep locks 2016-09-11 20:59:57 -04:00
Frans Kaashoek 2adb7c21dc Move retry loop/sleep/wakeup in bio.c into sleeping locks 2016-09-11 20:17:22 -04:00
Frans Kaashoek 6670d3b5e0 Straight replacement of B_BUSY with a sleeping lock. 2016-09-11 17:24:04 -04:00
Frans Kaashoek 551c2f3576 Merge branch 'master' of g.csail.mit.edu:xv6-dev 2016-09-08 21:20:26 -04:00
Frans Kaashoek 1b8ccf9482 x 2016-09-08 21:20:17 -04:00
Robert Morris 34c2efc1d0 use asm() for lock release, not a C assignment 2016-09-08 14:45:20 -04:00
Robert Morris d63ac118e8 this might fix the reported deadlock, though I can't reproduce it. 2016-09-08 14:22:38 -04:00
Frans Kaashoek 761ea5471f Be a bit more explicit what kind of suggestions are are interested. 2016-09-08 13:09:09 -04:00
Frans Kaashoek 5bf3fbee00 Make runoff happy 2016-09-02 15:27:28 -04:00
Frans Kaashoek b7fed77b7b Fix a few lines that runoff is complaining about that they are too long 2016-09-02 14:59:00 -04:00
Frans Kaashoek 5f03799f84 ack xi 2016-09-02 08:43:33 -04:00
Frans Kaashoek b8fd4cba13 Merge branch 'master' of g.csail.mit.edu:xv6-dev 2016-09-02 08:36:14 -04:00
Frans Kaashoek ae15515d80 APIC IDs may not be consecutive and start from zero, so we cannot really use it
as a direct index into cpus.  Record apicid in struct cpu and have cpunum() look
for it. Replace cpu->id with cpunum() everywhere, and replace cpu->id with cpu->apicid.
Thanks to Xi Wang.
2016-09-02 08:31:13 -04:00
Robert Morris bc8221a59c comment about sched() saving/restoring cpu->intena 2016-09-02 05:40:54 -04:00
Robert Morris 4b2152cc2d curproc -> proc in a comment 2016-09-01 17:21:37 -04:00
Frans Kaashoek 37939f24c2 better comment 2016-08-26 08:46:13 -04:00
Frans Kaashoek 27ff70dc08 ack 2016-08-26 08:22:24 -04:00
Frans Kaashoek aff0c8d5c7 set iomb to forbid i/o instructions from user space
add to test that they indeed trap in user space
thanks to pablogventura@gmail.com and nwolovick@gmail.com
2016-08-26 08:20:11 -04:00
Frans Kaashoek 745a4d31a6 x 2016-08-25 09:14:52 -04:00
Frans Kaashoek 7894fcd217 Remove trailing white space with:
for f in *.{h,c}; do sed -i .sed 's/[[:blank:]]*$//' $f; done
(Thanks to Nicolás Wolovick)
2016-08-25 09:13:00 -04:00
Frans Kaashoek 6de6a3c952 ack mikecat 2016-08-25 07:12:33 -04:00
MikeCAT 5625ae4973 add check for wrapping of address + size in exec() 2016-08-25 07:09:46 -04:00
MikeCAT 67a7f9597e add alignment check of virtual address to exec() 2016-08-25 07:09:10 -04:00