Commit Graph

401 Commits

Author SHA1 Message Date
Runji Wang 143ac8500a refactor pci stage 4 2020-06-14 22:46:46 +08:00
Runji Wang 8c70da4ab4 refactor pci stage 3 2020-06-14 22:46:46 +08:00
Runji Wang 2393e06e91 refactor pci stage 1 2020-06-14 22:46:46 +08:00
Runji Wang ee176c88f2 add convert function from buffer and size to user pointer 2020-06-14 22:46:20 +08:00
Ben Pig Chu 29f50d2312 Various bug fix 2020-06-14 00:38:43 +08:00
Runji Wang 2e7f1faa0e fix PCI bugs on QEMU 2020-06-10 22:28:14 +08:00
Runji Wang 49a9e4b07e fix cargo fmt and clippy 2020-06-10 17:05:19 +08:00
heheda 8ef1b2ff53 timer.cancel 2020-06-10 16:21:27 +08:00
heheda 7bd91d9518 pci_config_read & pci_config_write 2020-06-10 16:21:27 +08:00
heheda fbed7d6b0e pci map interrupt 2020-06-10 16:21:27 +08:00
dflasher d24cf64878 pci_query_irq_mode 2020-06-10 16:21:27 +08:00
dflasher 86489fe357 pci_query_irq_mode 2020-06-10 16:21:27 +08:00
dflasher b226f1a604 pci_enable_bus_master 2020-06-10 16:21:27 +08:00
dflasher 54523b7f37 fix bar size probe error 2020-06-10 16:21:27 +08:00
dflasher 1aab9cd6ac pci_get_bar 2020-06-10 16:21:26 +08:00
dflasher baf9c95ebc pci_get_nth_device 2020-06-10 16:21:09 +08:00
dflasher 40e6aa5d48 fix keyboard problem 2020-06-10 16:21:09 +08:00
dflasher 6a1656c438 a compiled version 2020-06-10 15:49:08 +08:00
dflasher acf298b020 [WIP] pci driver init 2020-06-10 15:49:08 +08:00
dflasher bca27b6fbb pci init : irq part 2020-06-10 15:31:03 +08:00
dflasher ddb5d2a804 pci_cfg_pio_rw implemented 2020-06-10 15:30:32 +08:00
dflasher 9666d16562 fix resource use path inconsistency 2020-06-10 15:30:10 +08:00
dflasher 7dab8eb186 pci 2020-06-10 15:30:10 +08:00
dflasher d59bdd8d7e pci range add or sub 2020-06-10 15:29:48 +08:00
Ben "Pig" Chu ccf348b102
Call thread.start should check status of the process (#47)
* Call proc.start when proc.start
also check proc status when thread start

* fix test
2020-05-24 21:02:50 +08:00
Ben Pig Chu 5ac01bb7a7 Check align of value_ptr in futex syscalls 2020-05-19 21:19:23 +08:00
Ben Pig Chu 4202b4a399 object_get_info returns ZX_ERR_BUFFER_TOO_SMALL 2020-05-18 23:14:38 +08:00
Yiren Zhang 2742aa674f
Socket datagram (#41)
* socket datagram and limited size

delete debug print

run cargo clippy

* improve socket code

cargo fmt and clippy

Co-authored-by: deathwish5 <zyr16@mails.tsinghua.edu.cn>
2020-05-17 23:19:24 +08:00
Ben Pig Chu 07c48ab2d7 fix the \r problem
by using lines() instead of split('\n')
2020-05-17 21:52:00 +08:00
Runji Wang 40658bb71d improve Socket code 2020-05-14 14:43:14 +08:00
Runji Wang e1ffcaa08b improve Interrupt code 2020-05-14 14:43:12 +08:00
heheda 1fa9021a2d cargo clippy & cargo fmt 2020-05-14 01:23:51 +08:00
heheda e10a994461 implement socket 2020-05-14 01:19:36 +08:00
heheda 8c31d359b1 skeleton of socket 2020-05-13 21:06:22 +08:00
heheda fe64fc2021 cargo fmt 2020-05-12 21:54:30 +08:00
heheda bcbf889768 Merge remote-tracking branch 'origin/zCore' 2020-05-12 21:25:49 +08:00
heheda d304d2209e use a magic mapping 2020-05-12 18:53:48 +08:00
heheda e0c647afcc fake ioports.request 2020-05-12 15:49:58 +08:00
PanQL 124a8103b1
Support thread time (#31) 2020-05-12 13:31:51 +08:00
heheda 6235c9d08a resource.getinfo 2020-05-12 10:23:19 +08:00
heheda 8fe4881c3e event interrupt 2020-05-12 01:15:30 +08:00
heheda 5db26227ed save 2020-05-11 14:01:58 +08:00
Runji Wang 641eefb77d implement sys_clock_read for libos 2020-05-11 09:38:26 +08:00
Runji Wang 7c2f44840b implement sys_futex_wake_handle_close_thread_exit for libos 2020-05-11 09:23:10 +08:00
heheda 363a1441f2 interrupt.wait 2020-05-11 00:11:56 +08:00
heheda c64bf497d2 interrupt trait 2020-05-10 21:21:22 +08:00
heheda 97e3c66c45 implement interrupt.unbind & fix bug in port for interrupt 2020-05-10 19:25:02 +08:00
Runji Wang b99152ba8f move Resource to dev mod again 2020-05-10 14:50:35 +08:00
Runji Wang d0994e5f5d simplify code of DDK 2020-05-10 14:34:33 +08:00
Runji Wang f211294bbd
Merge pull request #21 from rzswh/merging
DDK: implement BTI, PMT, VMOContiguous
2020-05-10 11:56:45 +08:00
heheda a7aa67da03 fix shell panic at unimplemented 2020-05-10 00:01:10 +08:00
heheda 3908d975ab interrupt trigger, ack, destroy 2020-05-09 23:34:55 +08:00
heheda 81d8c7ebef Merge remote-tracking branch 'origin/merging' 2020-05-09 00:17:30 +08:00
heheda 9bdd654af9 interrupt create 2020-05-09 00:15:24 +08:00
dflasher af5f531412 cargo clippy, fmt and channel fix 2020-05-08 23:46:39 +08:00
dflasher 3b850a6892 fix a pin_count modify bug 2020-05-07 17:00:59 +08:00
dflasher 6bbc949839 format and clippy code 2020-05-05 22:39:12 +08:00
PanQL ea679e5b52 implement channel_write_etc, pass all related tests 2020-05-04 23:19:30 +08:00
dflasher e15ce35e61 Merge remote-tracking branch 'origin/master' into merging 2020-05-04 23:01:35 +08:00
dflasher 6e2c1cae64 Merge remote-tracking branch 'tsinghua/master' into merging 2020-05-04 18:40:50 +08:00
dflasher 73cb395062 fix alloc contiguous 2020-05-04 18:36:07 +08:00
Runji Wang 9909d92dcc move Resource to dev mod 2020-05-04 17:29:03 +08:00
Runji Wang cc1b13e0ef fix vmo.create_physical by checking the resource 2020-05-04 17:12:49 +08:00
Runji Wang 73e174f934 implement sys_pc_firmware_tables 2020-05-04 16:34:26 +08:00
Runji Wang d52bc7c76a improve code for ps 2020-05-04 16:11:53 +08:00
heheda 4090fccbb7 bti_release_quarantine 2020-05-04 15:35:46 +08:00
heheda 404a82f2ce fake Topic::ProcessVmos 2020-05-04 11:37:10 +08:00
heheda 39ad173f6c check pin_count before vmo resize 2020-05-03 23:50:31 +08:00
heheda 27f914c43a fix channel.rs 2020-05-03 23:34:45 +08:00
heheda 2e40154d77 finish sys_pmt_unpin, pass bti.pin 2020-05-03 23:32:56 +08:00
heheda 8adfdfb82e finish sys_bti_pin 2020-05-03 22:50:02 +08:00
dflasher bca9627089 implementing vmo_create_contiguous 2020-05-03 19:08:48 +08:00
heheda 76342f60bd pmt pin without iommu 2020-05-03 16:00:51 +08:00
Runji Wang 60e30e3b28 fix signal 2020-05-03 15:53:51 +08:00
deathwish5 41eb4ce5f0 cargo clippy 2020-05-03 15:53:51 +08:00
deathwish5 a5a8e31dcc fix fifo-test 2020-05-03 15:53:51 +08:00
heheda 099969b41f Some code for pmt, can compile but cannot run 2020-05-03 01:31:41 +08:00
heheda fdc1e64bbf Merge remote-tracking branch 'origin/swh-dev' 2020-05-02 14:20:18 +08:00
heheda b01429e9e5 Bti info & rights check for sys)bit_pin 2020-05-02 00:17:31 +08:00
dflasher 05a7a6bd5a pass most cases in VmoSliceTestCase 2020-05-01 11:44:57 +08:00
PanQL cef56bb149 pass almost all VmoSliceTest 2020-04-30 20:09:27 +08:00
dflasher 36ce18d083 create_child shild_slice implemented 2020-04-30 14:58:47 +08:00
PanQL 25d6c95328 add create_slice for vmo, pass some tests 2020-04-30 10:57:32 +08:00
dflasher 06a11f355a Merge branch 'master' of https://github.com/rcore-os/zCore into merging 2020-04-29 21:42:11 +08:00
dflasher ba1c43f62f create_child return val type 2020-04-29 21:40:44 +08:00
PanQL 6fbf776ead add vmo-op-zero, pass related tests 2020-04-29 17:31:13 +08:00
PanQL f040af7351 remove useless unsafe 2020-04-29 11:06:01 +08:00
Runji Wang bf1d1abd14 convert 'run_task' from weak linkage to function pointer 2020-04-29 01:45:30 +08:00
Runji Wang 92cbb7dbf4 improve FIFO code 2020-04-28 20:28:27 +08:00
Runji Wang e3bd4159d1 Merge remote-tracking branch 'zyr/fifo-dev' into executor 2020-04-28 19:22:06 +08:00
PanQL ea69f7fee1 support ps 2020-04-28 19:17:07 +08:00
Runji Wang 4e65330817 fix cargo clippy 2020-04-28 19:12:11 +08:00
dflasher f73ddfbcd8 cache policy syscalls;
create physical vmo;
more exceptionate handling;
other small fixes
2020-04-27 22:20:29 +08:00
deathwish5 9071a7145d fifo v1.1 2020-04-27 19:47:10 +08:00
heheda 3c00d6cf86 iommu_create & bti_create 2020-04-27 19:41:30 +08:00
deathwish5 99fbf5a498 fifo v1.0 2020-04-27 02:18:08 +08:00
zyr 29ce91caa1 fifo v0.9 2020-04-27 00:26:09 +08:00
deathwish5 28f8714580 just to change branch 2020-04-26 21:53:40 +08:00
Runji Wang 25cfa6d1cb Merge remote-tracking branch 'pql/executor' into executor
# Conflicts:
#	zircon-object/src/vm/vmar.rs
#	zircon-object/src/vm/vmo/mod.rs
#	zircon-object/src/vm/vmo/paged.rs
2020-04-24 21:15:18 +08:00
Runji Wang 3fc9e203f7 improve recent VMO code
- merge `get_page` to `commit`
- add return result for some operations
- simplify page state
2020-04-24 11:26:00 +08:00
PanQL 283057ccc0 add partial object.get_info for KmemStats 2020-04-23 23:57:34 +08:00
Runji Wang b0496a5d35 improve recent VMO code 2020-04-23 20:13:07 +08:00
Runji Wang a0dca1490a reformat code 2020-04-23 20:10:10 +08:00
PanQL aa9b83e7e1 add object_get_info for vmo. 2020-04-22 13:49:04 +08:00
PanQL 9acffc9c6c VmoCloneTestCase passed 2020-04-22 11:37:28 +08:00
PanQL d94d59a51a VmMapping -> Arc<VmMapping> 2020-04-19 17:28:49 +08:00
Runji Wang e0ea3b01f9 fix serial_read on hal-unix. now shell is working on zircon libos on Linux! 2020-04-19 01:42:44 +08:00
Runji Wang 94e58d3eeb fix vdso for zircon libos
there are 2 multi-function syscalls still using syscall instruction...
2020-04-19 01:19:05 +08:00
Runji Wang caa4f8483a fix cargo clippy 2020-04-16 23:32:43 +08:00
Runji Wang 82b3716a51 zcore: console works! 2020-04-16 22:59:35 +08:00
Runji Wang 215b72fb6b add serial_read and move interrupt handler to hal. implement sys_debug_read. 2020-04-16 20:59:25 +08:00
Runji Wang 53f2ed9b06 implement basic kcounter 2020-04-16 00:22:58 +08:00
PanQL dc87c0d1a2 null debug-read and empty iommu-create 2020-04-15 13:51:12 +08:00
PanQL 0a89abf938 add debug info for switch-to-user-program 2020-04-15 02:03:24 +08:00
PanQL b2a9c5f9b4 add simpl exceptionate 2020-04-12 20:55:07 +08:00
Runji Wang 23de0e289f update nightly to 2020-04-06 2020-04-06 16:44:28 +08:00
PanQL 01cc1f14aa add proc name in debug output 2020-04-02 20:37:59 +08:00
PanQL edef5d8f17 add naive debug_read 2020-04-02 19:14:19 +08:00
PanQL 18fddb2ff8 now we can see the $ of sh 2020-04-02 18:42:37 +08:00
PanQL 251e68b36d fix handle_duplicate and handle_replace, adjust process_create 2020-04-02 18:21:58 +08:00
PanQL ba0c676f28 naive job_set_policy; add sys_system_get_event for oom 2020-04-02 16:39:27 +08:00
Runji Wang 4b38743907 HACK syscall to pass arguments to standalone-test 2020-04-02 14:03:28 +08:00
Runji Wang 6bc207111c object: use futures::channel::oneshot to replace our wheels 2020-04-02 14:02:59 +08:00
PanQL 18ae04731f add simple get_object_info for job 2020-04-02 13:59:52 +08:00
PanQL 29a0931acb make object_wait_one cancelable 2020-04-01 18:33:05 +08:00
PanQL 8b7a425e3f add job_set_timer_policy 2020-04-01 15:07:53 +08:00
Runji Wang e9bf6cf6fe zircon-syscall: better debug format for Deadline 2020-04-01 14:30:26 +08:00
Runji Wang b125002f25 object: fix some trivial tests 2020-04-01 14:17:33 +08:00
Runji Wang 0b22d7154b object: add Socket 2020-04-01 13:56:33 +08:00
Runji Wang 0e85d6f763 object: fix thread state after suspend 2020-04-01 13:47:45 +08:00
PanQL 2c8667883a fix some problem for core-test 2020-04-01 02:32:11 +08:00
Runji Wang 60138e2eee zircon-syscall: fix all timeout by using select 2020-03-31 23:36:55 +08:00
Runji Wang 590ac428dd hal: add SleepFuture 2020-03-31 00:17:02 +08:00
Runji Wang 3cd1ae79a2 object: use closure to blocking run future with state change 2020-03-30 23:42:43 +08:00
Runji Wang 245c65f56c tiny code modify 2020-03-30 23:28:54 +08:00
Runji Wang 6a72685211 object: move set_critical to Job 2020-03-30 23:20:14 +08:00
PanQL cdd3122b87 add sys_job_create, partial job_set_policy 2020-03-30 14:59:24 +08:00
PanQL 8673830bfc add channel_read_etc 2020-03-30 09:46:44 +08:00
PanQL 2b14215721 add simple fifo_create 2020-03-30 02:29:41 +08:00
PanQL d021e650f5 to fix channel_call 2020-03-30 02:09:05 +08:00
PanQL 2a1361eaca try to fix args-check in channel_{read, call_noretry} 2020-03-29 23:46:54 +08:00
PanQL f88f0a031c add object_wait_many, adjust object_wait_one 2020-03-29 19:46:58 +08:00
PanQL 8816f7c0d4 fix related id for channel; channel_write consume handles 2020-03-29 13:21:41 +08:00
PanQL ab27cf7791 thread topic for object.get_info; add channel_call_finish 2020-03-29 03:11:23 +08:00
Runji Wang cdbe4ba556 fix channel syscalls 2020-03-28 22:10:53 +08:00
Runji Wang 3c4cb8c86e fix channel call 2020-03-28 22:05:58 +08:00
Runji Wang 23b0ebb2df simplify Result type 2020-03-28 22:02:52 +08:00
PanQL 7efbf9bf46 use hex when print log 2020-03-28 21:42:56 +08:00
PanQL 1c36c3ebd4 please use hex format when print log 2020-03-28 21:38:16 +08:00
Runji Wang bebb970478 object: hide VmObjectTrait implementation structure 2020-03-28 12:49:04 +08:00
Runji Wang d93a34fdc8 fix cargo test 2020-03-28 12:35:01 +08:00
Runji Wang 233cd03c83 object: add high-level representation of PortPacket 2020-03-28 12:13:37 +08:00
Runji Wang 180437f823 fix and refactor futex
- keep basic API: wait(value)
- fix atomicity
- append docs about ownership
- remove dependency on Timer
2020-03-27 19:52:10 +08:00
Runji Wang b3fe567b28 simplify Timer constructor 2020-03-27 17:38:41 +08:00
Runji Wang 81531ca3a2 move yield future to HAL. remove sleep future. 2020-03-27 17:01:01 +08:00
Runji Wang 3144402a5b move vdso constants to HAL 2020-03-27 16:04:40 +08:00
Runji Wang 0bc41553e1 use numeric-enum-macro crate 2020-03-27 16:04:40 +08:00
PanQL dd3da76fac support c11mutex test now 2020-03-26 14:39:44 +08:00
PanQL 3585f59ba4 complete nanosleep 2020-03-25 18:08:49 +08:00
PanQL 49029764a4 add time-out support for futex.wait 2020-03-24 09:14:13 +08:00
Runji Wang f7e81bbe3e optimize a lot of code 2020-03-23 23:51:10 +08:00
Runji Wang 7096e77cf0 refactor vdso related code 2020-03-23 20:43:50 +08:00
Runji Wang e726707120 update nightly to 2020-03-22 and remove core-futures-tls
WARN: fix a bug of weak linkage ABI mismatch.
there maybe more need to fix later.
2020-03-22 12:14:14 +08:00
PanQL 07cd7dbdb6 pass 1st test, with sys_futex_* 2020-03-22 01:44:09 +08:00
PanQL 50e1e5be62 add core-test and sys_{nanosleep,futex_wake} 2020-03-21 01:33:08 +08:00
PanQL 074f07d018 prepare for test from fuchsia 2020-03-20 01:56:30 +08:00
PanQL 88a68e1fee add simple `sys_futex_wait` 2020-03-18 15:24:23 +08:00
PanQL b02a2a8c12 add `sys_port_queue` 2020-03-18 14:43:47 +08:00
PanQL 3a815958c3 component_manager is starting up 2020-03-18 14:14:21 +08:00
PanQL a23af5a8d6 add VDSO_BASE_ADDR case for `sys_object_get_property` 2020-03-17 15:38:44 +08:00
PanQL 501df4053b use `struct VmObject` 2020-03-17 12:10:13 +08:00
PanQL 756dfb7c61 adjust `sys_port_waitq` 2020-03-15 19:54:56 +08:00
PanQL b1413b69b1 partial `sys_object_wait_async` 2020-03-15 19:16:02 +08:00
PanQL 9ce8863d9d sys_object_signal_peer for channel 2020-03-15 16:38:28 +08:00
PanQL 58dbe2671e initializ page as zero and fix sys_vmo_create_child 2020-03-15 14:55:43 +08:00
PanQL 1c00d0058d add `sys_port_wait` and `sys_thread_start` 2020-03-11 13:09:24 +08:00
PanQL 2e1785ad78 buggy vmo.create_child, just use create_clone now 2020-03-11 01:20:16 +08:00
PanQL bd0ac9242e partial `vmo_op_range` 2020-03-09 22:46:01 +08:00
PanQL ef8c93e57a renew zbi, remove cmdline 2020-03-09 01:54:14 +08:00
PanQL 03a75d5f52 partial `sys_resource_create`, update to 2020-03-01 2020-03-07 21:11:56 +08:00
PanQL 5fd9e37fc0 partial `sys_clock_get`, `sys_vmar_unmap` 2020-03-07 15:40:01 +08:00
PanQL 5bd2f58899 partial `sys_timer_create` and `sys_event_create` 2020-03-07 15:06:21 +08:00
PanQL 22b64aace2 partial `sys_port_create` 2020-03-07 13:50:08 +08:00
PanQL f3de85a108 partial `sys_job_set_critical` 2020-03-07 13:31:32 +08:00
PanQL 1b167108b3 add regs in syscall, fix handle allocation 2020-03-06 20:04:03 +08:00
Runji Wang 940001a1db object: remove obj_type field, convert it to enum 2020-03-05 01:06:32 +08:00
Runji Wang 3ce1f043b5 refactor user context again. No matryoshka! 2020-03-04 22:49:45 +08:00
PanQL cbce630ddc add vmar_protect (naive version), and some property 2020-03-04 22:46:02 +08:00
PanQL 774c92c141 partially impl `vmo_set_size`, fix `process_start` 2020-03-04 22:46:02 +08:00
PanQL bd93d0236d vmo_create_child is still buggy 2020-03-04 22:46:02 +08:00
PanQL 44c0947dd8 fix sys_channel_read 2020-03-04 22:46:02 +08:00
PanQL 4a4be8f105 add handle_info_basic option for object_get_info 2020-03-04 22:46:02 +08:00
PanQL 2fc09bd778 fix handle_duplicate, debuglog's rights, complete
vmo_replace_as_executable
2020-03-04 22:46:02 +08:00
PanQL e0a44ae049 simple vmo_create_child and handle_replace. fix userboot.so 2020-03-04 22:45:27 +08:00
Runji Wang a92b6b325f hal-unix: partial fix restoring user registers 2020-03-02 01:03:43 +08:00
PanQL 98df754ffb fix `cargo test` 2020-03-02 00:42:12 +08:00
PanQL 22138bf8d9 run `cargo clippy` 2020-03-01 21:27:11 +08:00
PanQL 5fc13816c5 fix vmar_map bug, still not implemented. 2020-02-28 14:06:13 +08:00
PanQL 6638655990 remove `create_child_at` func in vmar 2020-02-28 11:38:43 +08:00
PanQL ead8c199b9 channel_create and get_info for vmar 2020-02-28 11:21:39 +08:00