1
0
mirror of https://github.com/rcore-os/rCore.git synced 2024-11-23 16:36:18 +04:00
Commit Graph

76 Commits

Author SHA1 Message Date
WangRunji
950fe4fedc Use crate log. Print with color in console. 2018-05-19 18:42:08 +08:00
WangRunji
d798c8084a Pass uCore forktest 2018-05-19 16:32:18 +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
09147732bc Fix user stack. Make MemoryArea fields private. 2018-05-13 02:30:26 +08:00
WangRunji
b885b7ce6a Fix check for MemorySet. Fix copy user program. 2018-05-13 01:57:49 +08:00
WangRunji
40b02c33cb Switch page table for user process 2018-05-13 00:47:16 +08:00
WangRunji
369f3183a3 Ready for running user process. TODO: switch page table 2018-05-12 22:57:30 +08:00
WangRunji
82739d3d3d Update crate multiboot2 to 0.5 . Get section's name. 2018-05-12 12:05:01 +08:00
WangRunji
dff2c4d1be Refactor remap_the_kernel using MemorySet 2018-05-12 11:45:31 +08:00
WangRunji
5714df7c39 Remove temporary_page from function args 2018-05-12 00:22:00 +08:00
WangRunji
5075abc5b0 Make FrameAllocator global! 2018-04-28 17:47:17 +08:00
WangRunji
5707dfd00a Merge branch 'memory' into process
# Conflicts:
#	src/arch/x86_64/smp.rs
#	src/memory/mod.rs
2018-04-28 13:32:46 +08:00
WangRunji
62cb97de8c Fit name conventions by Clion, simplify some names. 2018-04-28 13:32:16 +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
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
7b3b59bf1e Update crate bitflags to 1.0 2018-04-17 20:55:12 +08:00
WangRunji
77703442e7 Move paging mod to arch, as Redox did. 2018-04-16 01:04:23 +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
d5cd4673fb Discard va to pa. Higher half kernel complete. 2018-04-15 21:17:38 +08:00
WangRunji
230d5a0287 Move remap_the_kernel() out of paging mod. Add page fault handler. 2018-04-15 17:26:56 +08:00
WangRunji
9b4d9a4a1f Init IDT at beginning 2018-04-15 15:00:04 +08:00
WangRunji
ab37e359ac Temporarily map pages and run pass APIC init. 2018-04-13 22:57:41 +08:00
WangRunji
bacc97ee94 Move address to memory mod. 2018-04-13 20:28:38 +08:00
WangRunji
03d4adfcfe Fix rsp. Use PhysicalAddress. 2018-04-13 18:41:39 +08:00
WangRunji
ca683e4787 More strict PhysicalAddress type 2018-04-13 15:14:19 +08:00
WangRunji
3b4f855763 Modify remap_kernel() 2018-04-13 14:22:50 +08:00
WangRunji
eb9a5e9241 Impl Debug for page table 2018-04-05 18:41:31 +08:00
Philipp Oppermann
f1459a552c Return a memory controller from memory::init 2017-11-19 14:24:27 +01:00
Philipp Oppermann
73d4390f27 Create a memory manager for convenience 2017-11-19 14:23:45 +01:00
Philipp Oppermann
0e3857ca50 Create a stack allocator module 2017-11-19 14:23:45 +01:00
Philipp Oppermann
01f8c43ffb Map the heap pages to physical frames 2017-11-19 14:20:46 +01:00
Philipp Oppermann
f2bbe43099 Use once crate to ensure that memory::init is only called once 2017-11-19 14:20:45 +01:00
Philipp Oppermann
76550dcd95 Refactor: Move memory initialization to memory::init function 2017-11-19 14:20:45 +01:00
Philipp Oppermann
c0d403abbe Set a global allocator 2017-11-19 14:20:45 +01:00
Philipp Oppermann
9dc998222a Make the bump allocator lock free and impl Alloc for shared reference 2017-11-19 14:20:45 +01:00
Philipp Oppermann
1f6633fe44 Add a heap_allocator module with a basic bump allocator 2017-11-19 14:20:45 +01:00
Philipp Oppermann
c6dd37dcc5 Turn page of old P4 into guard page 2017-11-19 11:44:50 +01:00
Philipp Oppermann
0ce2b46ad1 Use the correct entry flags for kernel sections 2017-11-19 11:44:50 +01:00
Philipp Oppermann
11993b7e15 Also identity map the multiboot info structure 2017-11-19 11:44:50 +01:00
Philipp Oppermann
fdacfb24f0 Fix boot loop by identity mapping the vga buffer 2017-11-19 11:44:50 +01:00
Philipp Oppermann
564c6b64e9 Switch to the new page table after mapping all sections 2017-11-19 11:44:50 +01:00
Philipp Oppermann
40f1732ccb Call remap_the_kernel from rust_main 2017-11-19 11:44:49 +01:00
Philipp Oppermann
e029eabe18 Add a remap_the_kernel function 2017-11-19 11:44:49 +01:00
Philipp Oppermann
60d7c736a5 Add a (now safe) with method 2017-11-19 11:44:49 +01:00
Philipp Oppermann
2f30b0f7cf Create a new ActivePageTable struct that derefs to Mapper 2017-11-19 11:44:49 +01:00
Philipp Oppermann
ce9c4d6e43 Refactor: Move ActivePageTable to new mapper submodule and rename to Mapper 2017-11-19 11:44:49 +01:00
Philipp Oppermann
4160cb6d7e Begin creating an ActivePageTable::with function 2017-11-19 11:42:33 +01:00