Commit Graph

1759 Commits

Author SHA1 Message Date
4lDO2 b5efaceb51 Fix more synchronization. 2024-03-04 19:03:00 +01:00
4lDO2 098cdd6067 Fix flusher, currently only with -smp 1 2024-03-04 19:03:00 +01:00
4lDO2 79381249a2 Implement a TLB shootdown draft. 2024-03-04 19:03:00 +01:00
4lDO2 6bf90f9eee Build the foundation for TLB shootdown. 2024-03-04 19:03:00 +01:00
4lDO2 156017a25d Refactor: wrap RwLock<AddrSpace>. 2024-03-04 19:03:00 +01:00
4lDO2 749df4c869 Fail successfully with todo! 2024-03-04 19:03:00 +01:00
4lDO2 bb30530ea0 Track which CPUs are using any given AddrSpace. 2024-03-04 19:03:00 +01:00
4lDO2 0c6c857012 Improve LogicalCpu{Id,Set}, make set atomic.
Technically there should be an atomic and nonatomic set type, but perf
should be the same, as the nonatomic one would only be used when setting
the sched_affinity.
2024-03-04 19:02:56 +01:00
Jeremy Soller 15cbb40802 Format 2024-02-28 12:10:17 -07:00
Jeremy Soller 8390277eb2 Fix affinity alignment 2024-02-28 12:10:06 -07:00
bjorn3 e08eadf64a Don't pass CallerCtx in file_op_generic
It isn't used by any of the callers.
2024-02-25 21:05:21 +01:00
bjorn3 24187b5f80 Move set_tss_stack call to switch_to 2024-02-25 20:10:49 +01:00
bjorn3 96f1a14115 Remove some dead code 2024-02-25 20:06:22 +01:00
bjorn3 52f4aaf741 Avoid unaligned access for serial over x86 io port 2024-02-25 18:36:41 +01:00
bjorn3 782ec87f27 Fix UB in the locking code of context switching
The spin crate considers it UB to call force_write_unlock while there is
a threads trying to obtain a read lock on the same rwlock.

This also switches to the spinning_lot crate for the context rwlock as
it has support for a write guard keeping a reference to the rwlock using
an Arc instead of a reference.
2024-02-25 17:07:41 +01:00
bjorn3 449abb8925 Share bootstrap_mem between all archs 2024-02-25 15:53:04 +01:00
bjorn3 e23f0ed66b Share idt.rs between x86 and x86_64 2024-02-25 15:49:29 +01:00
bjorn3 f92b4c9608 Unify cpuid between x86 and x86_64 and don't return an Option
Systems without cpuid support aren't supported anyway.
2024-02-25 15:07:31 +01:00
bjorn3 eecfbb19d2 Share the functions in interrupt/mod.rs between x86 and x86_64 2024-02-25 14:48:28 +01:00
bjorn3 fbe2980b3d Share interrupt/ipi.rs between x86 and x86_64 2024-02-25 14:48:15 +01:00
bjorn3 62614db9ac Share interrupt/trace.rs between x86 and x86_64 2024-02-25 14:48:12 +01:00
bjorn3 c1d0c11a1b Fix typo in irq.rs 2024-02-25 14:31:52 +01:00
bjorn3 3610dd7e03 Remove unused interrupt handler 2024-02-25 14:31:28 +01:00
bjorn3 e9e3b4487d Reduce the difference of idt.rs between x86 and x86_64 2024-02-25 14:31:28 +01:00
Jeremy Soller 39c20720ee Fix compilation on x86_64 2024-02-16 22:05:57 -07:00
Jeremy Soller e4eb4031bd Fix APIC offsets for x86 32-bit 2024-02-16 22:02:47 -07:00
Jeremy Soller 6c6fc18f8e Format 2024-02-16 21:40:42 -07:00
Jeremy Soller 86589aa7fa Only switch to idle process when no other processes can run 2024-02-13 14:46:21 -07:00
Jeremy Soller 98f12fd750 Hack to workaround hangs by pinning to one cpu 2024-02-10 09:18:57 -07:00
Ron Williams 9331452bdb Use RedoxPath::as_parts. redox-path from crates.io 2024-02-09 15:05:45 +00:00
Ron Williams eeee40ae0c update unlink for new path format 2024-02-01 00:50:33 -08:00
Ivan Tan e7d47d10c6 aarch64: fix compile error 2024-01-27 23:29:37 +08:00
bjorn3 58314e6a47 Share a whole lot more code between x86 and x86_64 2024-01-25 13:34:04 +00:00
bjorn3 785975089b Dedup the last remaining piece of code in the driver module between x86 and x86_64 2024-01-25 13:34:04 +00:00
bjorn3 0d86348e41 Dedup the apic code between x86 and x86_64 2024-01-25 13:34:04 +00:00
bjorn3 86fb4208f2 Dedup some more code between x86 and x86_64 2024-01-25 13:34:04 +00:00
bjorn3 0d092d7921 Dedup code for most x86 and x86_64 device drivers 2024-01-25 13:34:04 +00:00
bjorn3 9404e9f892 Mark the sections used by alternative!() as allocated
This prevents the linker from discarding any function which uses the
alternative!() macro which would result in runtime relocation crashing.
2024-01-25 11:51:34 +01:00
bjorn3 5e71f6f9df Correctly mark unaligned write as such to avoid UB 2024-01-24 19:43:34 +01:00
bjorn3 fa58f5887e The kernel now works fine without optimizations
It is relatively slow without optimizations, but it is still usable.
2024-01-24 14:15:09 +01:00
bjorn3 3085b31336 Ensure __altrelocs_start is correctly aligned 2024-01-24 14:13:27 +01:00
bjorn3 732fad0593 Fix disabling the self_modifying feature 2024-01-24 14:13:18 +01:00
bjorn3 e5c93ae334 Fix some UB and debug assertions
The UB has been found by rustc's new UB checks with debug assertions
enabled.
2024-01-24 13:51:20 +01:00
Jeremy Soller 87ee68998c Handle new path format 2024-01-18 12:35:32 -07:00
Jeremy Soller 0e58953259 Update redox-path 2024-01-18 11:22:23 -07:00
Jeremy Soller 0fde840f83 Add redox-path submodule 2024-01-18 11:15:04 -07:00
Jeremy Soller 45f1c4e29e Add rustfmt from relibc and apply it with cargo fmt 2024-01-17 13:52:01 -07:00
Jeremy Soller 73897bd83d scheme/pipe: allow removing fevent 2024-01-08 16:59:48 -07:00
Jeremy Soller d18c316012 Add session ID 2024-01-08 14:43:11 -07:00
4lDO2 529c491fa0 Allow disabling profiling at compile time. 2023-12-17 00:49:28 +01:00