bjorn3
9404e9f892
Mark the sections used by alternative!() as allocated
...
This prevents the linker from discarding any function which uses the
alternative!() macro which would result in runtime relocation crashing.
2024-01-25 11:51:34 +01:00
bjorn3
5e71f6f9df
Correctly mark unaligned write as such to avoid UB
2024-01-24 19:43:34 +01:00
bjorn3
e5c93ae334
Fix some UB and debug assertions
...
The UB has been found by rustc's new UB checks with debug assertions
enabled.
2024-01-24 13:51:20 +01:00
Jeremy Soller
87ee68998c
Handle new path format
2024-01-18 12:35:32 -07:00
Jeremy Soller
45f1c4e29e
Add rustfmt from relibc and apply it with cargo fmt
2024-01-17 13:52:01 -07:00
Jeremy Soller
73897bd83d
scheme/pipe: allow removing fevent
2024-01-08 16:59:48 -07:00
Jeremy Soller
d18c316012
Add session ID
2024-01-08 14:43:11 -07:00
4lDO2
529c491fa0
Allow disabling profiling at compile time.
2023-12-17 00:49:28 +01:00
4lDO2
fac0e783ef
Refactor profiling code.
2023-12-17 00:49:28 +01:00
4lDO2
99ad6a0a2c
Support toggling profiling.
2023-12-17 00:49:28 +01:00
4lDO2
0f27d55c0a
Advance profiling buffer correctly.
2023-12-17 00:49:28 +01:00
4lDO2
14abf0cbc6
Exclude kmain from profile.
2023-12-17 00:49:27 +01:00
4lDO2
f973bc4128
Profiling
2023-12-17 00:49:24 +01:00
4lDO2
ee3aafa1d9
Remove PhysBorrowed hacks.
2023-12-15 15:14:40 +01:00
4lDO2
52df9dd1bc
Remove the AddrSpace ref when exiting, not reaping.
2023-12-15 15:14:40 +01:00
4lDO2
d4a120188f
Ensure PhysBorrowed iff !alloc-owned, vice versa.
...
This is allowed now that the old physalloc/physfree syscalls have been
removed.
2023-12-15 15:14:40 +01:00
4lDO2
eda462fd11
Remove SYS_PHYSMAP.
2023-12-15 15:14:40 +01:00
4lDO2
875a130843
Remove SYS_PHYSALLOC* and SYS_PHYSFREE.
2023-12-15 15:14:40 +01:00
4lDO2
a42e406569
Fix contiguous mmap.
2023-12-15 15:14:40 +01:00
4lDO2
cd19831ffb
Improved options for memory: files.
2023-12-15 15:14:40 +01:00
4lDO2
77400f63ee
Add a memory: file for phys-contiguous mmaps.
2023-12-15 15:14:36 +01:00
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
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