sys/src/syscredel.c File Reference

MM create or delete. More...

#include <linux/config.h>
#include <linux/unistd.h>
#include <linux/linkage.h>
#include <linux/sched.h>
#include <linux/vmalloc.h>
#include <system_data_cells.h>
#include <linux/mm.h>
#include <ipldef.h>
#include <mmgdef.h>
#include <pfndef.h>
#include <phddef.h>
#include <rdedef.h>
#include <ssdef.h>
#include <starlet.h>
#include <va_rangedef.h>
#include <vmspte.h>
#include <wsldef.h>
#include <ipl.h>
#include <queue.h>
#include <mmg_functions.h>
#include <exe_routines.h>
#include <mmg_routines.h>
#include <linux/slab.h>
#include <internals.h>

Go to the source code of this file.

Defines

#define OLDINT

Functions

struct _rdemmg_lookup_rde_va (void *va, struct _phd *const phd, int function, int ipl)
struct _rdemmg_search_rde_va (void *va, struct _rde *head, struct _rde **prev, struct _rde **next)
asmlinkage void exe_cntreg (void)
int mmg_delpag (int acmode, void *va, struct _pcb *p, signed int pagedirection, struct _rde *rde, unsigned long newpte)
asmlinkage int exe_deltva (struct _va_range *inadr, struct _va_range *retadr, unsigned int acmode)
asmlinkage int exe_expreg (unsigned int pagcnt, struct _va_range *retadr, unsigned int acmode, char region)
 system service for expanding region with zero ptes - see 5.2 15.3.2 note that this is not tested at all and probably does not work consider this as MISSING
int mmg_inadrini ()
int mmg_retadrini ()
int insrde (struct _rde *elem, struct _rde *head)
int mmg_crepag (int acmode, void *va, struct _pcb *p, signed int pagedirection, struct _rde *rde, unsigned long newpte)
 routine for single virtual address space creation - see 5.2 15.3.1
int mmg_credel (int acmode, void *first, void *last, void(*pagesubr)(), struct _va_range *inadr, struct _va_range *retadr, unsigned int acmodeagain, struct _pcb *p, int numpages)
 create or delete page - see 5.2 15.1
asmlinkage int exe_cretva (struct _va_range *inadr, struct _va_range *retadr, unsigned int acmode)
 system service for virtual address space creation - see 5.2 15.2 15.3.1
int mmg_fast_create (struct _pcb *p, struct _rde *rde, void *start_va, void *end_va, unsigned long pages, unsigned long prot_pte)
int mmg_fast_create_gptx (struct _pcb *p, struct _rde *rde, void *start_va, void *end_va, unsigned long pages, unsigned long prot_pte)
asmlinkage int exe_create_region_32_wrap (struct struct_args *s)
asmlinkage int exe_create_region_32 (unsigned long length, unsigned int region_prot, unsigned int flags, unsigned long long *return_region_id, void **return_va, unsigned long *return_length, unsigned long start_va)
asmlinkage int exe_delete_region_32 (unsigned long long *region_id, unsigned int acmode, void **return_va, unsigned long *return_length)
asmlinkage int exe_get_region_info (unsigned int function_code, unsigned long long *region_id, void *start_va, void *reserved, unsigned int buffer_length, void *buffer_address, unsigned int *return_length)

Variables

int vava = 0
struct _mmg mymmg


Detailed Description

MM create or delete.

Author:
Roar Thronęs

Definition in file syscredel.c.


Define Documentation

#define OLDINT

Definition at line 37 of file syscredel.c.


Function Documentation

asmlinkage void exe_cntreg ( void   ) 

Definition at line 56 of file syscredel.c.

asmlinkage int exe_create_region_32 ( unsigned long  length,
unsigned int  region_prot,
unsigned int  flags,
unsigned long long *  return_region_id,
void **  return_va,
unsigned long *  return_length,
unsigned long  start_va 
)

asmlinkage int exe_create_region_32_wrap ( struct struct_args s  ) 

asmlinkage int exe_cretva ( struct _va_range inadr,
struct _va_range retadr,
unsigned int  acmode 
)

system service for virtual address space creation - see 5.2 15.2 15.3.1

Parameters:
inadr address range
retadr returned address range
acmode access mode

create stack scratch space - MISSING

template pte - (seems to be in credel)

set ipl 2 - MISSING

test page ownership and access mode - MISSING

call credel

test address range in system space, and return NOPRIV - (seems to be in credel)

test overlapping addresses - MISSING

does only credel, no fast_create

return pagefile quota, peak pagefile usage - MISSING

set ipl 0 - MISSING

Definition at line 309 of file syscredel.c.

References _pcb, mmg_credel(), mmg_lookup_rde_va(), _va_range::va_range_ps_end_va, and _va_range::va_range_ps_start_va.

Referenced by do_mmap_pgoff().

asmlinkage int exe_delete_region_32 ( unsigned long long *  region_id,
unsigned int  acmode,
void **  return_va,
unsigned long *  return_length 
)

Definition at line 499 of file syscredel.c.

asmlinkage int exe_deltva ( struct _va_range inadr,
struct _va_range retadr,
unsigned int  acmode 
)

asmlinkage int exe_expreg ( unsigned int  pagcnt,
struct _va_range retadr,
unsigned int  acmode,
char  region 
)

system service for expanding region with zero ptes - see 5.2 15.3.2 note that this is not tested at all and probably does not work consider this as MISSING

Parameters:
pagcnt page count
retadr return address
acmode access mode
region which region

Definition at line 205 of file syscredel.c.

References exe_create_region_32(), LOOKUP_RDE_EXACT, mmg_fast_create(), mmg_lookup_rde_va(), _rde::rde_pq_first_free_va, SS__NORMAL, _va_range::va_range_ps_end_va, and _va_range::va_range_ps_start_va.

asmlinkage int exe_get_region_info ( unsigned int  function_code,
unsigned long long *  region_id,
void *  start_va,
void *  reserved,
unsigned int  buffer_length,
void *  buffer_address,
unsigned int *  return_length 
)

Definition at line 503 of file syscredel.c.

int insrde ( struct _rde elem,
struct _rde head 
) [inline]

int mmg_credel ( int  acmode,
void *  first,
void *  last,
void(*)()  pagesubr,
struct _va_range inadr,
struct _va_range retadr,
unsigned int  acmodeagain,
struct _pcb *  p,
int  numpages 
)

create or delete page - see 5.2 15.1

Parameters:
first address
last address
pagesubr page crepag or credel subroutine
inadr not yet used
retadr return address not yet used
acmodeagain not yet used
p pcb struct
numpager number of pages, not yet used

initialize template pte

test if in system space, and return error

set pagesubr in scratch space

set svstartva in scratch - MISSING

iterate until last

invoke per-page pagesubr

Definition at line 283 of file syscredel.c.

References _mmg::mmg_l_pagesubr, mymmg, SS__NOPRIV, and SS__NORMAL.

Referenced by exe_cretva(), exe_deltva(), exe_purgws(), and exe_setprt().

int mmg_crepag ( int  acmode,
void *  va,
struct _pcb *  p,
signed int  pagedirection,
struct _rde rde,
unsigned long  newpte 
)

routine for single virtual address space creation - see 5.2 15.3.1

test if it is within its address space - MISSING

check if we should set the new pte

test whether page already exists and return va_in_use if so

test if overmap allowed and do eventual delpag - MISSING

charge pagefile quota - MISSING

store requested value into the pte

Definition at line 333 of file syscredel.c.

References pte_alloc(), _rde::rde_pq_first_free_va, and SS__VA_IN_USE.

Referenced by mmg_fast_create(), and mmg_fast_create_gptx().

int mmg_delpag ( int  acmode,
void *  va,
struct _pcb *  p,
signed int  pagedirection,
struct _rde rde,
unsigned long  newpte 
)

int mmg_fast_create ( struct _pcb *  p,
struct _rde rde,
void *  start_va,
void *  end_va,
unsigned long  pages,
unsigned long  prot_pte 
)

Definition at line 455 of file syscredel.c.

References mmg_crepag().

Referenced by exe_crmpsc(), and exe_expreg().

int mmg_fast_create_gptx ( struct _pcb *  p,
struct _rde rde,
void *  start_va,
void *  end_va,
unsigned long  pages,
unsigned long  prot_pte 
)

Definition at line 468 of file syscredel.c.

References mmg_crepag(), and _mypte::pte_l_all.

Referenced by exe_mgblsc().

int mmg_inadrini (  )  [inline]

Definition at line 243 of file syscredel.c.

struct _rde * mmg_lookup_rde_va ( void *  va,
struct _phd *const   phd,
int  function,
int  ipl 
) [read]

int mmg_retadrini (  )  [inline]

Definition at line 246 of file syscredel.c.

struct _rde * mmg_search_rde_va ( void *  va,
struct _rde head,
struct _rde **  prev,
struct _rde **  next 
) [read]

Definition at line 423 of file syscredel.c.

References _rde::rde_pq_start_va, _rde::rde_ps_va_list_flink, and _rde::rde_v_descend.

Referenced by mmg_lookup_rde_va().


Variable Documentation

struct _mmg mymmg

Definition at line 241 of file syscredel.c.

Referenced by mmg_credel().

int vava = 0

Definition at line 59 of file syscredel.c.

Referenced by mmg_delpag().


Generated on Fri Oct 9 10:26:02 2009 for FreeVMS by  doxygen 1.5.5