FreeBSD kernel kern code
kern_sharedpage.c File Reference
#include <sys/cdefs.h>
#include "opt_vm.h"
#include <sys/param.h>
#include <sys/systm.h>
#include <sys/kernel.h>
#include <sys/lock.h>
#include <sys/malloc.h>
#include <sys/rwlock.h>
#include <sys/stddef.h>
#include <sys/sysent.h>
#include <sys/sysctl.h>
#include <sys/vdso.h>
#include <vm/vm.h>
#include <vm/vm_param.h>
#include <vm/pmap.h>
#include <vm/vm_extern.h>
#include <vm/vm_kern.h>
#include <vm/vm_map.h>
#include <vm/vm_object.h>
#include <vm/vm_page.h>
#include <vm/vm_pager.h>
Include dependency graph for kern_sharedpage.c:

Go to the source code of this file.

Functions

 __FBSDID ("$FreeBSD$")
 
void shared_page_write (int base, int size, const void *data)
 
static int shared_page_alloc_locked (int size, int align)
 
int shared_page_alloc (int size, int align)
 
int shared_page_fill (int size, int align, const void *data)
 
static void shared_page_init (void *dummy __unused)
 
 SYSINIT (shp, SI_SUB_EXEC, SI_ORDER_FIRST,(sysinit_cfunc_t) shared_page_init, NULL)
 
static void timehands_update (struct vdso_sv_tk *svtk)
 
void timekeep_push_vdso (void)
 
struct vdso_sv_tk * alloc_sv_tk (void)
 
void exec_sysvec_init (void *param)
 
void exec_sysvec_init_secondary (struct sysentvec *sv, struct sysentvec *sv2)
 

Variables

static struct sx shared_page_alloc_sx
 
static vm_object_t shared_page_obj
 
static int shared_page_free
 
char * shared_page_mapping
 
static struct vdso_sv_tk * host_svtk
 

Function Documentation

◆ __FBSDID()

__FBSDID ( "$FreeBSD$"  )

◆ alloc_sv_tk()

struct vdso_sv_tk * alloc_sv_tk ( void  )

Definition at line 229 of file kern_sharedpage.c.

References malloc(), shared_page_alloc(), shared_page_write(), and timekeep_push_vdso().

Referenced by exec_sysvec_init().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ exec_sysvec_init()

void exec_sysvec_init ( void *  param)

Definition at line 305 of file kern_sharedpage.c.

References alloc_sv_tk(), flags, host_svtk, panic(), res, shared_page_fill(), shared_page_mapping, and shared_page_obj.

Here is the call graph for this function:

◆ exec_sysvec_init_secondary()

void exec_sysvec_init_secondary ( struct sysentvec *  sv,
struct sysentvec *  sv2 
)

Definition at line 385 of file kern_sharedpage.c.

◆ shared_page_alloc()

int shared_page_alloc ( int  size,
int  align 
)

Definition at line 93 of file kern_sharedpage.c.

References res, shared_page_alloc_locked(), and shared_page_alloc_sx.

Referenced by alloc_sv_tk().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ shared_page_alloc_locked()

static int shared_page_alloc_locked ( int  size,
int  align 
)
static

Definition at line 80 of file kern_sharedpage.c.

References res, shared_page_free, and shared_page_obj.

Referenced by shared_page_alloc(), and shared_page_fill().

Here is the caller graph for this function:

◆ shared_page_fill()

int shared_page_fill ( int  size,
int  align,
const void *  data 
)

Definition at line 104 of file kern_sharedpage.c.

References data, res, shared_page_alloc_locked(), shared_page_alloc_sx, and shared_page_write().

Referenced by exec_sysvec_init().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ shared_page_init()

static void shared_page_init ( void *dummy  __unused)
static

Definition at line 117 of file kern_sharedpage.c.

References addr, shared_page_alloc_sx, shared_page_mapping, and shared_page_obj.

◆ shared_page_write()

void shared_page_write ( int  base,
int  size,
const void *  data 
)

Definition at line 73 of file kern_sharedpage.c.

References data, and shared_page_mapping.

Referenced by alloc_sv_tk(), and shared_page_fill().

Here is the caller graph for this function:

◆ SYSINIT()

SYSINIT ( shp  ,
SI_SUB_EXEC  ,
SI_ORDER_FIRST  ,
(sysinit_cfunc_t)  shared_page_init,
NULL   
)

◆ timehands_update()

static void timehands_update ( struct vdso_sv_tk *  svtk)
static

Definition at line 146 of file kern_sharedpage.c.

References shared_page_mapping, and tc_fill_vdso_timehands().

Referenced by timekeep_push_vdso().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ timekeep_push_vdso()

void timekeep_push_vdso ( void  )

Definition at line 217 of file kern_sharedpage.c.

References host_svtk, and timehands_update().

Referenced by alloc_sv_tk(), and tc_windup().

Here is the call graph for this function:
Here is the caller graph for this function:

Variable Documentation

◆ host_svtk

struct vdso_sv_tk* host_svtk
static

Definition at line 211 of file kern_sharedpage.c.

Referenced by exec_sysvec_init(), and timekeep_push_vdso().

◆ shared_page_alloc_sx

struct sx shared_page_alloc_sx
static

Definition at line 59 of file kern_sharedpage.c.

Referenced by shared_page_alloc(), shared_page_fill(), and shared_page_init().

◆ shared_page_free

int shared_page_free
static

Definition at line 61 of file kern_sharedpage.c.

Referenced by shared_page_alloc_locked().

◆ shared_page_mapping

char* shared_page_mapping

◆ shared_page_obj

vm_object_t shared_page_obj
static

Definition at line 60 of file kern_sharedpage.c.

Referenced by exec_sysvec_init(), shared_page_alloc_locked(), and shared_page_init().