Stephen Marz
9524954eb2
Remove unnecessary code
2020-03-13 11:28:39 -04:00
Stephen Marz
eec1047ac9
Document how to get the index from mmio address
2020-03-13 11:23:08 -04:00
Stephen Marz
5b2e780484
move index so that it has more time to write
2020-03-13 11:17:32 -04:00
Stephen Marz
9623de2e50
Added PLIC handler to delegate to virtio. Virtio now delegates to the virtio device type to handle PLIC interrupts. We now handle interrupts from VirtIO as well as free memory associated with it.
2020-03-13 11:15:12 -04:00
Stephen Marz
016520a354
Support new block list
2020-03-12 20:44:53 -04:00
Stephen Marz
72563c3161
Switch to a static block list. This will make it easier to determine
...
which drive we're talking about. 1 is 0x1000_1000 ... 8 is 0x1000_8000
2020-03-12 20:44:28 -04:00
Stephen Marz
93969a2bf5
Added testing first 10 bytes of the hdd.dsk file
2020-03-12 20:10:36 -04:00
Stephen Marz
58efe7e3ac
Added block request read. Quite dirty, but for now it works
2020-03-12 19:47:58 -04:00
Stephen Marz
552595d901
Fixed to use new scheduler return values
2020-03-12 13:56:21 -04:00
Stephen Marz
7b038cdc24
Right now, we return a pointer by usize. This is not good programming in
...
Rust. Instead, the scheduler needs to be modified to return a process
structure's reference. Then, we can extract the fields and then switch.
However, this will require us to have to change how the PROCESS_LIST
works. Since it uses move constructs, we cannot move a process out of it
when we replace the process list.
2020-03-12 13:55:11 -04:00
Stephen Marz
d9b1743698
Changed scheduler to only return the frame and satp register. The mepc
...
is now stored in the trap frame.
2020-03-12 13:54:39 -04:00
Stephen Marz
c6b261bf20
Added comments and reformatted using rustfmt
2020-03-12 13:36:50 -04:00
Stephen Marz
bc9158bd23
Changed the queue size to only take one page.
2020-03-12 13:36:18 -04:00
Stephen Marz
f5ce75dbe8
Finished setup, rearranged queue creation and testing bits. This makes it so we don't have to free anything if we fail after setting up the queue.
2020-03-12 13:36:08 -04:00
Stephen Marz
a32c6fc995
Updates
2020-03-11 17:09:09 -04:00
Stephen Marz
46a6296dec
Added block specific routines and stub setup routine for block devices
2020-03-10 19:29:29 -04:00
Stephen Marz
39cb72ad9f
Added virtio probing to kinit
2020-03-10 17:17:12 -04:00
Stephen Marz
a29698221d
Added virtio structures and stubs for setting up devices
2020-03-10 17:16:57 -04:00
Stephen Marz
d403ae8b7b
Add hdd.dsk to ignore
2020-03-10 17:16:44 -04:00
Stephen Marz
3ffb53405d
Add many virtio devices
2020-03-10 17:16:13 -04:00
Stephen Marz
795e7945f8
Load block device through make run
2020-03-10 16:51:22 -04:00
Stephen Marz
d44f729957
Split CTX switch time and frequency and also use build_satp for switching to user process
2020-03-10 15:35:21 -04:00
Stephen Marz
f2b1e2018a
Moved PC to trap frame so we don't restart the function
2020-03-10 14:55:26 -04:00
Stephen Marz
2984472493
Added chapter 9
2020-03-10 13:52:09 -04:00
Stephen Marz
d154e86d9e
Added Cargo.lock
2020-03-10 13:51:44 -04:00
Stephen Marz
08c5ddafc2
Updated comments and removed debugging code
2020-03-10 13:50:08 -04:00
Stephen Marz
2bcf1bb000
Change cycle time
2020-03-10 13:01:32 -04:00
Stephen Marz
b27784ed52
Separate sched and switch_to_user
2020-03-10 12:59:36 -04:00
Stephen Marz
cb54d823d2
Fire off the first CTX switch timer!
2020-03-10 12:46:52 -04:00
Stephen Marz
429b056921
Updates to system call. Change stack pointer for MMU
2020-03-10 12:44:08 -04:00
Stephen Marz
88c672171e
Fixed trap. Forgot to reset mtvec in switch_to_user
2020-03-10 12:41:16 -04:00
Stephen Marz
f2f5c855cf
M
2020-03-10 11:21:15 -04:00
Stephen Marz
57145beefd
Fixed trap handler, load kernel stack from trap, fixed init, map a larger swath of memory for init.
2020-03-10 11:20:00 -04:00
Stephen Marz
e6ccf15bda
Added .gitignore to make this doable
2020-03-09 17:51:32 -04:00
Stephen Marz
ee92f8e123
Ugh. Remove target
2020-03-09 17:51:10 -04:00
Stephen Marz
a36db7e8aa
Merge pull request #13 from skyzh/patch-1
...
Add data flush in uart put function
2020-02-22 08:58:52 -05:00
Stephen Marz
b139313874
Added chapter 8
2020-02-22 08:53:59 -05:00
Alex Chi
2474df886c
Add data flush in uart put function
2020-02-03 10:33:00 +08:00
Stephen Marz
4ffb6e3e3b
Added syscall and shell scheduler
2020-01-18 20:22:47 -05:00
Stephen Marz
e8e379e557
Updates to ch6 -- post ready.
2019-12-08 14:30:41 -05:00
Stephen Marz
eb0c943a71
Updates to process.
2019-12-07 22:04:13 -05:00
Stephen Marz
c1e247cad5
Move lots of code to support user processes.
2019-12-07 13:59:39 -05:00
Stephen Marz
f8c2faa3ae
Updates to process code.
2019-12-05 19:52:02 -05:00
Stephen Marz
fa82110eac
Added adjustment constants.
2019-11-28 12:27:13 -05:00
Stephen Marz
ba678d2252
Fixed HEAP map bug.
2019-11-28 12:22:42 -05:00
Stephen Marz
b723763292
Free root table.
2019-11-28 12:05:24 -05:00
Stephen Marz
b61b3ebbf5
Use zalloc to clear page tables.
2019-11-28 12:04:21 -05:00
Stephen Marz
c99bff8944
Use zalloc to clear page tables.
2019-11-28 12:02:37 -05:00
Stephen Marz
c5179e60d6
Added virtual memory allocation.
2019-11-28 12:01:52 -05:00
Stephen Marz
26e37d33d3
Added comments to process
2019-11-27 23:42:50 -05:00