Commit graph

17 commits

Author SHA1 Message Date
Frans Kaashoek 2501560cd6 Cosmetic cleanup: fsinit reads sb and calls loginit. initialize icache
in main.c and don't make it disk specific; the icache is shared.  This
doesn't matter since we have only one disk, but conceptually cleaner
and maybe helpful to students for mount lab.
2019-08-18 14:35:11 -04:00
Frans Kaashoek f37a3e3964 Make pin/unpin explicit 2019-07-30 08:54:43 -04:00
Frans Kaashoek 5304310452 Remove B_DIRTY
Use refcnt to pin blocks into the cache
Replace flags/B_VALID with a boolean field valid
Use info[id].status to signal completion of disk interrupt
Pass a read/write flag to virtio_disk_rw
2019-07-29 17:33:16 -04:00
Robert Morris 6507da772d argptr no longer needed, since copyin checks 2019-07-28 06:29:37 -04:00
Robert Morris 281d450a08 split printf into a separate file, to make console.c more like a driver 2019-07-27 03:49:03 -04:00
Robert Morris cc1a303d09 fetchint isn't used any more 2019-07-26 12:34:06 -04:00
Robert Morris b19adf79f9 purge x86 stuff from defs.h 2019-07-25 05:37:35 -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
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 f59c1bf1d8 try to continue from walk() failing to allocate a page-table page 2019-07-02 11:45:06 -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 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 defs.h (Browse further)