19#include <FreeNOS/System.h>
20#include <FreeNOS/ProcessManager.h>
33 FATAL(
"This is a test");
42 ERROR(
"Failed to access " << (
void *)state.
far);
55 NOTICE(
"Unexpected m_exception in EL1 called from EL1 ec="<<(
void *)ec);
60 ERROR(
"Failed to access " << (
void *)state.
far);
63 ERROR(
"SVC instruction execution in AArch64 state.");
113 DEBUG(
"args = " << (
void *)state.
x0 <<
", " << (
void *)state.
x1 <<
", " << (
void *)state.
x2
114 <<
", " << (
void *)state.
x3 <<
"," << (
void *)state.
x4);
128 DEBUG(
"result = " << r <<
" scheduled = " << (
bool)(proc != proc2));
#define exception_code(esr)
Result invoke(Number number, ulong arg1, ulong arg2, ulong arg3, ulong arg4, ulong arg5)
Execute a generic API function.
Number
Enumeration of supported generic kernel API functions.
Result install(ExceptionType vector, Handler handler)
Install an exception handler.
ARM64Kernel(CoreInfo *info)
Constructor function.
static void trap(volatile CPUState &state)
Software trap routine.
static void SyncExceptionEL0(volatile CPUState state)
Synchronous exceptions from EL0.
static void FatalHandler(volatile CPUState state)
Fatal errors.
static void SyncExceptionEL1(volatile CPUState state)
Synchronous exceptions from EL1.
ARM64Exception m_exception
ARM64 exception handling subsystem.
ARM64 specific process implementation.
void setCpuState(const CPUState *cpuState)
Overwrite the saved CPU registers for this task.
FreeNOS kernel implementation.
CoreInfo * m_coreInfo
CoreInfo object for this core.
SplitAllocator * m_alloc
Physical memory allocator.
ProcessManager * getProcessManager()
Get process manager.
static Size copy(void *dest, const void *src, Size count)
Copy memory from one place to another.
Represents a process which may run on the host.
Process * get(const ProcessID id)
Retrieve a Process by it's ID.
Process * current()
Current process running.
ProcessID getID() const
Retrieve our ID number.
virtual Result allocate(Range &args)
Allocate physical memory.
static Kernel * instance()
Retrieve the instance.
#define PAGESIZE
ARM uses 4K pages.
CoreInfo coreInfo
Local CoreInfo instance.
#define NULL
NULL means zero.
u32 ProcessID
Process Identification Number.
unsigned int u32
Unsigned 32-bit number.
unsigned long Address
A memory address.
#define ERROR(msg)
Output an error message.
#define NOTICE(msg)
Output a notice message.
#define FATAL(msg)
Output a critical message and terminate program immediatly.
unsigned int Size
Any sane size indicator cannot go negative.
unsigned long long u64
Unsigned 64-bit number.
#define DEBUG(msg)
Output a debug message to standard output.
Contains all the CPU registers.
Per-Core information structure.
Memory::Range kernel
Kernel memory range.
uint coreId
Core identifier.
Address phys
Physical address.