Commit graph

57 commits

Author SHA1 Message Date
Yifan Wu
5a439b8689 fix ch4 2023-03-29 20:40:34 +08:00
Yifan Wu
22e52514a5 Use error! instead of println! when panicking 2023-03-29 20:39:19 +08:00
Yifan Wu
0ae57e1779 Using sbi-rt instead of asm && update rustsbi-qemu to latest
rustsbi-qemu version: a4f0bbe44d9f2f1069a9e5becd09f291e542852c
2023-03-29 20:39:15 +08:00
闭浩扬
76ac3b9886 fmt & fixed 2023-02-04 22:43:58 +08:00
闭浩扬
f45e14bfeb add sbrk and a usertest 2023-02-04 22:15:17 +08:00
Yifan Wu
f0da2f412b Remove K210 support. 2022-12-14 00:06:13 +08:00
Yifan Wu
6915bd2e63 Remove K210 support. 2022-12-13 22:48:37 +08:00
Yifan Wu
87a014df80 in entry.asm: boot_stack->boot_stack_lower_bound 2022-11-29 09:41:56 +08:00
Yu Chen
31cbc6d290 add CI autotest, update README 2022-06-24 00:00:37 +08:00
Yu Chen
0fcea5a05b sbi spec uses a6, a7 as sbicall id, so we need to set a6 to 0 2022-06-22 00:45:17 +08:00
Yu Chen
ab99bc8c28 add cargo fmt in Makefile, and exec make fmt 2022-05-20 08:55:07 +08:00
Yifan Wu
e87bb122a8 Fix #69. 2022-05-13 00:58:11 -07:00
Yu Chen
139fbc637a add #![deny(missing_docs)] AND #![deny(warnings)] in main.rs, and add more comments 2022-03-26 23:00:04 +08:00
Yu Chen
5946903948 update ch4 with more comments 2022-03-26 21:34:42 +08:00
Yu Chen
90cf5659aa update ch4:add some exception support in trap_handler function, add two *_fault.rs apps 2022-03-11 19:11:40 +08:00
Yifan Wu
3731e84460 Add boards/ && cargo clippy 2022-01-24 16:12:56 -08:00
Yifan Wu
3a120122ba cargo clippy & fmt 2022-01-21 14:23:53 -08:00
Yifan Wu
3503a177ac Now PageTable::unmap calls PageTable::find_pte instead of PageTable::find_pte_create. 2022-01-13 17:04:23 -08:00
Yifan Wu
880656d6a0 Kernel cannot dump now. 2022-01-03 19:37:32 -08:00
Yifan Wu
76b6ba65ac Bump to rust nightly-2022-01-01, feature global_asm,asm->stable 2022-01-01 01:48:25 -08:00
Yifan Wu
a8ccba1aed Now construction of PA/VA only uses 56/39 bits. 2021-11-13 02:55:14 -08:00
Yifan Wu
37346c8d0f Remove spin::Mutex in frame_allocator and memory_set. 2021-09-08 00:26:22 +08:00
Yifan Wu
cb7249f0e7 Exclusive UPSafeCell: A RefCell wrapper 2021-07-20 00:07:56 +08:00
Yifan Wu
258516a3ca Replace llvm_asm! with asm 2021-07-18 19:21:16 +08:00
Yifan Wu
cf7c2abaa6 RefCell->UPSafeCell && TaskCx->TCB 2021-07-12 22:09:34 +08:00
Yifan Wu
8ca3b5826d Fix end_va bug in translated_byte_buffer 2021-03-23 19:18:12 +08:00
Yifan Wu
1c6c8757ee Link small sections in linker 2021-03-07 19:56:36 +08:00
Yifan Wu
87e30fdaa8 Fix overflow bug when ceiling va 2021-02-24 03:48:55 +08:00
Yifan Wu
04af18cb47 Bump rustsbi to 0.1.1 && make config of qemu/k210 different 2021-02-07 18:17:00 +08:00
Yifan Wu
05fd1c8f85 Do not clone KERNEL_SPACE in mm::init 2021-01-27 07:29:16 +08:00
Yifan Wu
251758316f Fix k210 CLOCK_FREQ 2021-01-26 15:32:51 +08:00
Yifan Wu
c33c0f8aea Update from previous chapters. 2021-01-06 00:19:10 +08:00
Yifan Wu
3851c2d561 Move some variable name to task_cx to task_cx_ptr2 2021-01-04 16:05:15 +08:00
Yifan Wu
6011a6a943 Flush icache before returning to user. 2021-01-03 17:02:34 +08:00
Yifan Wu
8522c2f4cd Remove meaningless sstatus::set_sie() when initializing. 2021-01-03 16:05:04 +08:00
Yifan Wu
9e861c2819 ch4 ok on qemu/k210 && Remove some comments. 2020-12-08 01:35:08 +08:00
Yifan Wu
485db04a2b Split kernel/user trap handler && Fix user tests. 2020-12-07 18:57:23 +08:00
Yifan Wu
1008d92c35 Fetch buffer in user space as a Vec. 2020-12-07 18:07:19 +08:00
Yifan Wu
9366099b28 Fetching buffer arguments from user space. 2020-12-06 13:56:13 +08:00
Yifan Wu
d38b24a9cb Analyse ELF. 2020-12-04 17:53:14 +08:00
Yifan Wu
b6f4327a3f Kernel remapped. 2020-12-04 17:23:35 +08:00
Yifan Wu
e37e5708e4 Frame Allocator OK. 2020-12-03 10:40:30 +08:00
Yifan Wu
528d99258a Heap test passed on k210/qemu, heap size = 3M. 2020-12-02 10:32:26 +08:00
Yifan Wu
1cef77eac7 Chapter3: power2/3/5 & sleep test worked on k210/qemu based on timer. 2020-11-29 10:31:15 +08:00
Yifan Wu
adbe671fe1 sys_yield tests worked on qemu. 2020-11-29 04:01:38 +08:00
Yifan Wu
3f3e6b2b99 Switch ok with debug mode apps, implement sys_exit correctly later. 2020-11-29 01:31:36 +08:00
Yifan Wu
4e8059e222 Add sys_yield tests and compile them to different location. 2020-11-28 16:22:29 +08:00
Yifan Wu
6671f99afb Update rustsbi-qemu && batch worked on qemu/k210. 2020-11-20 11:10:38 +08:00
Yifan Wu
2ce04bf19f Run hello_world/power one by one in batch mode. 2020-11-20 01:18:25 +08:00
Yifan Wu
bae5383602 Try batch but kernel panicked. 2020-11-19 18:01:16 +08:00