apio 794567327f
All checks were successful
continuous-integration/drone/push Build is passing
kernel, luna: Port non-VFS changes over from pull request #22
OwnedPtr, SharedPtr: Add operator bool
Option, Result: Make try_move_value() non-const since it modifies the Option
kernel: Switch to a stack we control for the main task as soon as we leave early boot
Heap: Fix GPF caused when making many small allocations
Heap: Avoid accessing a block after it's potentially deleted
luna: Skip UBSAN.cpp in CMakeLists as that's not implemented yet
luna: Use spinlocks in the heap implementation
kernel, luna: Move Spinlock.h to luna
Option: Use __builtin_launder to ensure that the compiler doesn't label this as UB
SharedPtr: Implement make_shared using adopt_shared
SharedPtr: Delete ptr on failure in all adopt_shared* functions
2023-02-25 17:09:03 +01:00

33 lines
743 B
C++

#pragma once
#include <luna/Result.h>
struct Registers;
namespace CPU
{
Result<const char*> identify();
const char* platform_string();
void platform_init();
void platform_finish_init();
[[noreturn]] void efficient_halt();
[[noreturn]] void idle_loop();
void switch_kernel_stack(u64 top);
void enable_interrupts();
void disable_interrupts();
void wait_for_interrupt();
void get_stack_trace(void (*callback)(u64, void*), void* arg);
void print_stack_trace();
void get_stack_trace_at(Registers* regs, void (*callback)(u64, void*), void* arg);
void print_stack_trace_at(Registers* regs);
[[noreturn]] void bootstrap_switch_stack(u64 stack, void* function);
void pause();
}