miniOS
x86_64 hobby kernel with SMP, VFS, and POSIX process model
Loading...
Searching...
No Matches
syscall_mm.c File Reference
#include <miniOS/syscall.h>
#include <miniOS/sched/sched.h>
#include <miniOS/mm/vmm.h>
#include <miniOS/mm/pmm.h>
#include <miniOS/ipi/ipi.h>
#include <miniOS/fs/vfs.h>
#include <miniOS/types.h>
#include <string.h>
#include "syscall_internal.h"
Include dependency graph for syscall_mm.c:

Macros

#define MINI_OS_DEBUG_SYSCALL_MM   0
#define SYSCALL_MM_DEBUG_PRINT(...)
#define PROT_READ   1
#define PROT_WRITE   2
#define PROT_NONE   0
#define MAP_PRIVATE   0x02
#define MAP_ANONYMOUS   0x20

Functions

static uint64_t rdtsc (void)
static int64_t sys_brk (uint64_t new_brk)
static int64_t sys_mmap (uint64_t addr_hint, uint64_t len, uint64_t prot, uint64_t flags, uint64_t fd, uint64_t offset)
static int64_t sys_mprotect (uint64_t addr, uint64_t len, uint64_t prot)
static int64_t sys_munmap (uint64_t addr, uint64_t len)
int64_t syscall_dispatch_mm (uint64_t nr, uint64_t arg1, uint64_t arg2, uint64_t arg3, uint64_t arg4, uint64_t arg5, uint64_t arg6)

Variables

uint64_t miniOS_tsc_hz
uint64_t miniOS_tsc_boot

Macro Definition Documentation

◆ MAP_ANONYMOUS

#define MAP_ANONYMOUS   0x20

◆ MAP_PRIVATE

#define MAP_PRIVATE   0x02

◆ MINI_OS_DEBUG_SYSCALL_MM

#define MINI_OS_DEBUG_SYSCALL_MM   0

◆ PROT_NONE

#define PROT_NONE   0

◆ PROT_READ

#define PROT_READ   1

◆ PROT_WRITE

#define PROT_WRITE   2

◆ SYSCALL_MM_DEBUG_PRINT

#define SYSCALL_MM_DEBUG_PRINT ( ...)
Value:
do { } while (0)

Function Documentation

◆ rdtsc()

uint64_t rdtsc ( void )
inlinestatic
Here is the caller graph for this function:

◆ sys_brk()

int64_t sys_brk ( uint64_t new_brk)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ sys_mmap()

int64_t sys_mmap ( uint64_t addr_hint,
uint64_t len,
uint64_t prot,
uint64_t flags,
uint64_t fd,
uint64_t offset )
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ sys_mprotect()

int64_t sys_mprotect ( uint64_t addr,
uint64_t len,
uint64_t prot )
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ sys_munmap()

int64_t sys_munmap ( uint64_t addr,
uint64_t len )
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ syscall_dispatch_mm()

int64_t syscall_dispatch_mm ( uint64_t nr,
uint64_t arg1,
uint64_t arg2,
uint64_t arg3,
uint64_t arg4,
uint64_t arg5,
uint64_t arg6 )
Here is the call graph for this function:
Here is the caller graph for this function:

Variable Documentation

◆ miniOS_tsc_boot

uint64_t miniOS_tsc_boot
extern

◆ miniOS_tsc_hz

uint64_t miniOS_tsc_hz
extern