bjorn3
4b89feab41
Fix a couple of dead code warnings
2025-10-26 12:07:56 +01:00
bjorn3
1498376360
Unify generic irq handling between x86 and x86_64
2025-10-25 19:44:03 +02:00
bjorn3
3652b693ba
Remove usage of iterator_try_collect
2025-10-25 11:34:55 -06:00
bjorn3
164c890830
Remove thread_local feature gate
...
We use the PerCpuBlock instead of ELF TLS
2025-10-25 11:34:55 -06:00
bjorn3
cb718f767a
Remove a bunch of unused __*_start/end symbols
2025-10-25 19:20:01 +02:00
bjorn3
e8acd82074
Directly define __usercopy_{start,end} in the usercopy functions
...
As opposed to requiring a linker script
2025-10-25 19:12:27 +02:00
bjorn3
cc01d14d3b
Unconditionally enable sys_stat
2025-10-25 18:52:07 +02:00
bjorn3
a57c8e410d
Avoid warnings from rust-analyzer for the panic handler
...
Rust-analyzer runs cargo check --all-targets which also checks the test
configuration where previously there would be a bunch of warnings for
unused things due to the panic handler being configured out.
2025-10-19 14:30:53 +02:00
bjorn3
021cdf47f4
Fix a bunch of warnings
2025-10-19 14:27:43 +02:00
bjorn3
9d5ad06b30
Move some code from the trampoline to global_asm!()
2025-10-19 06:23:39 -06:00
bjorn3
4b16e66164
Set arm64 exception handler before entering the rust world
2025-10-19 06:23:39 -06:00
bjorn3
d31e552d08
Set riscv exception handler before entering the rust world
2025-10-19 06:23:39 -06:00
bjorn3
ff65afd003
Don't depend on the stack setup by the bootloader
...
This way we can choose our own size for the stack and don't have to
identity map it manually. Also this way the bootloader doesn't have to
change the stack pointer right before calling into the kernel (which it
currently does in an unsound way)
2025-10-19 06:23:39 -06:00
bjorn3
b7a69a26ba
Reduce indentation in madt x86 init
2025-10-19 06:23:39 -06:00
bjorn3
7ea41f4fee
Remove no longer necessary lint allow
2025-10-19 11:49:14 +02:00
bjorn3
b09659ac25
Remove unnecessary unsafe blocks in naked functions
2025-10-19 11:48:46 +02:00
Jeremy Soller
3c3eaa0004
Enable sys_stat by default for sysinfo
2025-10-12 15:49:35 -06:00
Jeremy Soller
c9653525a0
Fix compilation with sys_stat feature
2025-10-12 15:45:50 -06:00
Speedy_Lex
0931a7f49f
Resolve a huge portion of the clippy lints
2025-10-06 06:30:23 -06:00
Jeremy Soller
db8fb14614
Fix compilation on other archs
2025-10-04 11:58:04 -06:00
Jeremy Soller
18bf5d904b
Fix aarch64 kernel target
2025-10-04 11:53:51 -06:00
Jeremy Soller
e635e7a911
Fix i686 kernel target
2025-10-04 11:53:01 -06:00
Jeremy Soller
f7fa2491ac
Add rust-toolchain.toml
2025-10-04 09:18:10 -06:00
Jeremy Soller
84385222e2
Use x86-softfloat rustc-abi for x86_64 target
2025-10-04 08:21:00 -06:00
4lDO2
8d50ebd69d
Fix target spec int vs string.
2025-10-04 16:12:54 +02:00
Speedy_Lex
ea812e8f2a
Run cargo fmt
2025-10-04 01:06:15 +02:00
Speedy_Lex
d38002969c
Fixes for rust update
2025-10-04 00:55:26 +02:00
bjorn3
bc9273057d
Remove a bunch of double references from AddrSpaceWrapper::move
2025-10-03 20:53:26 +02:00
bjorn3
db5e6184af
Remove unnecessary add_ref in ProcScheme::kfmap
...
Grant::allocated_shared_one_page already adds a reference. This fixes a
memory leak
2025-09-27 19:44:26 +02:00
bjorn3
6445f04ac4
Avoid overwriting expected count for special frames used by multiple contexts
2025-09-26 23:38:30 +02:00
bjorn3
4db2c919ef
Nicer printing of frame refcount mismatch
2025-09-26 23:28:01 +02:00
bjorn3
cd761ee679
Handle all cases in foreach_addrsp
2025-09-26 23:28:01 +02:00
bjorn3
12f908b1ba
Take sighandler frames into account during the integrity check
2025-09-26 23:28:01 +02:00
bjorn3
4c85131e36
Always take syscall_head/tail into account during the integrity check
...
Previously it wouldn't be taken into account if currently used by the
kernel.
2025-09-26 23:28:01 +02:00
bjorn3
ede9a47f9c
Move .bss and .data tests to inline asm
...
If .bss is not properly cleared or .data is incorrectly cleared, there
is no way to tell what will happen if we try to run Rust code.
2025-09-25 09:46:17 -06:00
bjorn3
ac35b7984a
Fix kernel debugger
2025-09-25 17:26:31 +02:00
Jeremy Soller
0203ad750a
Fix compilation on aarch64/riscv64gc
2025-09-23 13:46:44 -06:00
Jeremy Soller
4526acc259
Drop comment about fixed multi_core issues
2025-09-23 13:09:32 -06:00
Jeremy Soller
b0d5fa0993
Copy all higher PML4 entries in setup_new_utable (fixes some AMD CPUs)
2025-09-23 13:09:12 -06:00
Jeremy Soller
89c182cca1
Restore return in percpu::switch_arch_hook
2025-09-23 13:08:34 -06:00
Jeremy Soller
b6a5245556
Require passing loopback test for hard-coded serial
2025-09-23 11:33:37 -06:00
Jeremy Soller
6ce2101cf4
Do not mark soc ranges as device memory
2025-09-23 10:31:34 -06:00
Jeremy Soller
5dc6f7c3ba
lock ordering
2025-09-22 07:48:48 -06:00
bjorn3
e7358e3e5b
Deduplicate a bunch of things that use KernelArgs between archs
2025-09-20 19:10:19 +02:00
bjorn3
3f385ba79d
Unify KernelArgs type between architectures
2025-09-20 19:10:19 +02:00
bjorn3
c35c17c67e
Merge display.rs into debug.rs
2025-09-20 17:59:19 +02:00
bjorn3
b36deffa61
Replace scrolling with wraparound in graphical debug
...
Inspired by how Haiku does printing for its kernel debugger, this commit
gets rid of the scrolling when the bootlog reaches the end of the screen
and instead wraps around to the start of the screen. Between the last
written line and the first visible written line there is always a blank
line to provide visual separation.
Getting rid of the scrolling significantly simplifies the implementation
of graphical debug and removes the need for double buffering for
performance as we no longer need to read back the framebuffer when
scrolling which is very expensive on write-combining memory like the
framebuffer.
2025-09-20 17:15:02 +02:00
bjorn3
84ac36ca2f
Inline DebugDisplay::write_char
2025-09-20 15:42:08 +02:00
bjorn3
3db8bf878e
Remove workaround for Meteor Lake having an AP with hardware cpu id 0
2025-09-20 15:33:08 +02:00
bjorn3
f58bcd584e
Separate logical and hardware cpu ids
2025-09-20 15:33:08 +02:00