summaryrefslogtreecommitdiff
path: root/vm.c
AgeCommit message (Collapse)AuthorFilesLines
2017-01-30Fix long-standing switchuvm() inconsistency.Peter Froehlich1-3/+8
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. :-)
2016-09-26fix possible memory leak in deallocuvmCody Cutler1-1/+1
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-01curproc -> proc in a commentRobert Morris1-1/+1
2016-08-26better commentFrans Kaashoek1-1/+3
2016-08-26set iomb to forbid i/o instructions from user spaceFrans Kaashoek1-0/+1
add to test that they indeed trap in user space thanks to pablogventura@gmail.com and nwolovick@gmail.com
2016-08-25Remove trailing white space with:Frans Kaashoek1-7/+7
for f in *.{h,c}; do sed -i .sed 's/[[:blank:]]*$//' $f; done (Thanks to Nicolás Wolovick)
2016-08-24p2v -> P2VRobert Morris1-13/+13
2016-08-11nothing muchRobert Morris1-1/+1
2016-08-10tiny clarifications to some gdt code.Robert Morris1-2/+1
2016-08-08shell nitsRobert Morris1-1/+6
fix Regehr complaint
2014-08-29Nice layout for a printout of the codeFrans Kaashoek1-0/+8
2013-03-04Correct a security bug in copyuvm()Stephen Tu1-2/+3
copyuvm() should not allow new copied pages to inherit more permissions than the original pages.
2012-08-28nitsRobert Morris1-4/+4
2012-08-22Runoff still complaints these lines are too long, but it is now ok on printoutFrans Kaashoek1-4/+4
2012-08-22Remove unused argument to setupkvm (thanks to Peter Froehlich)Frans Kaashoek1-1/+1
2011-09-13eliminate enter_alloc -- use kalloc for everythingRobert Morris1-13/+12
2011-09-13more regular kmap[] and descriptionRobert Morris1-19/+22
2011-09-02Nuke data.S, since we do have a custom linker script.Austin Clements1-1/+1
2011-09-02Oops, dropped a parenAustin Clements1-1/+1
2011-09-02clear_pte_u -> clearpteuAustin Clements1-2/+2
2011-09-02Move copy_pte_u; fits vm.c in one less column and aligns proc.hAustin Clements1-13/+13
2011-09-02Cleanup comments and fit setupkvm on same page as kmap, which aligns lots of ↵Austin Clements1-10/+6
other things
2011-09-02StyleAustin Clements1-7/+7
2011-09-02Make mappages fit on the pageAustin Clements1-2/+1
2011-09-01Skip missing page directories in deallocuvmAustin Clements1-1/+3
Previously, deallocuvm scanned from 0 to KERNBASE in one page increments, which had a noticable effect on boot time. Now it skips over missing page directories.
2011-09-01inaccessible page under the user stack page, to help exec deal w/ too-large argsRobert Morris1-0/+13
2011-09-01Merge branch 'master' of git+ssh://amsterdam.csail.mit.edu/home/am0/6.828/xv6Robert Morris1-15/+17
Conflicts: vm.c
2011-09-01fix usertests to correctly test what happens when you callRobert Morris1-2/+3
exec() with arguments that don't fit on a single page.
2011-09-01Fix layout issues for printed versionFrans Kaashoek1-16/+19
2011-08-29Style nits; indentation and tabsAustin Clements1-1/+1
2011-08-24Eliminate USERTOP; no use for it.Frans Kaashoek1-3/+3
2011-08-16Switch back to #define for PHYSTOP. Using the E820 to retrieve the memory ↵Frans Kaashoek1-11/+5
map is too complicated (must be done in 16-bit real-mode, probably enlarged bootblock beyond 512 bytes, and a #define requires less explanation).
2011-08-16Clean up memlayout.hFrans Kaashoek1-9/+17
Get rid of last instances of linear address and "la" Get ready for detecting physical memory dynamically
2011-08-15Make Austin happierFrans Kaashoek1-12/+12
2011
2011-08-15Avoid "boot" in xv6Frans Kaashoek1-2/+2
2011-08-11Make AP processors boot using bootpgdirFrans Kaashoek1-26/+4
Remove device mapping from bootpgdir Remove unnecessary vmenable Set CPUS back to 2 in Makefile Passes all usertests
2011-08-09Tiny bit of cleanupFrans Kaashoek1-7/+7
2011-08-09xFrans Kaashoek1-4/+4
2011-08-09Use static page table for boot, mapping first 4Mbyte; no more segment trickFrans Kaashoek1-76/+18
Allocate proper kernel page table immediately in main using boot allocator Remove pginit Simplify address space layout a tiny bit More to come (e.g., superpages to simplify static table)
2011-08-07Adjust sbrk test for large user address spacesFrans Kaashoek1-1/+1
All tests pass
2011-07-31Don't map IO space in the user part of the address spaceFrans Kaashoek1-8/+10
Passes all tests now (but need to update usertests to allow for more than 640k)
2011-07-29Map kernel highFrans Kaashoek1-28/+99
Very important to give qemu memory through PHYSTOP :(
2011-02-19xv6: formatting, cleanup, rev5 (take 2)Russ Cox1-61/+54
2011-01-11more trivial cleanupRuss Cox1-12/+9
2011-01-11make new code like old codeRuss Cox1-59/+84
Variable declarations at top of function, separate from initialization. Use == 0 instead of ! for checking pointers. Consistent spacing around {, *, casts. Declare 0-parameter functions as (void) not (). Integer valued functions return -1 on failure, 0 on success.
2010-09-27copyout() copies data to a va in a pagetable, for exec() &cRobert Morris1-4/+28
usertest that passes too many arguments, break exec
2010-09-20map kernel instructions r/oRobert Morris1-2/+7
2010-09-13change some comments, maybe more informativeRobert Morris1-1/+1
delete most comments from bootother.S (since copy of bootasm.S) ksegment() -> seginit() move more stuff from main() to mainc()
2010-09-02Simplify allocuvm/deallocuvm to operate in a contiguous memory model. This ↵Austin Clements1-31/+27
makes their interface match up better with proc->sz and also simplifies the callers (it even gets the main body of exec on one page).
2010-09-02Comment inituvm and loaduvmAustin Clements1-0/+4