MOS Source Code
Loading...
Searching...
No Matches
x86_platform_api.cpp File Reference
#include "mos/mm/paging/pml_types.hpp"
#include "mos/platform/platform_defs.hpp"
#include "mos/tasks/signal.hpp"
#include "mos/x86/devices/rtc.hpp"
#include <mos/allocator.hpp>
#include <mos/lib/sync/spinlock.hpp>
#include <mos/mm/paging/paging.hpp>
#include <mos/mm/physical/pmm.hpp>
#include <mos/mos_global.h>
#include <mos/platform/platform.hpp>
#include <mos/platform_syscall.h>
#include <mos/syslog/printk.hpp>
#include <mos/tasks/process.hpp>
#include <mos/tasks/task_types.hpp>
#include <mos/x86/cpu/cpu.hpp>
#include <mos/x86/delays.hpp>
#include <mos/x86/devices/port.hpp>
#include <mos/x86/interrupt/apic.hpp>
#include <mos/x86/mm/paging_impl.hpp>
#include <mos/x86/tasks/context.hpp>
#include <mos/x86/x86_interrupt.hpp>
#include <mos/x86/x86_platform.hpp>
#include <mos_stdio.hpp>
#include <mos_stdlib.hpp>
#include <mos_string.hpp>
+ Include dependency graph for x86_platform_api.cpp:

Go to the source code of this file.

Functions

void platform_shutdown (void)
 
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 ()
 
datetime_str_tplatform_get_datetime_str (void)
 
void platform_interrupt_enable (void)
 
void platform_interrupt_disable (void)
 
void platform_switch_mm (const MMContext *mm)
 
platform_regs_tplatform_thread_regs (Thread *thread)
 
void platform_dump_thread_kernel_stack (const Thread *thread)
 
u64 platform_arch_syscall (u64 syscall, u64 __maybe_unused arg1, u64 __maybe_unused arg2, u64 __maybe_unused arg3, u64 __maybe_unused arg4)
 
void platform_ipi_send (u8 target, ipi_type_t type)
 
ptr< platform_regs_tplatform_setup_signal_handler_regs (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_get_time (timeval_t *time)
 
void platform_dump_regs (const platform_regs_t *frame)
 
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)
 

Function Documentation

◆ platform_shutdown()

void platform_shutdown ( void )

Definition at line 30 of file x86_platform_api.cpp.

+ Here is the call graph for this function:

◆ platform_halt_cpu()

void platform_halt_cpu ( void )

Definition at line 39 of file x86_platform_api.cpp.

+ Here is the call graph for this function:

◆ platform_invalidate_tlb()

void platform_invalidate_tlb ( ptr_t vaddr)

Definition at line 44 of file x86_platform_api.cpp.

+ Here is the call graph for this function:

◆ platform_current_cpu_id()

u32 platform_current_cpu_id ( void )

Definition at line 52 of file x86_platform_api.cpp.

◆ platform_cpu_idle()

void platform_cpu_idle ( void )

Definition at line 57 of file x86_platform_api.cpp.

◆ platform_get_timestamp()

u64 platform_get_timestamp ( void )

Definition at line 62 of file x86_platform_api.cpp.

Referenced by do_syslog(), and SyslogStreamWriter::SyslogStreamWriter().

+ Here is the call graph for this function:

◆ platform_get_datetime_str()

datetime_str_t * platform_get_datetime_str ( void )

Definition at line 67 of file x86_platform_api.cpp.

Referenced by do_print_syslog().

+ Here is the call graph for this function:

◆ platform_interrupt_enable()

void platform_interrupt_enable ( void )

Definition at line 77 of file x86_platform_api.cpp.

◆ platform_interrupt_disable()

void platform_interrupt_disable ( void )

Definition at line 82 of file x86_platform_api.cpp.

Referenced by platform_shutdown().

◆ platform_switch_mm()

void platform_switch_mm ( const MMContext * mm)

Definition at line 87 of file x86_platform_api.cpp.

◆ platform_thread_regs()

platform_regs_t * platform_thread_regs ( Thread * thread)

Definition at line 92 of file x86_platform_api.cpp.

Referenced by platform_arch_syscall().

◆ platform_dump_thread_kernel_stack()

void platform_dump_thread_kernel_stack ( const Thread * thread)

Definition at line 97 of file x86_platform_api.cpp.

+ Here is the call graph for this function:

◆ platform_arch_syscall()

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

Definition at line 116 of file x86_platform_api.cpp.

+ Here is the call graph for this function:

◆ platform_ipi_send()

void platform_ipi_send ( u8 target,
ipi_type_t type )

Definition at line 155 of file x86_platform_api.cpp.

+ Here is the call graph for this function:

◆ platform_setup_signal_handler_regs()

ptr< platform_regs_t > platform_setup_signal_handler_regs ( const platform_regs_t * regs,
const sigreturn_data_t * sigreturn_data,
const sigaction_t * sa )

Definition at line 163 of file x86_platform_api.cpp.

Referenced by do_signal_exit_to_user_prepare().

+ Here is the call graph for this function:

◆ platform_restore_from_signal_handler()

void platform_restore_from_signal_handler ( void * sp)

Definition at line 184 of file x86_platform_api.cpp.

+ Here is the call graph for this function:

◆ platform_get_time()

void platform_get_time ( timeval_t * time)

Definition at line 196 of file x86_platform_api.cpp.

Referenced by clock_gettimeofday(), and platform_get_datetime_str().

+ Here is the call graph for this function:

◆ platform_dump_regs()

void platform_dump_regs ( const platform_regs_t * frame)

Definition at line 201 of file x86_platform_api.cpp.

◆ platform_syscall_setup_restart_context()

void platform_syscall_setup_restart_context ( platform_regs_t * regs,
reg_t syscall_nr )

Definition at line 224 of file x86_platform_api.cpp.

◆ platform_syscall_store_retval()

void platform_syscall_store_retval ( platform_regs_t * regs,
reg_t result )

Definition at line 230 of file x86_platform_api.cpp.