Ivan Tan
ebf96fa843
aarch64: fix dtb scheme
2023-12-14 03:34:37 +00:00
Jeremy Soller
1cc5804333
Allow CPUs to take any context
2023-12-13 17:20:43 -07:00
Jeremy Soller
4386e0716d
Missed change for last commit
2023-12-13 17:20:21 -07:00
Jeremy Soller
fbaa4306e3
Add unblock_no_ipi function and use in context switch
2023-12-13 17:19:43 -07: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
4lDO2
78beae5c92
Fix aarch64
2023-12-13 11:08:12 +01:00
4lDO2
d531c6f1bf
Context switch correctly in UserInner::call.
2023-12-13 11:08:12 +01:00
4lDO2
6b642d62a6
Disable trigger_debugger again.
2023-12-13 11:08:12 +01:00
4lDO2
88508a2cb7
Remove as_user_inner.
2023-12-13 11:08:12 +01:00
4lDO2
3a35338aa7
Remove as_{filetable,sigaction,addrspace}.
2023-12-13 11:08:12 +01:00
4lDO2
f3ce5b167d
Make proc: and thisproc: global.
2023-12-13 11:08:11 +01:00
4lDO2
3be015ce4d
Make sys: global.
2023-12-13 11:08:11 +01:00
4lDO2
fe0e3103f4
Make itimer: global.
2023-12-13 11:08:11 +01:00
4lDO2
87b0c568a0
Make time: global.
2023-12-13 11:08:11 +01:00
4lDO2
f6002e839d
Centralize global scheme constructors.
2023-12-13 11:08:11 +01:00
4lDO2
ce313ba28d
Add global scheme IDs to map, for now.
2023-12-13 11:08:11 +01:00
4lDO2
d9c2443ae3
Make irq: a GlobalScheme.
2023-12-13 11:08:11 +01:00
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
5bce3a5bb5
Move -z max-page-size from the target spec to the cookbook
2023-12-12 18:15:05 +01:00
bjorn3
3188a44b23
Don't use target_family="redox" for the kernel
...
This cfg is meant for redox userspace programs.
2023-12-12 18:14:18 +01: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
Ribbon
4f98319a92
Improve the README and fix the docs badge link
2023-12-07 15:32:45 +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
431dba9563
Update syscall
2023-10-19 17:07:17 +02:00
4lDO2
2d04b76a2c
Close sendfd file descriptor unless consumed.
2023-10-14 15:38:21 +02:00