Commit Graph

2187 Commits

Author SHA1 Message Date
bjorn3 b3522b19e6 Replace a writeln!() with println!() 2025-09-12 19:36:16 +02:00
bjorn3 a782c1f9e1 Fix warning about unused function 2025-09-12 19:03:39 +02:00
bjorn3 8aa08e1e3d Unconditionally enable serial_debug on arm64 and riscv64 2025-09-12 18:59:48 +02:00
bjorn3 520453f779 Move x86 serial port assignment to the init function 2025-09-12 18:46:11 +02:00
bjorn3 31cbb3b361 Remove duplicate serial port initialization on x86 2025-09-12 18:41:42 +02:00
bjorn3 7a4dd1a1a9 Use SerialKind on x86 2025-09-12 18:40:21 +02:00
bjorn3 f0eea47896 Fix compilation with lpss_debug feature enabled 2025-09-12 18:33:16 +02:00
bjorn3 eb06f5676f Unify SerialKind between arm64 and riscv64 2025-09-12 18:19:15 +02:00
bjorn3 6ca9a9a806 Move uart_pl011.rs to src/devices 2025-09-12 18:02:30 +02:00
bjorn3 f9a4178898 Always enable graphical_debug
We already gracefully handle a missing framebuffer.
2025-09-11 21:41:30 +02:00
bjorn3 9a2203076a Merge aarch64 and x86/x86_64 debugger implementations
And make the debugger partially work on riscv64.
2025-09-11 20:02:56 +02:00
bjorn3 e131bf219d Merge x86 and x86_64 debugger implementations 2025-09-11 20:02:56 +02:00
bjorn3 d1668e232a Begin deduplicating debugger code between architectures 2025-09-11 20:02:56 +02:00
bjorn3 40605e643e Move stac/clac for SMAP in debugger to just around the stack read loop
This fixes a crash when returning from the debugger on x86_64.
2025-09-11 20:02:56 +02:00
bjorn3 26dd87b1ff Fix debugger feature on arm64
And fix unsafe_op_in_unsafe_fn warnings
2025-09-11 20:02:56 +02:00
bjorn3 38188b0640 Expand a macro invocation 2025-09-10 18:45:13 +02:00
bjorn3 786c9eabcb Share print! and println! between architectures 2025-09-10 18:40:30 +02:00
bjorn3 1268472103 Move arch::x86_64::cpuid into arch::x86_shared::cpuid 2025-09-10 18:35:36 +02:00
bjorn3 ad6c6c5e41 Share external interrupt handlers between x86 and x86_64 2025-09-10 18:31:28 +02:00
bjorn3 5e6d681fcb Share exception interrupt handlers between x86 and x86_64 2025-09-10 18:25:22 +02:00
bjorn3 d6c5d0d268 Move semicolons 2025-09-10 18:25:09 +02:00
bjorn3 35a0f2d440 Remove usage of array_chunks
It has been removed in newer rustc versions
2025-09-10 18:00:02 +02:00
bjorn3 a3700fa446 Remove the unsafe block from the inner function in interrupt!() 2025-09-10 18:00:02 +02:00
Elle Rhumsaa cec902e6be main: refactor unsafe block for C offsets
Uses the `&raw const` syntax to convert the pointer location of static
offsets from C.
2025-09-10 14:55:36 +00:00
bjorn3 fe1c2f460e Fix a bunch of errors and warnings after moving to the 2024 edition 2025-09-10 16:44:36 +02:00
bjorn3 cea93f7647 cargo fix --edition & rustfmt
Or to be precise:
RUST_TARGET_PATH=$(pwd)/targets cargo fix --edition \
--target targets/x86_64-unknown-kernel.json \
--target targets/i686-unknown-kernel.json \
--target targets/aarch64-unknown-kernel.json \
--target targets/riscv64-unknown-kernel.json \
-Zbuild-std=core,alloc --allow-dirty --bin kernel
cargo fmt
2025-09-10 16:44:36 +02:00
bjorn3 ff48830c0b Update rmm submodule 2025-09-10 16:44:33 +02:00
4lDO2 dd366f01c4 Make ForceKilled meaningful, += Dead && SIGKILL. 2025-09-10 13:22:29 +02:00
Paul Sajna 172a0ffd02 remove dtb unwraps 2025-09-07 22:53:39 -07:00
Jeremy Soller 53c3342e9f snps,dw-apb-uart is usually 32-bit mmio 2025-09-07 20:41:28 -06:00
Jeremy Soller f1492729d2 riscv64: support snps,dw-apb-uart serial 2025-09-07 20:36:05 -06:00
bjorn3 5658fc258b Disable debugger feature by default
It currently doesn't compile on aarch64
2025-09-07 13:35:22 +02:00
bjorn3 c404598296 Use cfg!() rather than #[cfg] for the cfg in map_memory 2025-09-07 13:26:04 +02:00
bjorn3 e42fc3811f Fix compiling with profiling feature enabled 2025-09-07 13:20:19 +02:00
bjorn3 b7566e66bd Fix 32bit x86 2025-09-07 13:00:40 +02:00
bjorn3 48f3592bf3 Mostly use cfg!() rather than #[cfg] for controlling syscall_debug
This only adds 40 bytes overhead per cpu core in the PerCpuBlock struct.
2025-09-07 12:38:57 +02:00
bjorn3 fefede0d67 Use cfg!() rather than #[cfg] for controlling self_modifying 2025-09-07 12:30:33 +02:00
bjorn3 b5822ac118 Mostly use cfg!() rather than #[cfg] for controlling sys_stat
This only adds 48 bytes overhead per cpu core in the PerCpuBlock struct.
Also fixes compilation with sys_stat enabled on x86_64.
2025-09-07 12:27:04 +02:00
bjorn3 0a58e9e806 Allow cfg(dtb) for check-cfg 2025-09-07 12:03:37 +02:00
bjorn3 f05be85966 Use cfg!() rather than #[cfg] for controlling multi_core 2025-09-07 12:02:16 +02:00
bjorn3 d6e9022c4a Rustfmt 2025-09-06 17:10:32 +02:00
bjorn3 869a664172 Remove allow(unexpected_cfgs) 2025-09-06 17:06:31 +02:00
bjorn3 cf019ab9a5 Remove some unused unsafe blocks 2025-09-06 16:51:05 +02:00
bjorn3 c4c605630a Remove an allow(unused) for the elf module 2025-09-06 16:49:45 +02:00
bjorn3 7975d2aa8f Remove Unique
It is only used for AlignedBox which can just directly implement Send
and Sync. Additionally make the Send and Sync impls more restrictive by
requiring the inner type to be Send cq Sync, previously AlignedBox was
always Send and Sync, which is not sound.
2025-09-06 16:23:30 +02:00
bjorn3 afed3bc84b Fix a couple of warnings 2025-09-06 16:17:05 +02:00
bjorn3 7f63a5c8f0 Don't mark irq_trigger as no_mangle 2025-09-01 17:19:09 +00:00
Jeremy Soller c6f38f05e4 Disable multi_core again (for demo) 2025-08-28 10:00:16 -06:00
Wildan Mubarok 7d91390f04 Detect if ARM virtual timer should be used 2025-08-16 12:58:09 +00:00
Wildan Mubarok e071bdcef4 Use ARM virtual timer to fix HVF acceleration 2025-08-16 11:20:48 +00:00