4#include "mos/platform/platform_defs.h"
13#include <mos/platform_syscall.h>
58 __asm__
volatile(
"hlt");
78 __asm__
volatile(
"sti");
83 __asm__
volatile(
"cli");
100 pr_warn(
"thread is null, cannot dump its stack");
106 pr_emph(
"thread %pt is not blocked, cannot dump stack", (
void *) thread);
153 pr_warn(
"unknown arch-specific syscall %llu", syscall);
180 ret_regs.
di = sigreturn_data->
signal;
204 pr_emph(
"General Purpose Registers:\n"
212 " Instruction: 0x%lx:" PTR_FMT "\n"
214 frame->
ax, frame->
bx, frame->
cx, frame->
dx,
215 frame->
si, frame->
di, frame->
bp, frame->
sp,
220 frame->
cs, frame->
ip,
227 regs->
ax = syscall_nr;
void lapic_interrupt(u8 vec, u8 dest, lapic_delivery_mode_t delivery_mode, lapic_dest_mode_t dest_mode, lapic_shorthand_t shorthand)
@ APIC_DELIVER_MODE_NORMAL
@ LAPIC_SHORTHAND_ALL_EXCLUDING_SELF
@ LAPIC_DEST_MODE_PHYSICAL
#define MOS_UNIMPLEMENTED(content)
void x86_set_fsbase(thread_t *thread)
should_inline u64 rdtsc(void)
#define stack_pop_val(stack, val)
#define stack_push_val(stack, val)
void signal_on_returned(sigreturn_data_t *supplimentary_data)
Return from a signal handler.
ipi_type_t
The type of IPI to send.
int snprintf(char *__restrict str, size_t size, const char *__restrict format,...)
should_inline void port_outw(x86_port_t port, u16 value)
#define pr_dinfo2(feat, fmt,...)
void rtc_read_time(timeval_t *time)
void(* sa_restorer)(void)
downwards_stack_t k_stack
kernel-mode stack
thread_state_t state
thread state
#define x86_cpuid(return_reg, leaf, subleaf)
#define x86_cpu_set_cr3(val)
should_inline void x86_cpu_invlpg_all(void)
should_inline void x86_cpu_invlpg(ptr_t addr)
should_inline void x86_cpu_halt(void)
void x86_interrupt_return_impl(const platform_regs_t *regs)