Commit Graph

271 Commits

Author SHA1 Message Date
Ruihan Li b6944e48bd `CpuLocalCell::as_ptr_mut` should be safe 2024-11-21 09:02:58 +08:00
Ruihan Li 3d63ed7a4c Keep interrupts disabled during context switching 2024-11-21 09:02:58 +08:00
Ruihan Li 9b38eff5fe Avoid `Arc` instances in `switch_to` 2024-11-21 09:02:58 +08:00
Ruihan Li ec2c6ab7a3 Make `Pollee` semi-stateless 2024-11-20 16:39:18 +08:00
Ruihan Li a4a8807a20 Remove `KernelThreadExt` 2024-11-13 21:44:37 +08:00
Ruihan Li 1469059888 Implement `CurrentTask` 2024-11-13 10:32:54 +08:00
Ruihan Li 51db2da151 Add `ForceSync` 2024-11-13 10:32:54 +08:00
Ruihan Li 11382524d1 Use new `SpinLock` APIs in `wait.rs` 2024-11-10 17:42:00 +08:00
Zhang Junyang 1f612e45f7 Remove unnecessary page table items 2024-11-09 20:32:48 +08:00
Zhang Junyang b2b00bdfd2 Lock-free cursor creation 2024-11-09 20:32:48 +08:00
Yuke Peng 12aa9fc857 Refactor the document of IOMMU functions 2024-11-09 10:42:46 +08:00
Yuke Peng c2626da757 Rename some IOMMU functions 2024-11-09 10:42:46 +08:00
Yuke Peng 65a95cf6b7 Support Interrupt Remapping in IOMMU 2024-11-09 10:42:46 +08:00
Yuke Peng 99fdd49076 Support Queue Invalidation in IOMMU 2024-11-09 10:42:46 +08:00
Zhang Junyang 25a918d132 Print who and on which CPU the kernel panics 2024-11-07 16:39:47 +08:00
Qingsong Chen 438dad888e Fix the range of IoMem's reader/writer 2024-11-07 14:18:33 +08:00
Ruihan Li 5233827160 Don't preempt without good reason 2024-11-06 21:53:55 +08:00
Ruihan Li 768b182aba Make the code a bit cleaner 2024-11-06 21:53:55 +08:00
Zhang Junyang c34706603a Special treat VM Space clearing 2024-11-06 21:52:53 +08:00
Cautreoxit fda05e9e23 Correct a small syntax error 2024-11-06 21:30:50 +08:00
Ruize Tang bebfc360da Fix lost-wakeup in RwMutexUpgradeableGuard_.drop() 2024-11-06 21:30:14 +08:00
Fabing Li 561516df98 Export /proc/cpuinfo 2024-11-06 14:54:28 +08:00
Zhang Junyang b3515c498a Improve the scalability for TLB flusher 2024-11-06 10:57:18 +08:00
Qingsong Chen b3d30f7ac3 Fix pci config errors caused by expression precedence 2024-11-05 14:55:19 +08:00
Qingsong Chen 2c6cbee92f Fix the offset of PCI device class code 2024-11-05 14:55:19 +08:00
Chen Chengjun c7b3a596dd Disable IRQ during page allocation 2024-11-01 11:24:09 +08:00
Ruihan Li 7e2e9cebf6 Perform more noncontroversial cleanups 2024-10-31 15:19:20 +08:00
Ruihan Li 9d5350c2ee Use better names and avoid duplication 2024-10-31 15:19:20 +08:00
jellllly420 cff688e128 Drop the strong reference of Task before exiting 2024-10-28 19:22:17 +08:00
Zhang Junyang e319641b4d Implement system call `sched_get/set_affinity` 2024-10-26 22:06:41 +08:00
Zhang Junyang 3468ec213b Use `CpuId` with validity ensurance rather than `u32` 2024-10-26 22:06:41 +08:00
Zhang Junyang b400d287fa Remove `ostd::sync::AtomicBits` 2024-10-26 22:06:41 +08:00
Zhang Junyang 26c4abde58 Refactor `CpuSet` and introduce `AtomicCpuSet` 2024-10-26 22:06:41 +08:00
Chen Chengjun e60b5b7649 Refine mapping-related locks 2024-10-26 21:55:48 +08:00
Jianfeng Jiang fe339fd81e Bump version to 0.9.4 2024-10-24 21:00:14 +08:00
Shaowei Song da5e7a21cb Avoid potential deadlock in iommu remapping 2024-10-24 19:14:58 +08:00
Zhang Junyang fe8e451c4f Use read-write lock for the irq callback list 2024-10-24 15:18:26 +08:00
Wang Siyuan 998869d57e Refactor kernel virtual memory allocation for kernel stack and I/O memory 2024-10-21 09:53:05 +08:00
Ni Shirong 29eb37c07c Introduce kernel virtual memory allocation for kernel stack 2024-10-21 09:53:05 +08:00
Zhang Junyang 709e99d75a Make task functions `FnOnce` 2024-10-20 13:24:58 +08:00
Zhang Junyang a716763772 Remove the linkage feature usage for `ostd::main` 2024-10-20 13:24:58 +08:00
Zhang Junyang 131a25c15c Provide the way to override the panic handler. 2024-10-20 13:24:58 +08:00
Zhang Junyang b8eff00fb7 Remove the additional IRQ disable during EOI 2024-10-20 13:14:47 +08:00
Yuke Peng a43b0b6a52 Fix compile error in riscv64 2024-10-20 13:02:41 +08:00
Chen Chengjun 2f511069ee Move SoftIRQ implementations to softirq component 2024-10-18 09:35:40 +08:00
Fabing Li 64d7303b0e Bump version to 0.9.3 2024-10-16 10:28:54 +08:00
Zhang Junyang dc7e0d7a63 Use the HUGE/PAT bit to track the validity of x86 PTEs 2024-10-16 10:25:39 +08:00
jiangjianfeng b269118c9a Resolve cargo publish --dry-run check failure 2024-10-16 10:10:08 +08:00
Zhang Junyang 3f1fa33b13 Bump and publish linux-bzimage crate series with OSTD and OSDK 2024-10-16 10:05:34 +08:00
Zhang Junyang 43abc1993e Fix the mismatch of PE headers 2024-10-16 10:05:34 +08:00
Zhang Junyang 662894ee90 Refine relocations in x86-64 EFI boot 2024-10-16 10:05:34 +08:00
Zhang Junyang 68adca4b40 Migrate to latest UEFI dependencies 2024-10-16 10:05:34 +08:00
Hsy-Intel 2af9916de9 Upgrade the `acpi` crate to the latest version 2024-10-14 21:03:47 +08:00
Hsy-Intel c28cec2c6a Fix minor bugs in TDX env 2024-10-14 21:03:47 +08:00
Zhang Junyang 9e4257b655 Fix multiple issues pointed out by the new compiler 2024-10-13 22:32:05 +08:00
jiangjianfeng 493574d9f3 Bump version to 0.9.2 2024-10-12 20:06:26 +08:00
Zhang Junyang d15aacfb4d Fix incorrect behaviors of accessing the boot PT after dismissal 2024-10-12 10:00:36 +08:00
Zhang Junyang 909639fd70 Separate `SegmentSlice` from `Segment` 2024-10-09 19:23:46 +08:00
Fabing Li d930829866 Bump version to 0.9.1 2024-10-08 17:53:47 +08:00
Zhang Junyang e1e7afe0ca Use `node::Entry` to optimize page table cursor operations 2024-10-06 17:15:41 +08:00
Zhang Junyang 96f120d957 Clean up some page table implementation 2024-10-06 17:15:41 +08:00
Zhang Junyang 5bdf85b5f0 Regulate the mapping tracking status of page tables 2024-10-06 17:15:41 +08:00
Yuke Peng 909fb23f8c Call rescue when low memory in heap allocator 2024-10-06 17:14:50 +08:00
Zhang Junyang 2ddcd2d9a7 Add `.code64` to the x86 trap assembly 2024-10-04 21:54:48 +08:00
Yuke Peng 8b69aba0b8 [RISCV] Fix panic when initramfs not exists 2024-10-04 21:53:52 +08:00
Ruihan Li 5b336eabdc Bump version to 0.9.0 2024-09-30 20:37:57 +08:00
Chen Chengjun 8f50391a4e Optimize the clear procedure of the page table 2024-09-30 10:46:30 +08:00
YanWQ-monad 4fa0e6334b Add RISC-V base support 2024-09-30 10:02:08 +08:00
YanWQ-monad 839c2a6689 Extract shared code from timer 2024-09-30 10:02:08 +08:00
jellllly420 5c8e369057 Enable scheduler to fetch scheduling information directly from Thread 2024-09-27 10:21:45 +08:00
jellllly420 9cc63149f1 Remove cpu_affinity field from OSTD Task struct 2024-09-27 10:21:45 +08:00
jellllly420 8927031426 Remove priority field from OSTD Task struct 2024-09-27 10:21:45 +08:00
Zhang Junyang fad39fdf7a Make TLB flush policy relaxed 2024-09-26 19:29:59 +08:00
Zhang Junyang 52f1787d35 Remove syncronizations for the `VmSpace` PF handler 2024-09-26 19:29:59 +08:00
Zhang Junyang ac6d9256ef Improve the `VmSpace` forking API 2024-09-26 19:29:59 +08:00
Yuke Peng 14531cd99f Implement allocation-free logging 2024-09-24 20:40:37 +08:00
YanWQ-monad 4d36dd541f Extract x86-specific exception handling in aster-nix 2024-09-23 19:39:45 +08:00
Yuke Peng a754accf6a Copy the code from `slab_allocator` into OSTD and add license header 2024-09-22 12:27:04 +08:00
Yuke Peng f26c7a01cd Avoid multiple lock in heap allocator 2024-09-22 12:27:04 +08:00
Yuke Peng e995ed3ebc Use slab allocator to allocate heap 2024-09-22 12:27:04 +08:00
Zhang Junyang 9a79ecbcbe Clean up the frame buffer state in `ostd::mm` 2024-09-21 15:38:15 +08:00
YanWQ-monad 2a6733579d Refactor architecture-specific page fault handling 2024-09-20 10:56:13 +08:00
Qingsong Chen c2f7a10b84 Implement cpu_local with GS and ensure GS points to TSS 2024-09-19 13:00:36 +08:00
Marsman1996 52bde1721e Bump version to 0.8.3 2024-09-18 20:10:08 +08:00
Marsman1996 4bce346458 Update multiboot2 version 2024-09-18 20:10:08 +08:00
Ruihan Li 2bda8d17c4 Rename some misleading method names 2024-09-17 17:46:56 +08:00
Ruihan Li cefeea7b50 Revise `IoMem::resize` into `IoMem::slice` 2024-09-17 17:46:56 +08:00
Ruihan Li c8ba695c85 Implement `VmIoOnce` for `IoMem` 2024-09-17 17:46:56 +08:00
Jianfeng Jiang f3174dbbbc Make task store Arc<Thread> and process store Arc<Task> 2024-09-14 17:34:14 +08:00
Zhang Junyang addf42c3f8 No need to flush TLB on mapping without overwritting 2024-09-14 17:29:39 +08:00
Zhang Junyang 5df3c9b749 Avoid flushing TLB one by one when the un-mapped range is large 2024-09-14 17:29:39 +08:00
Chen Chengjun 1873bb7a3f Add wait_until_* functionality to Waiter 2024-09-14 13:59:07 +08:00
Yuke Peng 32ea24e945 Bump version to 0.8.2 2024-09-13 23:43:22 +08:00
Zhang Junyang bec2c97637 Don't copy on write if this is the only reference 2024-09-13 20:10:03 +08:00
Zhang Junyang f13e5d12c1 Set right A/D bits at the right place 2024-09-13 20:10:03 +08:00
Zhang Junyang d9eccdcfbe Implement remote TLB flush on `VmSpace` 2024-09-13 20:10:03 +08:00
Zhang Junyang 326ec09169 Initialize local APICs on every processors 2024-09-13 20:10:03 +08:00
Zhang Junyang 425027677b Add the inter-processor-call facilities 2024-09-13 20:10:03 +08:00
Yuke Peng 63364813a8 Change idle task to lowest priority 2024-09-13 19:52:00 +08:00
Marsman1996 f01772ca85 Fix panic in Cursor::new by invalid Vaddr range 2024-09-12 08:14:01 +08:00