4lDO2
10e86ea89d
Hardcode global scheme IDs.
2023-12-13 11:08:11 +01:00
4lDO2
679c26c03b
s/Arc<dyn KernelScheme>/enum, but deref as dyn.
2023-12-13 11:08:07 +01:00
bjorn3
a7165f822f
Switch from the memoffset crate to the offset_of feature
...
The memoffset crate requires const_refs_to_cell to work in const
contexts. This feature has some known issues around it's semantics. The
offset_of feature however is currently on track for stabilization.
2023-12-12 20:21:31 +00:00
bjorn3
2aea52a94b
Remove the sole usage of the const_option feature
2023-12-12 20:21:31 +00:00
bjorn3
82a87be7d5
Avoid usage of the unstable Allocator trait
...
And also optimize init_sections to use the fact that allocate_frames
returns zeroed frames.
2023-12-12 20:21:31 +00:00
bjorn3
2e689eb5d4
Remove unnecessary no_mangle and extern "C" from the panic handler
...
#[panic_handler] handles all linkage related details.
2023-12-12 15:01:29 +00:00
bjorn3
c99e582c86
Use the default panicking alloc error handler
2023-12-12 15:01:29 +00:00
bjorn3
6b1c154847
Use kernel_executable_offsets on AArch64 and x86
2023-12-12 15:01:29 +00:00
bjorn3
017702d3d2
Remove a lot of dead code
2023-12-12 15:01:29 +00:00
bjorn3
00d0b8fb6b
Remove all pub from main.rs
...
This will cause rustc to emit warnings for all unused items.
2023-12-12 15:01:29 +00:00
bjorn3
5ce7d1df8a
Remove unnecessary extern crate item
...
This was only necessary in the 2015 edition
2023-12-12 15:01:29 +00:00
bjorn3
6045b0cc59
Remove unused feature gates
2023-12-12 15:01:29 +00:00
Jeremy Soller
4e3103a48a
x86: fix enter/exit gs and usercopy asm
2023-12-11 15:25:54 -07:00
Ivan Tan
1f1a57e1f7
support userspace program ioremapping device memory
2023-12-11 16:07:53 +00:00
Ivan Tan
9b6197d686
aarch64: code clean up
2023-12-11 16:07:53 +00:00
Ivan Tan
a8329956ca
support raspi3b+ serial && uart interrupt
2023-12-11 16:07:53 +00:00
Ivan Tan
44b14f994a
fix qemu-arm64 run error
2023-12-11 16:07:53 +00:00
Ivan Tan
1c1c541f0e
bringup raspi3b+, add device memory, disable uart init
2023-12-11 16:07:53 +00:00
Ivan Tan
bfbf435546
draft: aarch64: add irq_bcm2835. Need refactoring
2023-12-11 16:07:53 +00:00
Ivan Tan
9a5b9798ca
remove qemu-aarch64-virt hard code
2023-12-11 16:07:53 +00:00
Ivan Tan
ed68c98b42
aarch64: add irq-bcm2836 for raspi3b+ && refactor irq module
2023-12-11 16:07:53 +00:00
Ivan Tan
b65a7e9103
move gic into irqchip module
2023-12-11 16:07:53 +00:00
Ivan Tan
01d0e9a4b5
aarch64: add irqchip module to initialize all irq chip.
2023-12-11 16:07:53 +00:00
Ivan Tan
78a8568932
update dtb syscall scheme to kernelscheme
2023-12-11 16:07:53 +00:00
Ron Williams
02087065c1
don't panic when adding an existing name to a namespace
2023-11-15 22:18:50 +00:00
4lDO2
036a4bdee4
Replace syscall::Scheme with KernelScheme.
2023-11-15 20:00:47 +01:00
4lDO2
192d663d84
Forbid / in scheme names.
2023-11-09 14:40:20 +01:00
Ron Williams
29803e7865
setrens: always ignore -1
2023-11-08 23:29:08 -08:00
4lDO2
2d04b76a2c
Close sendfd file descriptor unless consumed.
2023-10-14 15:38:21 +02:00
4lDO2
2f2e76c0ca
Inform SYS_SENDFD scheme if the fd was exclusive.
2023-10-14 14:56:40 +02:00
4lDO2
1546a4a08f
Implement SYS_SENDFD and SKMSG_FOBTAINFD.
2023-10-14 12:44:38 +02:00
4lDO2
da491fd5fc
Disable sys:trigger_debugger by default.
2023-10-08 11:21:59 +02:00
4lDO2
6f6f69c728
Fix test instruction reg length in paranoid swapgs.
2023-10-08 11:21:23 +02:00
bjorn3
d819277d56
Make rustc directly invoke the linker
2023-10-03 09:53:37 +02: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
4lDO2
c481f6b5d4
Track state for all UserScheme calls.
2023-09-30 12:53:37 +02:00
Jeremy Soller
e794f2fe9b
Fix panic when there is no xsave support
2023-09-18 15:01:39 -06:00
Ivan Tan
eb0d48ac81
aarch64: add dtb scheme
2023-09-18 20:45:23 +00:00
Ivan Tan
a76cbc9f31
aarch64: trap msr, mrs or system instruction
2023-09-18 20:45:23 +00:00
4lDO2
5eace9997a
Compile successfully on i686 as well.
2023-09-16 10:48:25 +02:00
4lDO2
0b9c5bbf49
Pass both original and padded length in altrelocs.
2023-09-16 10:33:09 +02:00
4lDO2
ed3d2d7832
Allow disabling overwrite-based optimizations.
2023-09-14 16:44:12 +02:00
4lDO2
ce0d474cb9
Fail if a feature is force-enabled but unsupported.
2023-09-14 16:28:14 +02:00
4lDO2
dfc372d241
Replace with rdgsbase dynamically in paranoid ISRs.
2023-09-14 14:43:46 +02:00
4lDO2
d90aeef62e
Fix nop-filling code.
2023-09-14 14:34:04 +02:00
4lDO2
dde8f78903
Support XSAVE, XSAVEOPT, and AVX2.
2023-09-14 10:54:30 +02:00
4lDO2
38e669c807
Dynamic fsgsbase support, enable by default.
2023-09-14 09:25:30 +02:00
4lDO2
f581c71c7c
Allow code-overwriting optimizations, use for smap.
2023-09-14 08:38:49 +02:00
4lDO2
e005619b78
Add alternative! macro.
2023-09-12 21:43:37 +02:00
4lDO2
f028b77412
Use config.toml instead of x86_* Cargo feature.
2023-09-12 21:19:06 +02:00