![]() |
MOS Source Code
|
#include "mos/assert.hpp"
#include "mos/platform/platform.hpp"
#include "mos/riscv64/cpu/cpu.hpp"
#include "mos/tasks/signal.hpp"
#include "mos/tasks/task_types.hpp"
#include <mos/platform_syscall.h>
#include <mos_stdlib.hpp>
Go to the source code of this file.
Macros | |
#define | FLEN 64 |
#define | f_op(reg, val) |
#define | f_op(reg, val) |
Typedefs | |
typedef void(* | switch_func_t) () |
#define FLEN 64 |
Definition at line 142 of file riscv64_platform_api.cpp.
#define f_op | ( | reg, | |
val ) |
Referenced by do_restore_fp_context(), and do_save_fp_context().
#define f_op | ( | reg, | |
val ) |
typedef void(* switch_func_t) () |
Definition at line 13 of file riscv64_platform_api.cpp.
void riscv64_do_context_switch | ( | ptr_t * | old_stack, |
ptr_t | new_stack, | ||
switch_func_t | switcher, | ||
bool * | lock ) |
Referenced by platform_switch_to_thread().
void riscv64_normal_switch_impl | ( | ) |
Referenced by platform_switch_to_thread().
|
static |
Definition at line 17 of file riscv64_platform_api.cpp.
Referenced by platform_switch_to_thread().
|
static |
Definition at line 24 of file riscv64_platform_api.cpp.
Referenced by platform_switch_to_thread().
Definition at line 33 of file riscv64_platform_api.cpp.
Referenced by power_shutdown().
Definition at line 40 of file riscv64_platform_api.cpp.
Referenced by do_syslog(), enter_scheduler(), and platform_ap_entry().
Definition at line 45 of file riscv64_platform_api.cpp.
Referenced by idle_task(), and platform_shutdown().
void platform_dump_regs | ( | platform_regs_t * | regs | ) |
Definition at line 50 of file riscv64_platform_api.cpp.
Referenced by invalid_page_fault(), try_handle_kernel_panics_at(), x86_handle_exception(), and x86_handle_nmi().
platform_regs_t * platform_thread_regs | ( | const Thread * | thread | ) |
Definition at line 63 of file riscv64_platform_api.cpp.
Referenced by platform_arch_syscall(), platform_context_clone(), platform_context_clone(), platform_context_setup_child_thread(), platform_context_setup_main_thread(), riscv64_start_kernel_thread(), riscv64_start_user_thread(), x86_setup_thread_common(), x86_start_kernel_thread(), and x86_start_user_thread().
Definition at line 68 of file riscv64_platform_api.cpp.
Referenced by platform_context_setup_child_thread(), and platform_context_setup_main_thread().
void platform_context_setup_main_thread | ( | Thread * | thread, |
ptr_t | entry, | ||
ptr_t | sp, | ||
int | argc, | ||
ptr_t | argv, | ||
ptr_t | envp ) |
Definition at line 74 of file riscv64_platform_api.cpp.
Referenced by elf_do_fill_process().
void platform_context_setup_child_thread | ( | Thread * | thread, |
thread_entry_t | entry, | ||
void * | arg ) |
Definition at line 85 of file riscv64_platform_api.cpp.
Referenced by create_thread(), and kthread_create_no_sched().
Definition at line 105 of file riscv64_platform_api.cpp.
Referenced by process_do_fork().
Definition at line 118 of file riscv64_platform_api.cpp.
Referenced by process_do_execveat(), and thread_destroy().
Definition at line 124 of file riscv64_platform_api.cpp.
Referenced by try_handle_kernel_panics_at().
Definition at line 130 of file riscv64_platform_api.cpp.
Referenced by idle_task().
Definition at line 136 of file riscv64_platform_api.cpp.
Referenced by mm_switch_context(), mos_start_kernel(), and platform_ap_entry().
Definition at line 144 of file riscv64_platform_api.cpp.
Referenced by platform_switch_to_thread().
Definition at line 186 of file riscv64_platform_api.cpp.
Referenced by platform_switch_to_thread().
void platform_switch_to_thread | ( | Thread * | current, |
Thread * | new_thread, | ||
switch_flags_t | switch_flags ) |
Definition at line 227 of file riscv64_platform_api.cpp.
Referenced by reschedule().
void platform_return_to_userspace | ( | platform_regs_t * | regs | ) |
Definition at line 251 of file riscv64_platform_api.cpp.
Referenced by platform_jump_to_signal_handler(), platform_restore_from_signal_handler(), riscv64_start_user_thread(), riscv64_trap_handler(), and x86_start_user_thread().
Definition at line 264 of file riscv64_platform_api.cpp.
Referenced by arch_syscall().
void platform_ipi_send | ( | u8 | target_cpu, |
ipi_type_t | type ) |
Definition at line 282 of file riscv64_platform_api.cpp.
void platform_dump_stack | ( | platform_regs_t * | regs | ) |
Definition at line 289 of file riscv64_platform_api.cpp.
Referenced by invalid_page_fault(), try_handle_kernel_panics_at(), and x86_handle_exception().
void platform_syscall_setup_restart_context | ( | platform_regs_t * | regs, |
reg_t | syscall_nr ) |
Definition at line 302 of file riscv64_platform_api.cpp.
Referenced by signal_exit_to_user_prepare_syscall().
void platform_syscall_store_retval | ( | platform_regs_t * | regs, |
reg_t | result ) |
Definition at line 308 of file riscv64_platform_api.cpp.
Referenced by signal_exit_to_user_prepare_syscall().
void platform_jump_to_signal_handler | ( | const platform_regs_t * | regs, |
const sigreturn_data_t * | sigreturn_data, | ||
const sigaction_t * | sa ) |
Definition at line 313 of file riscv64_platform_api.cpp.
Referenced by do_signal_exit_to_user_prepare().
Definition at line 330 of file riscv64_platform_api.cpp.
Referenced by MOS_STATIC_ASSERT().