1
0
mirror of https://github.com/rcore-os/rCore.git synced 2024-11-27 02:03:29 +04:00
Commit Graph

110 Commits

Author SHA1 Message Date
WangRunji
c0193e69e6 Clear all code, make it compile for RISCV in docker. 2018-07-03 22:27:55 +08:00
WangRunji
e47f57a12a Cow test pass in OS 2018-06-23 22:30:57 +08:00
WangRunji
ade0f0110f Use PageTable interface in OS 2018-06-23 19:11:41 +08:00
WangRunji
d2d9affddf Use multiboot2 to locate RSDT 2018-06-20 11:08:47 +08:00
WangRunji
0e2cccef9e Use uart_16550 crate 2018-06-20 00:24:07 +08:00
WangRunji
f707d7e757 Fit new rust nightly. Update dependencies. 2018-06-19 23:43:40 +08:00
WangRunji
f4b9308f2c Use x86_64 paging! Remove original paging mod. 2018-06-18 02:20:27 +08:00
WangRunji
60ed3a2ed4 Fix SMP. Move cpu::init to asm. 2018-06-17 01:41:43 +08:00
WangRunji
4817f69acb Update x86_64 to 0.2.3. FIXME: SMP 2018-06-17 01:22:43 +08:00
WangRunji
1760d76581 Basic sync::mpsc. FIXME: deadlock. 2018-06-05 01:32:21 +08:00
WangRunji
0b0dac3c81 Complete Semaphore Condvar, dining-philosophers-problem using monitor 2018-06-05 00:34:34 +08:00
WangRunji
f3d62a5b8f Replace AreaFrameAllocator by BitAllocator. Set opt-level=1 to avoid stack overflow. 2018-06-03 19:29:11 +08:00
WangRunji
8d6663edb0 Fix and simplify SMP 2018-06-03 11:22:28 +08:00
WangRunji
2e9ffb84fa HUGE REFACTOR for memory mod: unified to MemorySet! 2018-06-03 01:10:20 +08:00
WangRunji
5891613b22 Split sync mod 2018-06-01 15:07:12 +08:00
WangRunji
31bc92aec6 ThreadLock. Dining philosophers problem. Fix thread::spawn. 2018-06-01 11:47:58 +08:00
WangRunji
2ad61cae65 Impl std-like thread interface. 2018-05-31 20:26:25 +08:00
WangRunji
dcdbcfbce8 Impl spin & no-interrupt lock. Enable interrupt during syscall. 2018-05-31 20:23:26 +08:00
WangRunji
64b3716c92 HUGE: Impl switch() like ucore/xv6. 2018-05-22 23:48:39 +08:00
WangRunji
6c135bca24 Refactor interrupt mod and add some docs 2018-05-21 16:05:36 +08:00
WangRunji
ffb7e194f9 Fix set TSS in SMP 2018-05-20 22:12:18 +08:00
WangRunji
f35d74c734 Huge refactor for interrupt. 2018-05-20 19:15:01 +08:00
WangRunji
4e35b927d2 Yield. Shorter schedule interval. 2018-05-20 17:14:05 +08:00
WangRunji
601d0f85bd Add an event system in the Processor. Can sleep and wakeup. 2018-05-20 15:37:48 +08:00
WangRunji
0f26f6ffd6 Basic EventHub and Timer. 2018-05-20 00:22:52 +08:00
WangRunji
950fe4fedc Use crate log. Print with color in console. 2018-05-19 18:42:08 +08:00
WangRunji
731d6319e4 Can load user programs from sfs.img (hard linked). 2018-05-18 11:49:27 +08:00
WangRunji
5a1dc423e0 Shared memory & Copy on write ! 2018-05-14 22:55:49 +08:00
WangRunji
4d6925a562 Fork (not finished). Not depend on boot_info after remap_kernel. 2018-05-13 21:13:57 +08:00
WangRunji
678d1d2b54 Some tiny changes 2018-05-13 15:06:44 +08:00
WangRunji
7cdfb9e6e2 Basic syscall 2018-05-13 03:41:41 +08:00
WangRunji
40b02c33cb Switch page table for user process 2018-05-13 00:47:16 +08:00
WangRunji
8ce3173c3d Link a user program from xv6-x86_64 in. Add elf crate. 2018-04-28 10:40:31 +08:00
WangRunji
0553d3374d Can switch between init and idle process 2018-04-27 21:49:01 +08:00
WangRunji
4f18f70e19 Can switch between ring0 and ring 3. Fix IDT bugs. 2018-04-27 16:32:57 +08:00
WangRunji
7d28231f1b Can run into another kernel thread 2018-04-27 00:03:24 +08:00
WangRunji
5d857c38eb Let struct Stack own the stack, panic on Drop. Add a little process mod. 2018-04-26 21:53:20 +08:00
WangRunji
0539f8673e Rewrite interrupt handlers using Redox style. Prepare for saving context. 2018-04-26 01:00:32 +08:00
WangRunji
69f6f4070e Add IRQ handler for ToUser, ToKernel, GPF, Syscall.
Now trigger ToUser interrupt will cause GPF.
2018-04-18 21:53:39 +08:00
WangRunji
cb19bc5464 Start AP one by one. Fix deadlock. 2018-04-18 15:22:06 +08:00
WangRunji
2b813b2acc Set CPU num to 4. Init lapic for each. TODO: fix deadlock. 2018-04-18 14:55:09 +08:00
WangRunji
f6df3c412c Now CPU1 can handle interrupt. Alloc TSS & GDT & IDT at kernel heap. 2018-04-18 14:26:34 +08:00
WangRunji
3e9ee46850 Now CPU1 can enter Rust. Change kernel guard page.
CPU1 is sharing page table with CPU0
2018-04-18 12:26:21 +08:00
WangRunji
8a8aff8917 Copy start_ap to lapic.c . Simple startothers(). Try to boot AP but failed. 2018-04-18 01:56:54 +08:00
WangRunji
038867921e Move device init to arch mod 2018-04-17 15:32:53 +08:00
WangRunji
01c0c3b2ad Move IDT & GDT to arch, as Redox did. 2018-04-16 01:22:18 +08:00
WangRunji
77703442e7 Move paging mod to arch, as Redox did. 2018-04-16 01:04:23 +08:00
WangRunji
5b91db9d76 Move interrupt mod 2018-04-16 00:27:45 +08:00
WangRunji
d330bd8224 Merge branch 'dev' into move-kernel-va
# Conflicts:
#	src/arch/x86_64/boot/linker.ld
#	src/consts.rs
#	src/interrupts/mod.rs
2018-04-15 21:30:43 +08:00
WangRunji
cea8ccdac9 Recover IDT, using Once<> 2018-04-15 20:42:42 +08:00