Andrey Turkin
14eb140f7a
Refactor panic stack walking
2024-09-26 19:22:21 +03:00
Andrey Turkin
755694494b
Factor KernelMapper out of arch
...
Same implementation on all the platforms. Also remove mutable Deref as it allowed circumventing RO check
2024-09-25 21:51:39 +03:00
Andrey Turkin
d08861e586
Upgrade fdt library to the very latest
...
The new helpers remove a lot of boilerplace. Unfortunately some rough edges still remain (in particular issue gh#12 which renders interrupts() helper useless)
2024-09-25 06:51:02 +03:00
Andrey Turkin
dbbbfcf48a
Update RMM
2024-09-24 19:23:08 +03:00
4lDO2
339271b4d7
Add getdents syscall, and switch schemes to it.
2024-09-11 22:09:26 +02:00
Kamil Koczurek
548fd63264
tsc: calculate elapsed ticks using saturating_sub
...
RDTSC readouts might not actually be monotonically increasing due to
desynchronization between CPU cores, so checked_sub was causing a kernel
panic.
2024-09-10 14:16:38 +02:00
4lDO2
652cdc7ef2
Replace repr(packed) with repr(C, packed).
2024-09-08 20:56:50 +02:00
4lDO2
815ac3da4a
Revert "Fix possible UB in rmm::init."
...
This reverts commit 4626c74b78 .
2024-09-08 20:22:46 +02:00
4lDO2
4626c74b78
Fix possible UB in rmm::init.
...
I tested compiling the kernel with a more recent rustc, and this
triggered UB. Don't know for sure why there was an invalid entry passed
to the kernel, but it did.
2024-09-07 23:14:55 +02:00
Jeremy Soller
0c99e1bd0a
Set xcr0 in all cases
2024-09-06 20:08:40 -06:00
Andrey Turkin
a558860e88
Fix BSS sanity check
...
mark the canaries mutable so they go into data and bss and not in rodata
2024-09-04 10:55:20 +03:00
Andrey Turkin
d2ebc7ff05
Wholesale fix of warnings
...
Pretty straightforward changes. This commit tries to avoid making any non-trivial fixes.
2024-09-04 10:55:01 +03:00
Jacob Lorentzon
643d7400db
Implement paravirtualized KVM TSC support
2024-09-03 21:20:06 +00:00
4lDO2
441385ddb2
Always map the kernel itself using global pages.
...
This avoids TLB stalls after context switching, that are very visible
from flamegraphs.
2024-08-31 10:44:54 +02:00
Jeremy Soller
5cb6af6b8c
Fix aarch64 build
2024-08-01 13:00:59 -06:00
bjorn3
f55da93b33
Fix building for AArch64
...
I broke this in !321
2024-08-01 20:45:59 +02:00
bjorn3
8f186a692f
Allow writing messages to debug: without preserving them in sys:log
...
This would allow logd to write all received log messages to debug:
without causing an infinite loop when it at the same time reads all
messages in sys:log.
2024-07-25 12:49:43 +02:00
bjorn3
e7a46c3422
Let userspace control when graphical_debug gets disabled
...
Rather than disabling it right before entering userspace. This allows
showing debug messages while the graphics subsystem hasn't initialized
yet.
2024-07-24 20:59:40 +02:00
bjorn3
34cab9edba
Fix typos and call graphical_debug::init_heap on arm64
2024-07-24 18:48:27 +02:00
bjorn3
ebc4aeac85
Enable graphical_debug for aarch64
...
This doesn't give any issues both for UEFI boot (with framebuffer
present) and U-Boot boot (without framebuffer present).
2024-07-24 17:03:29 +02:00
bjorn3
e0855d0cb6
Fix typo
2024-07-22 16:47:35 +02:00
bjorn3
dc36d18812
Remove unnecessary discard of return value in debug::Writer
2024-07-22 14:15:20 +02:00
4lDO2
bda12fe55e
Print MXCSR in the SIMD exception handler.
2024-07-16 13:14:42 +02:00
4lDO2
d94baa2712
Run rustfmt.
2024-07-15 17:50:18 +02:00
4lDO2
f3532f4549
Fix static mut ref warnings.
2024-07-15 17:48:46 +02:00
4lDO2
5e7db80285
Fix a bunch of warnings.
2024-07-15 17:48:45 +02:00
4lDO2
8f3e40a99e
Fix aarch64 compilation.
2024-07-15 17:20:57 +02:00
4lDO2
f91b90445d
Force userspace to do post-syscall EINTR check.
2024-07-15 17:20:56 +02:00
4lDO2
e8060b259d
Only save ip and 'archdep' regs when signalling.
2024-07-15 17:20:56 +02:00
4lDO2
87046b77c7
Compile on aarch64.
2024-07-15 17:20:56 +02:00
4lDO2
c1ce1d76f9
Compile on i686.
2024-07-15 17:20:56 +02:00
4lDO2
d6e0eef065
Implement signal delivery code (untested).
2024-07-15 17:20:55 +02:00
4lDO2
295cc820e6
WIP: userspace signal handling
2024-07-15 17:20:55 +02:00
Jeremy Soller
e7d00a8e05
Add driver for arm,gic-v3
2024-05-08 11:24:46 -06:00
Jeremy Soller
9e3688b507
Revert "Support arm,gic-v3"
...
This reverts commit e33015a5f8 .
2024-05-07 15:24:50 -06:00
Jeremy Soller
e33015a5f8
Support arm,gic-v3
2024-05-07 15:20:34 -06:00
Jeremy Soller
5b5b2dbc97
Debug messages during device init
2024-04-13 09:34:00 -06:00
4lDO2
3fc9103826
Fix altreloc remap, always NOP-fill padding bytes.
...
This fixes a very rare (requires that an altreloc span two pages) kernel
crash where it writes past the region that was remapped as RWX, thus
triggering an in-kernel "wrote without write access" page fault.
Additionally, this fixes the logic for unavailable features. It fixes
the short-circuit that would forget to remap the memory back from RWX to
R-X. NOP bytes are also now replaced with multi-byte NOP regardless of
whether the CPU supports the given feature.
2024-04-10 16:16:37 +02:00
4lDO2
9253e16240
Fix kernel stack sizes, other arches.
2024-03-25 16:29:07 +01:00
4lDO2
b5523df187
Only support power-of-two frame allocations.
2024-03-24 14:40:15 +01:00
4lDO2
e6dc0e96f0
Fix aarch64.
2024-03-23 19:16:53 +01:00
4lDO2
7261dccb72
Fix i686.
2024-03-23 16:54:47 +01:00
4lDO2
1b3e024f7d
Fix profiling code.
2024-03-23 15:52:18 +01:00
4lDO2
bb01f0af66
More allocation progress
2024-03-22 13:26:03 +01:00
4lDO2
0e8c187a50
WIP: Implement more of deallocate_p2frame.
2024-03-22 13:21:52 +01:00
4lDO2
d5b1ad2cd5
WIP: Improve allocation performance
2024-03-22 13:17:59 +01:00
Jeremy Soller
8f09b4aa06
Do not use HPET on i686
2024-03-19 20:44:47 -06:00
4lDO2
66eb3361d3
Use saved regs instead of costly context.syscall.
2024-03-19 11:33:55 +01:00
4lDO2
4862977fa5
Optimize syscall fast path without tracing.
2024-03-18 20:38:11 +01:00
4lDO2
33f0fa8709
Fix IOBITMAP_SIZE type.
2024-03-18 14:34:32 +01:00