Commit graph

40 commits

Author SHA1 Message Date
Robert Morris 7d8bfdcbe3 nothing much 2022-08-09 15:11:25 -04:00
l0stman 9195142959 Assert that the size in mappages() is always positive
If va % PGSIZE == 0 and size == 0, we have last < a at the start of
the loop so we might never terminate.  That being said, this
particular case couldn't be triggered for now.
2021-08-31 14:20:32 -04:00
Frans Kaashoek d4cecb269f kvmmake() makes a complete kernel page table, matching Figure 3.3 2020-10-14 20:28:16 -04:00
Fumiya Shigemitsu 93378618df Fix minor typos 2020-10-14 20:28:14 -04:00
Frans Kaashoek c199afe4c8 Don't map the CLINT, since it never used in the kernel in supervisor mode 2020-10-05 19:30:27 -04:00
Robert Morris c61cc69413 eliminate virtio DMA into kernel stacks. 2020-10-05 19:30:27 -04:00
Fumiya Shigemitsu 9c8d1e2909 Fix minor typos 2020-10-03 16:36:20 -04:00
Robert Morris f2ec6777bd fix a bug in the out-of-memory handling code in exec 2020-08-17 08:18:23 -04:00
Robert Morris 8dc71a257d handle another out-of-memory in fork(). the policy here is not consistent,
since other calls (e.g. exec()) panic on out of memory.
2020-08-17 08:18:23 -04:00
Robert Morris a8dd44cf59 modify uvmunmap() to be in aligned pages
fix a bug in fork() recovering from out of memory
2020-08-17 08:18:23 -04:00
Robert Morris e283514ad0 pa isn't needed in the uvmunmap() loop 2020-08-17 08:18:23 -04:00
Frans Kaashoek c31d35d803
Merge branch 'riscv' into riscv 2020-08-10 13:05:17 -04:00
Robert Morris 7f35d7a14e modify each page in usertests countfree()
get rid of static for walk() and freewalk()
2020-08-10 11:19:10 -04:00
Robert Morris e7ffb74ad1 fix a potential memory leak 2019-10-27 13:36:46 -04:00
Fumiya Shigemitsu 90eb90b5e2 Fix minor typos 2019-10-21 21:01:07 +09:00
Robert Morris e1a37303c8 yet another sbrk() bug fix, and usertest 2019-09-20 12:13:57 -04:00
Robert Morris 4de161f973 don't panic if a program frees all its memory with sbrk().
if a program sbrk()'s to a non-page-boundary, don't free that page.
corresponding usertests.
2019-09-20 11:35:27 -04:00
Robert Morris ca30cac702 more incorrect cast to uint 2019-09-20 10:27:03 -04:00
Robert Morris 402e7b5605 fix a potential kernel crash
add a regression test for it
2019-09-20 09:41:03 -04:00
Robert Morris 2df42355f7 all of PTE_FLAGS 2019-09-17 06:07:58 -04:00
Robert Morris 86a1d4b295 sfence_vma after satp 2019-09-03 15:45:07 -04:00
Robert Morris 8d30e21b59 Merge branch 'riscv' of g.csail.mit.edu:xv6-dev into riscv 2019-07-26 04:53:59 -04:00
Robert Morris ea95a6654c trampin -> uservec
trampout -> userret
2019-07-26 04:53:46 -04:00
Frans Kaashoek 47c9721d78 a few name changes in panic msg 2019-07-25 06:59:07 -04:00
Robert Morris 9a817bd134 rationalize some vm function names 2019-07-24 15:28:37 -04:00
Robert Morris a77287e924 no more PAGEBREAK 2019-07-24 13:33:43 -04:00
Robert Morris 54178ad94d simplify kernel mapping calls 2019-07-23 12:17:17 -04:00
Frans Kaashoek 6c78af4a57 fix mapkstack 2019-07-22 20:58:15 -04:00
Frans Kaashoek b2e9c8eea5 Clear U bit for second stack page so that it functions as a guard page 2019-07-22 15:38:08 -04:00
Robert Morris 38b430687c nit 2019-07-22 15:04:07 -04:00
Frans Kaashoek 06109901c9 x 2019-07-19 11:27:02 -04:00
Frans Kaashoek 9156632701 One way of supporting a guard page below kstack: allocate kstacks in
procinit() and map them high up (below TRAMPOLNE) with an empty
mapping below each stack.  Never free a kernel stack.

Another way would be to allocate and map them dynamically, but then we
need to reload page table when switching processes in scheduler()
and/or have a kernel pagetable per proc (if we want k->stack to be the
same virtual address in each process).

One gotcha: kernel addresses are not equal to physical addresses for
stack addresses.  A stack address must be translated if we need its
physical address (e.g., virtio passes a stack address to the disk).
2019-07-19 08:38:51 -04:00
Robert Morris ebc3937209 conservatively call sfence.vma before every satp load. 2019-07-16 17:02:21 -04:00
Robert Morris f59c1bf1d8 try to continue from walk() failing to allocate a page-table page 2019-07-02 11:45:06 -04:00
Robert Morris 1540c8b15a COW tests 2019-07-02 11:04:35 -04:00
Robert Morris abfe9999f4 have fork() fail, not panic, if not enough phys mem 2019-07-01 17:46:06 -04:00
Robert Morris ca39672a30 clean up virtio code 2019-06-13 09:40:17 -04:00
Robert Morris 4adf016925 eliminate ramdisk 2019-06-13 06:57:38 -04:00
Robert Morris de9d72c908 virtio disk driver 2019-06-13 06:49:02 -04:00
Robert Morris 5753553213 separate source into kernel/ user/ mkfs/ 2019-06-11 09:57:14 -04:00
Renamed from vm.c (Browse further)