konrad
6979cf230e
Kernel: Print Aarch64 CPU features during CPU initialization
2023-01-18 22:58:42 +01:00
konrad
a8e9591bac
Kernel: Split Aarch64 CPU setup into two stages
...
Former aims to bring the processor itself into desired state,
while latter allows for additional initialization with heap available.
2023-01-18 22:58:42 +01:00
konrad
97dce5d001
Kernel: Add Aarch64 CPU feature detection
2023-01-18 22:58:42 +01:00
konrad
0f81fb03f2
Kernel: Introduce stages in Aarch64 CPU initialization phase
...
Dropping to each exception level is now more explicit.
2023-01-18 22:58:42 +01:00
Timon Kruiper
a5e98d3644
Kernel/aarch64: Add implementation of Processor::switch_context
...
This initial implementation makes it possible to actually context switch
between different kernel threads! :^)
2022-12-29 19:32:20 -07:00
Timon Kruiper
0b95d8cd24
Kernel/aarch64: Implement thread_context_first_enter
...
This requires two new functions, context_first_init and
restore_context_and_eret. With this code in place, we are now running
the first idle thread! :^)
2022-12-29 19:32:20 -07:00
Timon Kruiper
262309d9bf
Kernel/aarch64: Implement Processor::initialize_context_switching
...
This changes the stack pointer to the initial_thread stack pointer, and
pushes two pointers onto the stack that point to the initial_thread. The
function then jumps to the ip of the initial_thread, which will be
thread_context_first_enter, and hangs there because that function is not
yet implemented.
2022-12-29 19:32:20 -07:00
Timon Kruiper
892f81b01a
Kernel/aarch64: Add initial implementation of Processor::init_context
...
This does not handle everything correctly yet, such as setting the
correct state for running userspace applications, however this should be
enough to get kernel scheduling to work.
2022-12-29 19:32:20 -07:00
Timon Kruiper
fb803e8025
Kernel/aarch64: Stub Processor::smp_wake_n_idle_processors
2022-12-29 19:32:20 -07:00
Timon Kruiper
fbfe669f6d
Kernel/aarch64: Implement Processor::{clear,restore}_critical()
2022-12-29 19:32:20 -07:00
Timon Kruiper
993b7495ba
Kernel/aarch64: Implement Processor::check_invoke_scheduler()
2022-12-29 19:32:20 -07:00
Timon Kruiper
f232133f65
Kernel/aarch64: Implement Processor::{enter,exit}_trap
...
And use them in interrupt handling.
2022-12-29 19:32:20 -07:00
Gunnar Beutner
056e406a12
Kernel: Add even more AARCH64 stubs
2022-10-18 13:08:25 +02:00
Gunnar Beutner
63a91d6971
Kernel: Add more AARCH64 stubs
2022-10-18 13:08:25 +02:00
Gunnar Beutner
69efded562
Kernel: Add more stubs needed for Thread.cpp
2022-10-16 17:35:37 +02:00
Timon Kruiper
57901a6f62
Kernel/aarch64: Implement tlb flushing
...
This initial implementation flushes the complete tlb cache. A FIXME is
added to implement the partial tlb flushing.
2022-10-01 14:09:01 +02:00
Filiph Sandström
7e1e208d08
Kernel: Add basic aarch64 support to MemoryManager
...
FIXME: There's still a lot to do like for example, port `quickmap_page`.
This does however get us further into the boot process than before.
2022-09-12 00:56:44 +01:00
Timon Kruiper
77f24056e0
Kernel: Disable interrupts when halting the aarch64 processor
...
This will actually halt the processor.
2022-06-02 13:14:12 +01:00
Timon Kruiper
1f3977b303
Kernel: Remove Prekernel namespace in the aarch64 Kernel
...
Now that we merged all the Prekernel files into the Kernel files, we can
get rid of the Prekernel namespace as well.
2022-05-12 23:14:05 +02:00
Timon Kruiper
e88cd338f1
Kernel: Move Prekernel{CPU, Exceptions}.cpp out of Prekernel directory
...
This lets us delete the Prekernel.h file, and gets us closer to deleting
the Prekernel from the aarch64 Kernel.
2022-05-12 23:14:05 +02:00
Timon Kruiper
e7c5fd978b
Kernel: Move Prekernel assembly utils to aarch64/ASM_wrapper.h
...
By moving these functions to the ASM_wrapper.h file, we can get rid of
another Prekernel file.
2022-05-12 23:14:05 +02:00
Timon Kruiper
e80d8d697c
Kernel: Replace Prekernel::halt with Processor::halt in aarch64 build
...
This allows us to get rid of one more Prekernel file.
2022-05-12 23:14:05 +02:00
Timon Kruiper
c515e1341a
Kernel: Add initial implementation of Processor in aarch64
...
Instead of storing the current Processor into a core local register, we
currently just store it into a global, since we don't support SMP for
aarch64 anyway. This simplifies the initial implementation.
2022-05-09 21:12:56 +02:00