#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 _rde * | mmg_lookup_rde_va (void *va, struct _phd *const phd, int function, int ipl) |
struct _rde * | mmg_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 |
Definition in file syscredel.c.
#define OLDINT |
Definition at line 37 of file syscredel.c.
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 | |||
) |
Definition at line 486 of file syscredel.c.
References insrde(), kmalloc(), _rde::rde_b_type, _rde::rde_l_flags, _rde::rde_pq_start_va, _rde::rde_q_region_size, _rde::rde_r_regprot, and SS__NORMAL.
Referenced by do_mmap_pgoff(), exe_create_region_32_wrap(), exe_expreg(), and exe_imgact().
asmlinkage int exe_create_region_32_wrap | ( | struct struct_args * | s | ) |
Definition at line 482 of file syscredel.c.
References exe_create_region_32(), struct_args::s1, struct_args::s2, struct_args::s3, struct_args::s4, struct_args::s5, struct_args::s6, and struct_args::s7.
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
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 | |||
) |
Definition at line 181 of file syscredel.c.
References _pcb, ctl_gl_pcb, IPL__ASTDEL, mmg_credel(), _va_range::va_range_ps_end_va, and _va_range::va_range_ps_start_va.
Referenced by mmg_imgreset(), and zap_page_range().
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
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.
Definition at line 249 of file syscredel.c.
References _rde::rde_pq_start_va, _rde::rde_ps_va_list_blink, and _rde::rde_ps_va_list_flink.
Referenced by do_brk(), and exe_create_region_32().
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
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 | |||
) |
Definition at line 61 of file syscredel.c.
References IPL__MMG, mem_map, mmg_dallocpagfil1(), mmg_dallocpfn(), mmg_delpfnlst(), _pfn::pfn_l_wslx_qw, _phd::phd_l_wslist, _mypte::pte_v_pfn, _mypte::pte_v_typ0, _mypte::pte_v_typ1, _rde::rde_pq_first_free_va, SPIN_MMG, SS__NORMAL, vava, _wsl::wsl_pq_va, and _wsl::wsl_v_pagtyp.
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.
note that adjstk - 5.2 15.3.3 - is MISSING
Definition at line 375 of file syscredel.c.
References IPL__ASTDEL, LOOKUP_RDE_EXACT, mmg_search_rde_va(), _phd::phd_ps_p0_va_list_flink, _rde::rde_pq_start_va, _rde::rde_ps_va_list_blink, and _rde::rde_v_descend.
Referenced by exe_cretva(), exe_expreg(), and exe_setprt().
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().
int vava = 0 |