Commit Graph

1605 Commits

Author SHA1 Message Date
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
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 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 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
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
Wildan M 39cb82d91d Optimize graphical debug scrolling 2025-08-09 18:30:51 +07:00
lebakassemmerl 6bf8c0c26c fix build-error on aarch64 and probably on riscv 2025-08-04 20:39:02 +02:00
Wildan Mubarok 1ff46c8482 Fix Linter CI 2025-08-04 06:34:31 -06:00
Jeremy Soller af7591bc26 Clarify vector number in IPI 2025-08-03 20:56:18 -06:00
Jeremy Soller 5d06ad4e6a Ensure that APIC ID is uses for all IPIs, enable multi_core feature 2025-08-03 20:53:58 -06:00
Wildan Mubarok c67fc7b099 Backfill aarch64 serial log 2025-07-31 03:22:52 +00:00
Ibuki Omatsu e3d8ae1b79 feat: Introduce FdTbl and make Context.files use it for separate file tables. 2025-07-30 15:33:06 -06:00
Darley Barreto 66ea2b46ee Adding openat syscall 2025-07-13 06:43:20 -06:00
bjorn3 caf5fa955b Fix freeing of phys_contiguous frames
Previously the deallocation would be rounded to the next power of two
preventing partial deallocation. But more importantly previously trying
to free phys_contiguous frames while another processes still borrows
them. Now this should just cause the deallocation to be delayed.
2025-07-06 16:13:13 +02:00
bjorn3 08ea1da2f9 Trigger read event for user schemes when an fd is closed 2025-07-05 17:54:19 +02:00