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

1256 Commits

Author SHA1 Message Date
ssryps
93a4962205 fix a bug of epoll module 2019-11-03 23:35:10 +08:00
ssryps
14f0965bd2 finish epoll implementation 2019-11-03 23:35:10 +08:00
ssryps
ba09ab92a8 modify select implementation 2019-11-03 23:34:26 +08:00
ssryps
0aa995d98c improve the implementation of poll 2019-11-03 23:34:26 +08:00
ssryps
d1c2a2c731 finish lab1 2019-11-03 23:34:26 +08:00
Runji Wang
7d849f8d30 fix fb_bitfield for all pixel formats 2019-11-02 01:28:02 +08:00
Runji Wang
242cbfa76c implement sys_pselect6, same as sys_select 2019-11-02 00:56:48 +08:00
Runji Wang
1ee6796346 init FramebufferInfo for VirtIOGPU 2019-11-01 17:14:43 +08:00
Runji Wang
91a4860b64 Rust style docs and cargo fmt 2019-11-01 15:12:56 +08:00
刘丰源
74b13a449a fix bugs 2019-10-30 18:08:45 +08:00
刘丰源
d28ce19ae4 update ioctl 2019-10-30 17:06:30 +08:00
Runji Wang
d4702faa0f fix SYS_IPC on mips 2019-10-26 11:29:27 +08:00
Runji Wang
b7a192a1ea move all process related semaphore operations to struct SemProc 2019-10-24 20:33:00 +08:00
Runji Wang
a99f4396eb clean and improve code 2019-10-24 19:44:42 +08:00
LoremKang
0b05a58e3b update submodule rboot & user. format the code. 2019-10-24 15:50:46 +08:00
LoremKang
4da6a1471a support SEM_UNDO. now support all 3 syscall without safety check. 2019-10-22 23:23:30 +08:00
LoremKang
702ea47ae8 fix the deadlock bug. semaphores now work well without SEM_UNDO. 2019-10-22 16:15:03 +08:00
LoremKang
e6b4c77c05 solve a potential unwrap error. deadlock when child lock first. 2019-10-22 14:58:48 +08:00
LoremKang
a180c3b4bb solve the deadlock problem & sometimes pass test. 2019-10-22 14:30:23 +08:00
LoremKang
198717c071 try to solve the deadlock problem caused by locking SemArray while waiting for Semaphores. 2019-10-22 13:48:17 +08:00
LoremKang
d4d57a5095 finish semctl.setval. pass compilation. 2019-10-21 15:33:40 +08:00
HongboKang
c241ec1f5b finish semget & semop. write a small test on semget. 2019-10-21 14:55:17 +08:00
HongboKang
64cdfa277f pass compilation with semget and part of semop. 2019-10-18 02:16:32 +08:00
HongboKang
374c34cd34 write code for semget and semop. not compiled yet. 2019-10-14 23:30:20 +08:00
Bran
3caa091ec5 solve forktest problem, release zombie process when parent process exits. (#21) 2019-10-14 01:36:48 +08:00
Runji Wang
b11e1b9be1 update user submodule and thread crate
fix some bugs in ucore programs found at OSTrain2019
2019-10-06 13:47:55 +08:00
equation314
44f1c8e8c3 aarch64: Add some comments for SMP booting 2019-10-05 15:45:32 +08:00
equation314
3069e17d78 Remove unnecessary lazy_static 2019-10-05 13:02:43 +08:00
equation314
9f6cb5966d Fix typo 2019-10-05 13:00:47 +08:00
equation314
6a7c72dbde aarch64: add mutex for KERNEL_MEMORY_SET, update bcm2837 2019-10-05 00:11:50 +08:00
equation314
90c2cd28f8 aarch64: use new cache & TLB maintenance operations 2019-10-04 23:25:42 +08:00
equation314
acd7ee945a Flush I/D cache after copying user code in page fault handler
* Now SMP works in real machine with no bugs!!!
2019-10-04 14:05:20 +08:00
equation314
444ce34859 aarch64: SMP works in real machine, but still have bugs 2019-10-03 21:04:22 +08:00
equation314
344ff85a21 Pass the environment variable SMP to consts::SMP_CORES 2019-09-29 15:36:43 +08:00
equation314
fee3e87110 aarch64: SMP works in qemu!!! 2019-09-28 23:39:09 +08:00
equation314
c6a4792f13 aarch64: update crate bcm2837 to use local timer 2019-09-28 01:30:29 +08:00
Yuekai Jia
c99266c013
Merge branch 'master' into dev 2019-09-26 11:29:39 +08:00
equation314
f76208542b aarch64: add map_kernel() function
* create fine-grained mappings in memory::init()
* put physical memory mappings to 0xFFFF_8000_0000_0000
* reuse ioremap() for framebuffer memory
2019-09-26 02:25:02 +08:00
equation314
48d7fb091a aarch64: no longer use bootloader, enable paging in entry.S 2019-09-24 20:12:28 +08:00
Runji Wang
3beddf12da build: remove filling symbols. prepare command 'make test'. 2019-09-24 14:26:18 +08:00
Runji Wang
2722371d86 mips: fix build 2019-09-24 01:49:08 +08:00
Runji Wang
8dac3f107f travis: remove GCC toolchain, download prebuilt user image from github release 2019-09-24 01:49:08 +08:00
equation314
233ccdd914 Fix fnctl nonblock check
musl will add extra flags when set `arg` to `O_NONBLOCK` for non-x86 architecture
2019-09-23 22:16:20 +08:00
fengyuan
0639affc55 error exit will return to shell 2019-09-18 23:38:46 +08:00
Runji Wang
5a2f1d5be0 x86_64: use ACPI address from bootloader 2019-09-14 00:27:39 +08:00
Runji Wang
a07822a446 x86_64: fix for real hardware. remove legacy drivers. 2019-09-13 23:00:00 +08:00
Runji Wang
590df849f3 update Rust toolchain and README
NOTE: MIPS is broken due to a Rust compiler bug
2019-09-11 23:58:52 +08:00
Runji Wang
50d833e420 refactor fb & console mod structure
- move both modules to crate::drivers
- no longer need `probe_fb_info` for each board
2019-09-11 23:58:52 +08:00
Jiajie Chen
0778f8f84c Bump rcore-console version, fixing mipsel compilation 2019-09-11 23:48:10 +08:00
Runji Wang
c2a80c54f9 x86_64: switch from legacy BIOS to UEFI. use rboot as new bootloader
- remove dependencies: rust-osdev/{bootloader, bootimage}
- remove kernel stack segment
- find a bug: IDT should be initialized after GDT
2019-09-04 10:37:31 +08:00
Runji Wang
977c0badcb remove 'runui' makefile command 2019-09-03 12:15:33 +08:00
equation314
d65aba8470 Update FramebufferInfo 2019-09-03 00:27:23 +08:00
equation314
22f5cf93fd aarch64: map framebuffer & set mem attr in bootloader 2019-09-02 21:46:41 +08:00
equation314
2237d2e5bd aarch64: pass bootinfo from bootloader to kernel 2019-08-30 18:22:28 +08:00
equation314
fa30f5f96b aarch64: fix bus address for mailbox property 2019-08-28 21:38:50 +08:00
equation314
d56a88947e aarch64: set ttbr0_el1 to null for kernel thread, fixed #56 2019-08-28 01:41:47 +08:00
Jiajie Chen
55cfce6c02 Show target in logging, and fix console deadlock 2019-08-23 10:44:24 +08:00
Runji Wang
c881bdc65d move Console to extern crate
also remove x86_64 VGA text mode support
2019-08-16 11:11:49 +08:00
Jiajie Chen
100f3b9525 Implement /dev/{u,}random 2019-08-07 19:22:14 +08:00
Jiajie Chen
655c1f19c2 Move impl_inode default impl to rcore-fs crate 2019-08-07 18:55:35 +08:00
Jiajie Chen
92d878c144 Correctly report rdev of device nodes 2019-08-05 18:20:17 +08:00
Jiajie Chen
287e48adde Only create /dev /tmp directories when they do not exist 2019-08-05 18:01:45 +08:00
WangRunji
78b322e842 update crates 2019-08-02 17:34:55 +08:00
WangRunji
52d72790bc introduce MountFS, mount RamFS at /tmp, mount DevFS at /dev 2019-08-02 17:24:27 +08:00
WangRunji
2db599ab40 fix deprecated warnings 2019-07-24 22:43:15 +08:00
WangRunji
f132e61c98 simplify including DTB file using include_bytes!() 2019-07-24 22:41:26 +08:00
Jiajie Chen
08b59be1ae Use updated ACPI crate to parse ACPI in x86 2019-07-17 09:43:49 +08:00
Jiajie Chen
0b0e364fcd Use Option to replace usage of MaybeUninit in paging 2019-07-05 10:53:26 +08:00
Jiajie Chen
de6d5b6d54 Fix rv32 page table panic 2019-06-30 16:54:18 +08:00
Jiajie Chen
7a2383eba6 Fix unused unsafe for mipsel and riscv32 2019-06-30 16:26:54 +08:00
Jiajie Chen
5dc74c60d2 Use ..= instead of ... 2019-06-30 15:54:33 +08:00
Jiajie Chen
5f9cbc7b2c Eliminate stable feature and unused unsafe warnings 2019-06-30 15:50:43 +08:00
Jiajie Chen
96357e63df Bump rust version to newer nightly and use acpi crate to print acpi info 2019-06-30 03:41:50 +08:00
Jiajie Chen
087e18b202 Implement reboot in sys_reboot 2019-06-30 01:33:07 +08:00
Jiajie Chen
e77e09a949 Use IRQ_MANAGER in drivers 2019-06-30 01:11:40 +08:00
Jiajie Chen
dec07da035 Add irq manager for drivers 2019-06-29 21:19:45 +08:00
Jiajie Chen
ffe4fae975 Fix ahci driver and match ahci driver by SATA class 2019-06-28 17:01:31 +08:00
Jiajie Chen
4607e0646d Fix vga in vmware 2019-06-27 11:28:03 +08:00
Jiajie Chen
a285b242e9 Fix compilation for mipsel 2019-06-16 22:02:25 +08:00
Jiajie Chen
7cfa6a1ee4 Make emmc less verbose 2019-06-16 09:48:50 +08:00
Jiajie Chen
26e06c5cf4 Fix rv paging abort issue 2019-06-16 09:19:38 +08:00
Jiajie Chen
f09dc0cce0 Fix compilation for riscv 2019-06-16 00:42:04 +08:00
Jiajie Chen
07b75b0a74 Fix fill_symbols aarch64 on macOS 2019-06-16 00:11:25 +08:00
Jiajie Chen
164e94a146 Separate SFSIMG and SFSQCOW2 and fix aarch64 qemu boot 2019-06-16 00:03:32 +08:00
Jiajie Chen
81c77586c6 Adapt fill_symbols for macOS 2019-06-15 23:43:01 +08:00
Jiajie Chen
611c2dd5bf Align vm area to page boundary and fix musl's reclaim() 2019-06-15 22:26:28 +08:00
gjz010
da8699c44e
Merge branch 'dev' into shared-library 2019-06-09 19:32:00 +08:00
gjz010
7ad8c6a6d2 Shared library done in a formal way (using auxv). Now kernel loads both loader and program.
Known issues: not compatible with musl's reclaim_gaps (crash on __malloc_donate). Removing reclaim makes hello world work.
2019-06-09 19:25:43 +08:00
Jiajie Chen
5ecdb4e656 Change release to mode in Makefile 2019-06-08 22:36:41 +08:00
gjz010
7b8252eb1b Basic loadable kernel module support, with a module template written in Rust.
Under aarch64 and x86_64, hello_rust can be built and loaded by `/busybox insmod hello_rust.ko`.
2019-06-07 20:59:51 +08:00
gjz010
da028c1f10 Added virtual memory support for aarch64 and x86_64.
1. Memory mapping at KSEG2_START(0xffff_fe80_0000_0000) will now be visible to all processes.
   This feature is required by Loadable Kernel Module when mapping kernel module into memory.
2. Wrapping PageTableImpl::active() into ManuallyDrop, so that no extra "mem::forget" is required.
3. Added PageTableImpl::kernel_table(). This function is the same as active() on x86_64, but not the same on aarch64.
2019-06-07 15:57:18 +08:00
Jiajie Chen
8e5e798d78 Do not print to graphci console unless graphic=console on aarch64 2019-06-03 09:47:57 +08:00
Jiajie Chen
d8ea224283 Fix mgba merge 2019-06-03 09:46:27 +08:00
Jiajie Chen
a42d4b4d26 Merge branch 'mgba' into dev 2019-06-03 09:44:28 +08:00
Jiajie Chen
c8b0014c5f Remove u-boot support 2019-06-03 09:36:01 +08:00
Jiajie Chen
8b06314828 Format code and update debug code 2019-06-03 09:33:02 +08:00
Jiajie Chen
33513ded94 Merge remote-tracking branch 'sdcard/geminilab' into sdcard 2019-06-03 09:27:21 +08:00
NagiNikaido
730f5d94a6 write() check passed. a minor bug fixed. 2019-05-30 17:06:13 +08:00
NagiNikaido
e20a2ca8e2 Now we can parse the partion entries. Yeeeeaaahh! 2019-05-30 14:57:20 +08:00
NagiNikaido
a3f8601d18 HUGE SUCCESS! Now we can fetch the first section of an SD card.
the bug of SCR fixed.
2019-05-30 01:49:44 +08:00
BenjaminPMLovegood
cb682392f4 add emmc option for qemu 2019-05-29 18:38:59 +08:00
NagiNikaido
6a00cf602b tons of bugs fixed. moved sd_get_base_clock_hz() to mailbox 2019-05-29 18:32:43 +08:00
NagiNikaido
4b543a189f debug info added. 2019-05-27 18:39:20 +08:00
NagiNikaido
3535faccd9 Merge branch 'dev' of https://github.com/rcore-os/rCore into rcore-os-dev 2019-05-27 16:34:29 +08:00
PanQL
e8c38d748f
Merge pull request #54 from rcore-os/dev
Fix check_and_clone_cstr null check
2019-05-25 22:14:41 +08:00
PanQL
376ca53f3a
Merge branch 'mgba' into dev 2019-05-25 21:21:02 +08:00
PanQL
7df015842d some about ioctl fb info 2019-05-25 21:08:43 +08:00
Yuhao Zhou
a708ee401d Fix syscall in thinpad. 2019-05-25 20:05:27 +08:00
Yuhao Zhou
2b96462da3 Fix malta const. 2019-05-25 18:04:54 +08:00
BenjaminPMLovegood
d2f583a948 wrap init 2019-05-25 17:57:02 +08:00
Yuhao Zhou
65b121e55e Merge remote-tracking branch 'origin/dev' 2019-05-25 14:51:45 +08:00
Yuhao Zhou
0938a0cb58 Update malta consts. 2019-05-25 14:33:52 +08:00
BenjaminPMLovegood
335f4701eb modified 2019-05-25 14:28:55 +08:00
Jiajie Chen
35e909d96b Fix check_and_clone_cstr null check 2019-05-25 13:51:21 +08:00
Jiajie Chen
cd49ee5093 Fix x86_64 fb depth 2019-05-25 11:39:42 +08:00
Jiajie Chen
235005608d Do not hardcode fb addr in Vga 2019-05-25 08:29:54 +08:00
Jiajie Chen
30f94238b8 Yeild when polling for EAGAIN 2019-05-25 07:48:49 +08:00
Jiajie Chen
dcfb02c514 Add EAGAIN for nonblocking io and poll for file in read_at() 2019-05-24 20:53:13 +08:00
Jiajie Chen
22946c699d Allow ahci port init to fail 2019-05-24 19:21:48 +08:00
Jiajie Chen
0be1b1e56b Support 32bit MSI Addr 2019-05-24 16:45:28 +08:00
Jiajie Chen
e2bb86aa54 Get screen info from bootloader for vga 2019-05-24 16:20:25 +08:00
Jiajie Chen
aefbecb127 Merge remote-tracking branch 'origin/mgba' into dev 2019-05-24 15:21:07 +08:00
Jiajie Chen
e9c0bcadf7 Add graphic=console option and fix vga on x86_64 2019-05-24 15:20:39 +08:00
PanQL
fcc8fb4b2d
Merge branch 'mgba' into dev 2019-05-24 11:34:28 +08:00
PanQL
3b6d94efae simple ioctl for fb is reachable 2019-05-24 09:33:03 +08:00
Jiajie Chen
e22cfd9b30 Fix compilation for u540 2019-05-24 09:22:49 +08:00
Jiajie Chen
0971181473 Fix compilation for rv32 2019-05-24 09:09:35 +08:00
Jiajie Chen
c5acdb67e6 Fix compilation for merge and update vga buffer address 2019-05-24 08:57:21 +08:00
Jiajie Chen
53bb55b971 Merge remote-tracking branch 'origin/dev' into dev 2019-05-24 08:42:33 +08:00
Jiajie Chen
f410aef5bc Merge branch 'mipsel' into dev 2019-05-24 08:39:29 +08:00
Jiajie Chen
51c463e120 Remove non-AHCI pci id 2019-05-24 08:28:47 +08:00
Jiajie Chen
51868e1616 Eliminate some warnings 2019-05-23 23:31:36 +08:00
Jiajie Chen
d1d7fe44a7 Fix condvar race(maybe) 2019-05-23 23:21:02 +08:00
Jiajie Chen
f10421bf83 Revert "x86_64: enable interrupt during syscall. set TSS.sp0 through gs."
This reverts commit 72efa797e5.
2019-05-23 23:13:47 +08:00
PanQL
9740983b2d
Merge branch 'mgba' into dev 2019-05-23 21:11:13 +08:00
PanQL
a6f211cef5 fix mmap for framebuffer 2019-05-23 20:59:04 +08:00
WangRunji
1a377ca7c3 x86_64: update bootloader. fix on real machine 2019-05-23 16:46:00 +08:00
WangRunji
9dec0bbda5 simplify copy_from_user 2019-05-23 13:06:39 +08:00
Jiajie Chen
8b07e7d31c Fix extra parentheses 2019-05-23 08:20:00 +08:00
Harry Chen
3658e265a8 Update device tree file and add stub for SYS_RT_SIGQUEUE
Signed-off-by: Harry Chen <i@harrychen.xyz>
2019-05-23 02:19:42 +08:00
Harry Chen
0614e2b1aa Merge branch 'dev' into mipsel
Signed-off-by: Harry Chen <i@harrychen.xyz>
2019-05-22 23:38:21 +08:00
Jiajie Chen
6f5414c531 Split router ports into different ifaces 2019-05-22 18:25:51 +08:00
Jiajie Chen
20da06add5 Fix rcore router for linear mapping 2019-05-22 14:37:59 +08:00
Jiajie Chen
c67f00d7ca Use MaybeUninit for uninitialized 2019-05-22 14:23:04 +08:00
equation314
e63f11d199 console: support \t 2019-05-21 00:59:59 +08:00
equation314
97539dd760 aarch64: speed up page table map/unmap
1. update crate aarch64, call tlb_invalidate() instead of tlb_invalidate_all() in MapperFlush::flush().
2. reduce user stack size to 1MiB.
2019-05-21 00:46:12 +08:00
equation314
52251b2adb aarch64: refactor to linear mapping
TODO:
* `map`, `unmap` is significantly slower than other archs
* set segment permissions for kernel page table in bootloader
2019-05-20 21:51:53 +08:00
PanQL
f8c88baeea nonblock stdin for mgba keyboard support 2019-05-20 10:28:27 +08:00
BenjaminPMLovegood
469e866dca Merge branch 'geminilab' of github.com:GeminiLab/rCore into geminilab 2019-05-20 03:14:51 +08:00
BenjaminPMLovegood
e9588086be sd_init 2019-05-20 03:14:37 +08:00
NagiNikaido
62654b99f9 SEND_SCR done & bug fixed. 2019-05-20 00:22:53 +08:00
PanQL
f9734b6134 mmap support for mgba's partical redraw 2019-05-19 17:09:05 +08:00
PanQL
545d9d301c use copy_from_slice to speed up 2019-05-17 00:53:23 +08:00
Jiajie Chen
3cdd3231d8 Update enlarge heap and drivers provider 2019-05-16 08:47:22 +08:00
Jiajie Chen
41da379593 Use new check_and_clone_cstr{,array} 2019-05-16 00:49:46 +08:00
Jiajie Chen
14a01cf3fc Implement fixup for mipsel and small fixes 2019-05-16 00:28:29 +08:00
Jiajie Chen
6344f80a9b Support efault fixup for riscv 2019-05-15 23:12:06 +08:00
Jiajie Chen
92a9674f66 Implement efault detection by fixup 2019-05-15 22:45:09 +08:00
Harry Chen
fbca9a6e3a Add conditional compilation for mipsel, fix heap size for thinpad
Signed-off-by: Harry Chen <i@harrychen.xyz>
2019-05-14 00:21:04 +08:00
Harry Chen
22d29a6257 Revert "Revert "Fix trapframe.""
This reverts commit 6a83de7846.
2019-05-14 00:11:25 +08:00
Harry Chen
6544093dc6 Revert "Revert "Save/restore FP registers when context switching (broken mipsel arch)""
This reverts commit b8f4ee2ce8.
2019-05-14 00:11:22 +08:00
Harry Chen
b8f4ee2ce8 Revert "Save/restore FP registers when context switching (broken mipsel arch)"
This reverts commit d261b4e0b3.
2019-05-13 23:53:52 +08:00
Harry Chen
6a83de7846 Revert "Fix trapframe."
This reverts commit 297c9d453d.
2019-05-13 23:53:47 +08:00
Yuhao Zhou
297c9d453d Fix trapframe. 2019-05-13 22:20:52 +08:00
Harry Chen
d261b4e0b3 Save/restore FP registers when context switching (broken mipsel arch)
Signed-off-by: Harry Chen <i@harrychen.xyz>
2019-05-13 21:18:25 +08:00
PanQL
9e4a3f9662 create virtual vga file, now can draw fb on user state 2019-05-13 20:57:03 +08:00
NagiNikaido
8c3323c4d4 mutex added. 2019-05-13 13:47:33 +08:00
NagiNikaido
edf9cf1225 nearly done. it seems that the architecture is not applausible. rust sucks. 2019-05-13 05:04:18 +08:00
Yuhao Zhou
6add7002fd Update consts for MIPS.malta 2019-05-12 22:56:34 +08:00
Harry Chen
9203a612f8 Merge branch 'dev' into mipsel 2019-05-12 22:41:51 +08:00
Jiajie Chen
deba6e9204 Fix phys_to_virt 2019-05-12 15:32:30 +08:00
Jiajie Chen
221304d78a Use phys_to_virt and virt_to_phys to replace the use of KERNEL_OFFSET 2019-05-12 15:28:42 +08:00
Jiajie Chen
28652ef685 Fix rv mask 2019-05-12 07:14:30 +08:00
Jiajie Chen
ba8f9370ba Remove rv48 support, for it has no use and it's easy to add back when necessary 2019-05-12 01:46:55 +08:00
Jiajie Chen
5afd84e5d3 Finish rv64 with sv39 support 2019-05-12 01:44:49 +08:00
PanQL
9ac8f1b887 some work for console-vga(1024*7683) adaption 2019-05-12 01:43:02 +08:00
Jiajie Chen
26e47fc36f [WIP] Initial rv64 sv39 support 2019-05-12 01:11:53 +08:00
Jiajie Chen
0d801eceb5 [WIP] Fix rv32 serial interrupt 2019-05-11 23:12:05 +08:00
Jiajie Chen
f6a54c398d [WIP] rv32 can enter userland now 2019-05-11 23:10:19 +08:00
Jiajie Chen
cf6a7746f4 [WIP] update rv32 linear mapping 2019-05-11 22:50:41 +08:00
Yuhao Zhou
c1d139598c Merge remote-tracking branch 'origin/dev' into mipsel 2019-05-11 18:24:20 +08:00
Jiajie Chen
d66df43ec0 [WIP] rv32 linear mapping 2019-05-11 12:21:58 +08:00
WangRunji
c8262f936f fix paging for mips 2019-05-11 12:00:39 +08:00
WangRunji
cd22273ef9 refactor to linear mapping for x86_64 2019-05-11 01:06:44 +08:00
Jiajie Chen
8149793b9a Fix typo in mips paging 2019-05-10 17:34:18 +08:00
Harry Chen
75b67fa575 Replace \n to \r\n in serial driver
Signed-off-by: Harry Chen <i@harrychen.xyz>
2019-05-10 17:25:49 +08:00
PanQL
66b783de21 should not be so rude 2019-05-10 14:56:14 +08:00
WangRunji
6e5b3e2515 fix broken pipe status. rustc works now! 2019-05-10 12:28:37 +08:00
Jiajie Chen
6bb11a5433 Reset router tx/rx fifo and fix tx length 2019-05-10 08:10:03 +08:00
WangRunji
fbd2aef916 fix page table racing by adding a global mutex 2019-05-10 00:11:09 +08:00
WangRunji
ba8d08d733 fix Process dropping by making proc.parent a weak reference 2019-05-09 23:56:39 +08:00
WangRunji
9df9d01e68 impl deadlock detection 2019-05-09 22:27:44 +08:00
WangRunji
d28f54ce32 show tid on log 2019-05-09 21:33:26 +08:00
PanQL
a0fc201695 set up vga 320x200 2019-05-09 21:16:25 +08:00
Jiajie Chen
2653069a43 Implement tx for router driver 2019-05-09 17:54:10 +08:00
Jiajie Chen
5932372750 Initial rcore router device support 2019-05-09 17:08:28 +08:00
Harry Chen
324b64c2ed Merge remote-tracking branch 'rcore/dev' into dev 2019-05-09 10:24:12 +08:00
Harry Chen
887a207c8b Run cargo fmt
Signed-off-by: Harry Chen <i@harrychen.xyz>
2019-05-09 10:12:19 +08:00
Harry Chen
5b53e86c41 Merge remote-tracking branch 'origin/dev' into mipsel 2019-05-09 10:05:32 +08:00
WangRunji
75919dce41 x86_64: simplify IPI 2019-05-08 23:07:58 +08:00
Jiajie Chen
2adbc4dcd9 Format code and use rust/sh for rocket chip shell 2019-05-08 20:54:18 +08:00
gjz010
c88c0193d4 x86_64: impl IPI and remote flush tlb
Signed-off-by: WangRunji <wangrunji0408@163.com>
2019-05-08 19:36:10 +08:00
Jiajie Chen
e3595dd0f5 Implement sys_copy_file_range and use it for sendfile 2019-05-08 19:23:07 +08:00
chyyuu
ccc7eea114 add ioctl request id: FIONBIO (no real action, just return Ok(0)). p.s. for rustc 2019-05-08 19:08:04 +08:00
chyyuu
d9d21a3db1 fix bug: sys_futex should not check timeout parameter for musl libc 1.1.22 2019-05-08 16:39:34 +08:00
chyyuu
252449a198 Merge branch 'dev' of github.com:rcore-os/rCore into dev 2019-05-08 13:18:35 +08:00
chyyuu
2fa3338b4f add unimplemented syscall SYS_MEMNARRIER from musl-1.1.22 with pthread OPs 2019-05-08 13:18:04 +08:00
chyyuu
537eecaf5e fix bug: the values of CloneFlags 2019-05-08 13:16:00 +08:00
Jiajie Chen
2e599b0bab Fix Rocket Chip serial interrupt 2019-05-08 11:02:23 +08:00
Yuhao Zhou
77ba66a0a3 Update page table. 2019-05-08 05:41:01 +08:00
Yuhao Zhou
cc5bb8a81f Fix alignment issue in TrapFrame. 2019-05-08 00:31:44 +08:00
equation314
2fb09109bb Fix wrong display in console driver 2019-05-08 00:04:41 +08:00
equation314
03a8b3e449 aarch64: disable FP/SIMD registers again, update crates 2019-05-07 22:37:53 +08:00
Harry Chen
c59cbe0dbc Fix stack alignment problem for MIPS N32 ABI, and fix alignment problem in CharAttribute
Signed-off-by: Harry Chen <i@harrychen.xyz>
2019-05-07 19:50:48 +08:00
Harry Chen
378daa6c9b Fix bugs in Console, repr(C) is TOO EVILgit add src/!
Signed-off-by: Harry Chen <i@harrychen.xyz>
2019-05-07 17:23:54 +08:00
Jiajie Chen
2f2cbb81ac Embed rocket chip dtb in code 2019-05-07 08:40:43 +08:00
Yuhao Zhou
59c1746491 Update default shell. 2019-05-07 00:47:10 +08:00
equation314
bfe03b8ea0 aarch64: fix vm clone fault in fork 2019-05-06 23:30:01 +08:00
Jiajie Chen
35079e4193 Bump buddy system allocator 2019-05-06 12:15:21 +08:00
Jiajie Chen
056c2c5a36 Fix thinpad shell 2019-05-06 11:38:53 +08:00
Jiajie Chen
af5c6ee237 Fix compilation on thinpad 2019-05-06 11:35:43 +08:00
Jiajie Chen
073108e0f8 Fix compilation on mipsel 2019-05-06 11:03:31 +08:00
Jiajie Chen
b2777032c8 Merge remote-tracking branch 'origin/mipsel' into dev 2019-05-06 10:58:27 +08:00
Harry Chen
e94fe1564e Init console on ThinPad, seems not wworking properly
Signed-off-by: Harry Chen <i@harrychen.xyz>
2019-05-06 10:48:27 +08:00
BenjaminPMLovegood
dbf4928c77 finish some functions 2019-05-06 01:21:48 +08:00
NagiNikaido
7c36581002 timeout_wait done 2019-05-06 00:08:50 +08:00
BenjaminPMLovegood
6520a1e5c7 . 2019-05-05 23:49:01 +08:00
NagiNikaido
dc4875c3b3 sd_cmd const done. 2019-05-05 23:38:51 +08:00
BenjaminPMLovegood
aad5175dbd added consts 2019-05-05 22:59:09 +08:00
NagiNikaido
613102287f struct emmc to be filled. 2019-05-05 22:38:25 +08:00
NagiNikaido
24e3163067 todo-list for emmc.rs 2019-05-05 17:52:18 +08:00
BenjaminPMLovegood
682f772eb8 begin translation 2019-05-05 17:44:03 +08:00
WangRunji
d10e17eb06 fix rv64 stack pointer alignment 2019-05-05 15:30:28 +08:00
BenjaminPMLovegood
8ecefc519f remove some unknown codes and update user submodule 2019-05-05 03:45:01 +08:00
BenjaminPMLovegood
5be9ae7775 Merge branch 'dev' into geminilab 2019-05-05 03:40:18 +08:00
BenjaminPMLovegood
f9bdcc7cd9 add emmc file. waiting for merging main repo. 2019-05-05 03:21:07 +08:00
WangRunji
3af0cf7e16 fix warnings 2019-05-04 15:27:17 +08:00
WangRunji
b2de8dc9e6 fix page table racing on multi-thread 2019-05-04 14:36:12 +08:00
WangRunji
da58486be5 refactor syscall: move all context and functions to struct Syscall 2019-05-04 13:16:42 +08:00
WangRunji
08d10522ff impl sys_set_tid_address. ignore invalid 'clear_child_tid' on exit 2019-05-04 00:20:19 +08:00
WangRunji
98a99e33c6 fix '/proc/self/fd' panic 2019-05-03 15:45:39 +08:00
Jiajie Chen
f1971c489a Fix riscv32 testing 2019-05-03 15:17:06 +08:00
Jiajie Chen
7331404fc7 Fix /proc/self/fd not found panic 2019-05-03 15:00:45 +08:00
Jiajie Chen
6d14fbf3db Fix typo in ioctl 2019-05-03 14:32:06 +08:00
Jackey-Huo
c63831870d remove the fxxk words.... 2019-05-03 14:06:00 +08:00
Jackey-Huo
f25faef01c Merge branch 'dev' of github.com:rcore-os/rCore into dev 2019-05-03 13:55:51 +08:00
chyyuu
19200e40d0 impl pseudo INode '/proc/self/fd/FD_NUM' for rustc app 2019-05-03 13:06:18 +08:00
Jackey-Huo
6ec65b3c1d Merge branch 'dev' of github.com:rcore-os/rCore into dev 2019-05-03 11:40:06 +08:00
Jiajie Chen
28aaae53b9 Refactor ioctl numbers and add FIOCLEX 2019-05-03 11:33:56 +08:00
Jackey-Huo
e91718648e add htif read function for rocket-chip 2019-05-03 11:33:44 +08:00
WangRunji
6883127d5a update fs. add BlockCache 2019-05-03 00:35:00 +08:00
Jackey-Huo
e594a4af32 stage debug code for output 2019-05-02 21:32:19 +08:00
Jiajie Chen
feae733bb9 Implement poll for pipes 2019-05-02 15:52:56 +08:00
Jiajie Chen
64b383b69c Save path even in release mode 2019-05-02 15:47:10 +08:00
Jiajie Chen
ad2f02388c Fix compilation on mipsel 2019-05-02 15:18:41 +08:00
Jiajie Chen
81fde731d0 Save and log file paths on sys_open and sys_close 2019-05-02 15:07:06 +08:00
WangRunji
6c988c4bfd note potential lost wakeup problem in Condvar. fix some use case. 2019-05-01 23:37:07 +08:00
Jiajie Chen
8651f09b31 Automatically enlarge heap when kernel heap is about to run out 2019-05-01 18:33:55 +08:00
WangRunji
54de0d8ae7 remove once crate. fix bitvec crate commit id. 2019-05-01 00:18:11 +08:00
Jiajie Chen
2f6f8ef9bc Add syscall timing using rdtsc 2019-04-30 21:32:32 +08:00
WangRunji
ba74f93ab8 x86_64: shrink kernel heap size and remove 'enlarge_heap' 2019-04-30 19:31:08 +08:00
WangRunji
bc1bad3060 optimize sys_exec: only read ELF header 2019-04-30 19:21:14 +08:00
WangRunji
c885ea6d77 impl pseudo INode '/proc/self/exe' 2019-04-30 17:37:18 +08:00
Jiajie Chen
bd158e4e74 Do not panic when exec file is invalid 2019-04-30 17:10:35 +08:00
WangRunji
60cdea81d9 fix check user ptr across VMAs 2019-04-30 16:30:00 +08:00
WangRunji
a25c8132fe delay mapping file 2019-04-30 15:02:52 +08:00
Harry Chen
582268ec21 Enable framebuffer support for thinpad
Signed-off-by: Harry Chen <i@harrychen.xyz>
2019-04-30 13:31:14 +08:00
WangRunji
88e1055eed refactor fork MemorySet, introduce clone_map to MemoryHandler 2019-04-30 11:34:31 +08:00
Yuhao Zhou
2140ec6bef Add thinpad settings. 2019-04-30 06:34:34 +08:00
WangRunji
8024401bd2 simplify x86_64 consts. keep MemoryArea order by start address 2019-04-30 01:45:01 +08:00
Yuhao Zhou
b45d75c168 Align base address in init_heap(). 2019-04-30 00:10:39 +08:00
Yuhao Zhou
cbad1f2ceb Update simple_uart 2019-04-29 11:55:58 +08:00
Jiajie Chen
ae4badb3cd Force python3.7 for make addr2line 2019-04-29 10:45:04 +08:00
Jiajie Chen
e5894b652c Format code 2019-04-29 10:20:51 +08:00
WangRunji
72efa797e5 x86_64: enable interrupt during syscall. set TSS.sp0 through gs. 2019-04-29 02:50:37 +08:00
WangRunji
5bc6395b23 fix sys_exec 2019-04-29 01:30:57 +08:00
WangRunji
27f5c7b2e4 detach thread to auto recycle tid. fix #25 2019-04-28 23:34:45 +08:00
Harry Chen
ff0fa24897 Move kernel to the beginning of physical memory to save space
Signed-off-by: Harry Chen <i@harrychen.xyz>
2019-04-28 20:28:58 +08:00
Jiajie Chen
fc60d2cea2 Do not poll unrelated files in sys_select 2019-04-28 19:54:42 +08:00
Harry Chen
a744131663 Fix compilation error for thinpad
Signed-off-by: Harry Chen <i@harrychen.xyz>
2019-04-28 17:28:17 +08:00
WangRunji
58271c7c8a convert user ptr to reference on check 2019-04-28 17:16:07 +08:00
Jiajie Chen
cd2c78dd46 Add Rocket Chip platform in README 2019-04-27 23:04:10 +08:00
Jiajie Chen
bfd4f8a2a4 Add initial support for Rocket Chip platform 2019-04-27 23:01:44 +08:00
chyyuu
28dbfd66b9 add more comments and CHANGE Fn name: run_user_shell TO add_user_shell 2019-04-27 15:57:34 +08:00
chyyuu
c853eda9b3 disable so many wait4 LOG info 2019-04-26 18:58:42 +08:00
chyyuu
1974cc5853 add syscall: sys_getrandom for python3, etc. 2019-04-26 18:57:54 +08:00
chyyuu
88b54fdacd fix unknow bug: change busybox from docker, maintain the PATH env vars 2019-04-26 14:13:07 +08:00
WangRunji
ab62d542fd allocate pid independently from tid. fix sys_fork return value. 2019-04-26 11:22:27 +08:00
chyyuu
091902ae0d set 'busybox ash' dynamic-linked app from alpine linux as the default init shell in x86_64 environment 2019-04-26 08:38:53 +08:00
chyyuu
aaf9d49fba Merge branch 'dev' of github.com:rcore-os/rCore into dev 2019-04-26 02:35:09 +08:00
chyyuu
0d790f2dc5 add LOG info in sys_exec and new_user, add env var in run_user_shell 2019-04-26 02:34:42 +08:00
WangRunji
b0a1614b75 reorder syscall by function 2019-04-26 01:25:27 +08:00
chyyuu
d8147bd955 fix bug:sys_sendfile: the return value: the length of written file 2019-04-25 23:28:03 +08:00
chyyuu
bac9e77be1 fix bug: sys_sendfile: wrong length of written file 2019-04-25 23:14:23 +08:00
chyyuu
734e01cc46 fix bug: sys_mmap didn't zero clean the anonymous memory
We can use delay mode or eager mode(in added comment codes)
WRJ's great work!
2019-04-25 16:00:29 +08:00
chyyuu
5080ee2579 add log info for envs in new_user function 2019-04-25 10:56:13 +08:00
WangRunji
45c2ec0b17 works on K210! 2019-04-21 23:48:46 +08:00
WangRunji
1e5f901926 shrink kstack size, avoid alloc kstack for init thread 2019-04-21 23:48:46 +08:00
NagiNikaido
5337852270 Merge for #3. 2019-04-21 20:05:05 +08:00
chyyuu
683814d24c Merge branch 'dev' of github.com:rcore-os/rCore into dev 2019-04-21 17:08:41 +08:00