Jeremy Soller
8e0f54cb31
Clippy fixes
2022-11-11 13:19:14 -07:00
Jeremy Soller
80b8382cd7
Fix aarch64 kfx size
2022-08-25 18:40:19 -06:00
Jeremy Soller
82ac7a66f7
Only save preserved regs in aarch64 context switch
2022-08-25 18:23:51 -06:00
Jeremy Soller
afd82ba4bb
Save/restore aarch64 FPU regs
2022-08-25 09:30:53 -06:00
Jeremy Soller
31680bf5b9
Do not set tpidr_el0 from kernel
2022-08-25 08:46:26 -06:00
Jeremy Soller
f7e8026494
Set aarch64 thread pointers
2022-08-24 19:21:36 -06:00
Jeremy Soller
b20a71113c
Implement aarch64 switch_to_inner using naked function
2022-08-24 13:24:37 -06:00
Jeremy Soller
0ed9f03317
Use push/pop scratch for aarch64 signal handler
2022-08-24 12:29:48 -06:00
Jeremy Soller
613968dc30
Use push/pop scratch for x86 signal handler
2022-08-24 11:39:31 -06:00
Jeremy Soller
113a7164bb
Use push/pup scratch for x86_64 signal handler
2022-08-24 11:11:50 -06:00
Jeremy Soller
c750ee26a8
Implement setting FS/GS offset on x86
2022-08-20 21:21:32 -06:00
Jeremy Soller
01e4bc899e
Fix compilation on x86
2022-08-20 18:11:57 -06:00
Jeremy Soller
9dd069c8ca
Support proc partially with aarch64
2022-08-20 14:45:45 -06:00
Jeremy Soller
44d5e6573a
Updated utable switching code for aarch64
2022-08-20 13:31:20 -06:00
Jeremy Soller
fe7def2797
Update to use TableKind on x86_64
2022-08-20 13:16:23 -06:00
Jeremy Soller
c7e5466bd7
Fix aarch64 switch_to_inner functino definition
2022-08-20 09:15:26 -06:00
Jeremy Soller
157dbc7b4d
Convert aarch64 context switching to asm macro
2022-08-20 09:08:14 -06:00
Jeremy Soller
49fcafac45
Fix building on aarch64
2022-08-19 16:12:42 -06:00
Jeremy Soller
6b2439f1b9
Improved 32-bit x86 support
2022-08-18 14:57:15 -06:00
Jeremy Soller
c09be1770b
Use registers for switch_to_inner instead of stack
2022-08-18 09:09:11 -06:00
Jeremy Soller
4bd137f36e
Fixes for x86 32-bit
2022-08-17 10:48:23 -06:00
Jeremy Soller
be12d0f1bd
Add initial i686 arch module
2022-07-29 18:12:49 -06:00
Jeremy Soller
e99cbcf5d2
Fixes for compiling aarch64
2022-07-29 18:06:53 -06:00
4lDO2
dc8ce1c22b
Partial: migrate context handling code to RMM.
2022-07-27 10:52:23 +02:00
4lDO2
8970ce1fe7
Benefit from addrspace abstraction in switch.
2022-07-27 10:52:22 +02:00
4lDO2
351d77ad9b
Improve floating point handling.
2022-07-27 10:52:22 +02:00
4lDO2
b50495bfa5
WIP: Support clone in userspace
...
Everything seems to work for the most part, but now there are tons of
daemons which rely on syscall::clone, which is now implemented in relibc
:(
2022-07-27 10:52:04 +02:00
4lDO2
6255bea143
Update to latest toolchain.
...
Multi-core is slightly broken when using the latest version of spin
(0.9.2). I believe this is because Once used to do SeqCst loads/stores
everywhere, which might have made any possible data race much harder to
come by.
2022-03-12 17:10:36 +01:00
Jeremy Soller
63fcc204cb
x86 paging refactor for debugger
2021-11-30 20:56:55 -07:00
4lDO2
3eedbeb14d
WIP: Let userspace manage fsbase/gsbase and TLS.
2021-08-01 12:09:22 +02:00
4lDO2
0968e4f87e
Support fsgsbase at compile time.
2021-07-31 10:12:59 +02:00
4lDO2
3e5cf387d5
Use offset_of! in context::arch::switch_to.
...
This is definitely better than hardcoding the offsets!
2021-06-21 10:16:41 +02:00
4lDO2
cc6f792a03
Use options(noreturn) in all naked functions.
2021-06-17 22:42:31 +02:00
Jeremy Soller
3dc08c878f
Fix aarch64 switch_to function
2021-05-04 08:07:44 -06:00
Jeremy Soller
8f50785781
Fixes for building aarch64
2021-05-03 21:57:45 -06:00
Jeremy Soller
2aa4d8caf5
Merge remote-tracking branch 'origin/aarch64-rebase' into riscv64
2021-05-03 20:52:59 -06:00
Jeremy Soller
17c261553b
Fixes for building x86_64
2021-05-03 20:43:18 -06:00
4lDO2
a706a0dae4
Rewrite signal_handler_wrapper as single asm block.
...
The reason for these types of rewrites, is that more recent Rust
compilers have started to deprecate naked functions that consist of more
than only a single asm block, as they can trigger all sorts of UB.
2021-02-13 21:55:40 +01:00
4lDO2
47c3b2269f
Fix context switching.
...
Previously there was a triple fault, due to a combination of reasons
(e.g. rsp and rbp being ordered in the struct and in the assembly).
Now, the locks will be held __all the way until the new context__ has
been switched to, which completely eliminates any possibility that the
"pcid fault" originates here.
While I am unsure whether this will work, this could also be an
opportunity to be able to remove CONTEXT_SWITCH_LOCK fully.
2021-02-13 21:55:40 +01:00
4lDO2
ef4270e473
WIP: Attempt to rewrite switch_to in assembly.
...
This is due to a warning in more recent compilers, which forbid anything
but a single inline assembly block, in naked functions. It does
unfortunately triple fault right now, but I hope I may be able to fix it
soon.
2021-02-13 21:55:36 +01:00
Robin Randhawa
afca6ab31c
aarch64: Fix incorrect FP save/restore
2021-01-28 16:50:07 +00:00
Robin Randhawa
1462fe8638
aarch64: context: Align with x86_64 code
2021-01-27 17:17:59 +00:00
Robin Randhawa
3afa0f0895
aarch64: Basic Floating-point/SIMD support
2021-01-27 17:17:11 +00:00
Robin Randhawa
4a215c7c2c
aarch64: exception management and clone fixups
2021-01-26 18:17:09 +00:00
Robin Randhawa
75870a655f
aarch64: context: Add separate kspace and uspace page table getters
2021-01-21 11:40:02 +00:00
Robin Randhawa
fd0336692d
aarch64: clone: Introduce kernel and user space specific mods
...
At present these are done 'wholesale' without any regard for x86_64.
That needs to change eventually.
2021-01-18 21:50:19 +00:00
Robin Randhawa
5bc9dea242
aarch64: context::switch: update the CONTEXT_SWITCH_LOCK
2021-01-15 19:03:42 +00:00
Robin Randhawa
14d79927af
aarch64: Add a set_tcb method to setup tpidr_el0
2021-01-15 09:12:30 -07:00
Robin Randhawa
02c37d3fae
WIP: aarch64 rebase
2021-01-15 05:54:42 -07:00
Jeremy Soller
ea6b1e7f8b
Update redox_syscall to 0.2.4
2021-01-11 07:01:05 -07:00