Commit Graph

50 Commits

Author SHA1 Message Date
Jeremy Soller 5dc6f7c3ba lock ordering 2025-09-22 07:48:48 -06:00
bjorn3 5a6117b5ae Replace the log crate with a custom logging system
This avoids the need to explicitly set a logger early during boot, which
reduces the amount of moving parts that could go wrong slightly. And it
cuts the kernel image size by 13kb.
2025-09-13 18:55:16 +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 afed3bc84b Fix a couple of warnings 2025-09-06 16:17:05 +02:00
IncompententPirate fc5d246b30 remove wrapper functions 2024-09-26 22:34:55 +00:00
4lDO2 49b94047a8 Fix significant memory leak. 2024-07-24 22:48:56 +02:00
4lDO2 d94baa2712 Run rustfmt. 2024-07-15 17:50:18 +02:00
4lDO2 d2dc3302a7 Remove RefCount::Zero.
Only the allocator is allowed to switch between 0 and 1. Refcounts above
1 are however controlled by the virtual memory system.
2024-03-22 13:31:22 +01:00
4lDO2 66eb3361d3 Use saved regs instead of costly context.syscall. 2024-03-19 11:33:55 +01:00
4lDO2 776a140212 Fix rax being overwritten, and compile on i686. 2024-03-16 17:49:31 +01:00
4lDO2 5336cbd9e5 Improve signal interfaces and implementation. 2024-03-16 17:49:30 +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 1f8d7bc67c Always check shootdown reqs when locking addrsp. 2024-03-04 19:03:01 +01:00
4lDO2 156017a25d Refactor: wrap RwLock<AddrSpace>. 2024-03-04 19:03:00 +01:00
Ivan Tan e7d47d10c6 aarch64: fix compile error 2024-01-27 23:29:37 +08:00
Jeremy Soller 45f1c4e29e Add rustfmt from relibc and apply it with cargo fmt 2024-01-17 13:52:01 -07:00
4lDO2 ee3aafa1d9 Remove PhysBorrowed hacks. 2023-12-15 15:14:40 +01:00
bjorn3 2d065083df Use HashMap instead of BTreeMap where possible
This shrinks the kernel from 905840 bytes to 862408 bytes.
2023-12-13 19:55:20 +01:00
Enver Balalic 750e566a27 Get aarch64 to compile
Fixes enough errors to get the kernel to compile
2023-10-01 23:55:24 +02:00
Jeremy Soller 4cd76ea9e3 arch/x86: sync LogicalCpuId changes 2023-09-09 12:31:04 -06:00
4lDO2 f025ece614 Replace from/into with get/new when necessary. 2023-09-06 08:38:10 +02:00
4lDO2 2070fa44b7 Fix warnings. 2023-08-02 13:07:49 +02:00
4lDO2 0cdfb886c0 Fix debugger for x86_64, disable sc debug. 2023-07-28 13:40:00 +02:00
4lDO2 e28fef09e3 Improve aarch64 debugger. 2023-07-28 13:23:44 +02:00
4lDO2 ce35deed4b Support aarch64 page consistency checking. 2023-07-28 12:38:25 +02:00
4lDO2 ec9c24f841 WIP: aarch64 2023-07-27 19:05:33 +02:00
4lDO2 8b7fc8a468 Compile and mostly run properly on i686. 2023-07-27 16:45:36 +02:00
4lDO2 e054a5b211 Add debugger checks for correct CoW page flags. 2023-07-25 10:52:24 +02:00
4lDO2 0f1b5b9b6f WIP: Make cow/shared refcounts mutually exclusive. 2023-07-25 10:52:23 +02:00
4lDO2 490e1b2777 WIP: Track grant ownership. 2023-07-25 10:52:18 +02:00
4lDO2 34b4512dbd Refactor Grants.
Page alignment is now verified at compile time, for example.
2023-07-25 10:52:13 +02:00
4lDO2 56f88e80c2 Usercopy migration 2023-07-06 13:03:21 +00:00
uuuvn d502418e49 Fix aarch64 2023-06-06 15:36:30 +00:00
4lDO2 58c0c5d040 Remove one level of indirection for Context::name. 2023-05-27 14:27:34 +02:00
Jeremy Soller 1b3c6a957d Add aarch64 debugger 2022-08-28 09:27:38 -06:00
Jeremy Soller 06d952979f Implement debugger for x86 2022-08-22 08:41:35 -06:00
Jeremy Soller fe7def2797 Update to use TableKind on x86_64 2022-08-20 13:16:23 -06:00
Jeremy Soller 4602b81a2f Fix debugger when dumping kernel threads 2022-08-03 11:08:49 -06:00
Jeremy Soller 5d55d4eb87 Fix warnings 2022-07-29 18:33:54 -06:00
Jeremy Soller 0c80643077 Make graphical_debug arch independent and fix lots of warnings 2022-07-29 15:56:44 -06:00
Jeremy Soller fdb4ad8e88 Only build debugger on x86_64 for now 2022-07-28 08:21:31 -06:00
4lDO2 2bb019bc44 Partial: migrate debugger, add consistency check. 2022-07-27 10:52:23 +02:00
4lDO2 283ada82a0 WIP: Remove SYS_CLONE (to be done in userspace). 2022-07-27 10:52:03 +02:00
4lDO2 e6e1348072 Implement exec, and change UserGrant allocator. 2022-07-27 10:51:44 +02:00
Jeremy Soller 7d9a33c63a Add debugger (dumps all kernel state) 2022-02-10 14:10:04 -07:00