bjorn3
ecbc2b7e8d
Directly read the bootstrap entry point from the initfs header
2024-03-11 14:26:08 +01:00
bjorn3
fb66a8628f
Use PAGE_SIZE instead of hard coded constant
2024-03-10 21:39:55 +01:00
bjorn3
616c7d4398
Load the bootstrap blob at 4096 instead of 0
...
This way the NULL page can stay unmapped and the bootstrap code can
avoid UB when reading the initfs header (which is at the start of the
bootstrap code.
2024-03-10 21:14:46 +01:00
4lDO2
ec58d6c541
Compile on aarch64 as well.
2024-03-05 10:40:54 +01:00
4lDO2
d38d8b66bd
Fix i686 compilation.
2024-03-05 10:26:57 +01:00
4lDO2
b35c9d1e62
Properly free phys-contiguous grants, TLB-delayed.
2024-03-04 19:03:01 +01:00
4lDO2
4e392d05e4
Delay cow() dealloc until after TLB shootdown.
2024-03-04 19:03:01 +01:00
4lDO2
fa3e2a24d4
Optimize TLB flushing.
2024-03-04 19:03:01 +01:00
4lDO2
716f147cd4
Fix synchronization so acid tlb succeeds!
2024-03-04 19:03:01 +01:00
4lDO2
846d914a55
Improve synchronization.
2024-03-04 19:03:01 +01:00
4lDO2
1f8d7bc67c
Always check shootdown reqs when locking addrsp.
2024-03-04 19:03:01 +01:00
4lDO2
3a592b9079
Use regular non-NMI IPIs for TLB shootdown.
2024-03-04 19:03:00 +01:00
4lDO2
3a915c7fd5
Fix lock/guard mismatch, move r#move to wrapper.
2024-03-04 19:03:00 +01:00
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