MOS Source Code
Loading...
Searching...
No Matches
platform.c File Reference
#include "mos/platform/platform.h"
#include "mos/misc/panic.h"
#include "mos/syslog/printk.h"
#include <mos/mos_global.h>
#include <mos/types.h>
+ Include dependency graph for platform.c:

Go to the source code of this file.

Macros

#define __weak__   [[gnu::weak]]
 

Functions

void platform_ap_entry (u64 arg)
 
void platform_shutdown (void)
 
void platform_dump_regs (platform_regs_t *regs)
 
void platform_dump_stack (platform_regs_t *regs)
 
void platform_dump_current_stack ()
 
void platform_dump_thread_kernel_stack (const thread_t *thread)
 
void platform_get_time (timeval_t *val)
 
void platform_halt_cpu (void)
 
void platform_invalidate_tlb (ptr_t vaddr)
 
u32 platform_current_cpu_id (void)
 
void platform_cpu_idle (void)
 
u64 platform_get_timestamp (void)
 
datetime_str_tplatform_get_datetime_str (void)
 
void platform_interrupt_enable (void)
 
void platform_interrupt_disable (void)
 
u64 platform_arch_syscall (u64 syscall, u64 arg1, u64 arg2, u64 arg3, u64 arg4)
 
void platform_ipi_send (u8 target_cpu, ipi_type_t type)
 
void platform_jump_to_signal_handler (const platform_regs_t *regs, const sigreturn_data_t *sigreturn_data, const sigaction_t *sa)
 
void platform_restore_from_signal_handler (void *sp)
 
void platform_syscall_setup_restart_context (platform_regs_t *regs, reg_t syscall_nr)
 
void platform_syscall_store_retval (platform_regs_t *regs, reg_t result)
 

Macro Definition Documentation

◆ __weak__

#define __weak__   [[gnu::weak]]

Definition at line 11 of file platform.c.

Function Documentation

◆ platform_ap_entry()

void platform_ap_entry ( u64 arg)

Definition at line 13 of file platform.c.

◆ platform_shutdown()

void platform_shutdown ( void )

Definition at line 20 of file platform.c.

◆ platform_dump_regs()

void platform_dump_regs ( platform_regs_t * regs)

Definition at line 25 of file platform.c.

◆ platform_dump_stack()

void platform_dump_stack ( platform_regs_t * regs)

Definition at line 31 of file platform.c.

◆ platform_dump_current_stack()

void platform_dump_current_stack ( void )

Definition at line 37 of file platform.c.

◆ platform_dump_thread_kernel_stack()

void platform_dump_thread_kernel_stack ( const thread_t * thread)

Definition at line 42 of file platform.c.

◆ platform_get_time()

void platform_get_time ( timeval_t * val)

Definition at line 49 of file platform.c.

◆ platform_halt_cpu()

void platform_halt_cpu ( void )

Definition at line 56 of file platform.c.

◆ platform_invalidate_tlb()

void platform_invalidate_tlb ( ptr_t vaddr)

Definition at line 63 of file platform.c.

◆ platform_current_cpu_id()

u32 platform_current_cpu_id ( void )

Definition at line 69 of file platform.c.

◆ platform_cpu_idle()

void platform_cpu_idle ( void )

Definition at line 74 of file platform.c.

◆ platform_get_timestamp()

u64 platform_get_timestamp ( void )

Definition at line 79 of file platform.c.

◆ platform_get_datetime_str()

datetime_str_t * platform_get_datetime_str ( void )

Definition at line 84 of file platform.c.

◆ platform_interrupt_enable()

void platform_interrupt_enable ( void )

Definition at line 90 of file platform.c.

◆ platform_interrupt_disable()

void platform_interrupt_disable ( void )

Definition at line 95 of file platform.c.

◆ platform_arch_syscall()

u64 platform_arch_syscall ( u64 syscall,
u64 arg1,
u64 arg2,
u64 arg3,
u64 arg4 )

Definition at line 101 of file platform.c.

◆ platform_ipi_send()

void platform_ipi_send ( u8 target_cpu,
ipi_type_t type )

Definition at line 113 of file platform.c.

◆ platform_jump_to_signal_handler()

void platform_jump_to_signal_handler ( const platform_regs_t * regs,
const sigreturn_data_t * sigreturn_data,
const sigaction_t * sa )

Definition at line 122 of file platform.c.

◆ platform_restore_from_signal_handler()

void platform_restore_from_signal_handler ( void * sp)

Definition at line 130 of file platform.c.

◆ platform_syscall_setup_restart_context()

void platform_syscall_setup_restart_context ( platform_regs_t * regs,
reg_t syscall_nr )

Definition at line 136 of file platform.c.

◆ platform_syscall_store_retval()

void platform_syscall_store_retval ( platform_regs_t * regs,
reg_t result )

Definition at line 143 of file platform.c.