Skip to content

Commit

Permalink
Restarting FreeVMS project.
Browse files Browse the repository at this point in the history
  • Loading branch information
BERTRAND Joel committed Jun 14, 2013
1 parent 971e510 commit 8312c42
Show file tree
Hide file tree
Showing 9 changed files with 61 additions and 37 deletions.
Binary file modified sources/contrib/cml2/cml.pyc
Binary file not shown.
Binary file modified sources/contrib/cml2/cmlsystem.pyc
Binary file not shown.
Binary file modified sources/contrib/cml2/tree.pyc
Binary file not shown.
3 changes: 0 additions & 3 deletions sources/freevms/include/freevms/fatal.h
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,3 @@
#define PAGER_F_NOTFOUND "%%PAGER-F-NOTFOUND, "

#define SYS_F_HEAP "%%SYS-F-HEAP, "
#define SYS_F_PAGEFLT "%%SYS-F-PAGEFLT, "

#define VMS_F_PAGEFLT "%%VMS-F-PAGEFLT, "
4 changes: 4 additions & 0 deletions sources/freevms/include/freevms/information.h
Original file line number Diff line number Diff line change
Expand Up @@ -46,4 +46,8 @@

#define STDRV_I_STARTUP "%%STDRV-I-STARTUP, "

#define SYS_I_PAGEFLT "%%SYS-I-PAGEFLT, "

#define SYSBOOT_I_SYSBOOT "%%SYSBOOT-I-SYSBOOT, "

#define VMS_I_PAGEFLT "%%VMS-I-PAGEFLT, "
2 changes: 1 addition & 1 deletion sources/freevms/sys/sys_pagefault.c
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ sys$pagefault(L4_ThreadId_t caller, vms$pointer addr, vms$pointer ip,

if (dbg$sys_pagefault)
{
notice(SYS_F_PAGEFLT "pagefault request from $%lX at $%016lX\n",
notice(SYS_I_PAGEFLT "pagefault request from $%lX at $%016lX\n",
L4_ThreadNo(caller), addr);
}

Expand Down
2 changes: 1 addition & 1 deletion sources/freevms/sys/sys_pager.c
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ sys$pager(L4_KernelInterfacePage_t *kip, struct vms$meminfo *meminfo,

notice(SYSBOOT_I_SYSBOOT "spawning PAGER.SYS with executive privileges\n");

// Find INIT.EXE
// Find PAGER.SYS in module list
for(obj = meminfo->objects, i = 0; i < meminfo->num_objects; i++, obj++)
{
if (strstr(obj->name, "pager.sys") != NULL)
Expand Down
7 changes: 6 additions & 1 deletion sources/freevms/vm/INFO
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@
12 MB structures / GB pour la gestion des pages
Lancement de INIT.EXE
-> création d'un nouvel espace d'adressage
-> lancement d'un thread
--> le père envoie un strigItem contenant l'adresse à mapper puis un grantItem
--> une fois le programme mappé dans le fils, celui-ci lance le thread réel
et son pager.

-> vms$alloc() et vms$free()œ[doivent utiliser morecore du noyau]
-> rtl$alloc() et rtl$free() [doivent utiliser morecore du pager]
Expand Down
80 changes: 49 additions & 31 deletions sources/freevms/vm/vm_pager.c
Original file line number Diff line number Diff line change
Expand Up @@ -24,54 +24,72 @@
static vms$pointer
vms$swap_size(vms$pointer actual_swap_size, vms$pointer requested_swap_size)
{
vms$pointer new_swap_size;
vms$pointer new_swap_size;

vms$string_initializer(message, 80);

void *arg$print;

rtl$strcpy(&message, PAGER_I_SWPSIZE "setting swapper size to %lu bytes");
new_swap_size = actual_swap_size;

if (actual_swap_size <= requested_swap_size)
{
new_swap_size = requested_swap_size;
}
else
{
FIXME;
}

arg$print = &new_swap_size;
rtl$print(&message, &arg$print);

return(new_swap_size);
void *arg$print;

new_swap_size = actual_swap_size;

if (actual_swap_size <= requested_swap_size)
{
new_swap_size = requested_swap_size;
}
else
{
FIXME;
}

if (new_swap_size <= 1)
{
rtl$strcpy(&message, PAGER_I_SWPSIZE
"setting swap size to %lu byte");
}
else
{
rtl$strcpy(&message, PAGER_I_SWPSIZE
"setting swap size to %lu bytes");
}

arg$print = &new_swap_size;
rtl$print(&message, &arg$print);

return(new_swap_size);
}

int
main(int argc, char **argv)
{
vms$pointer new_swap_size;
vms$pointer swapper_base;
vms$pointer swap_size;
GBTree address_spaces;

vms$pointer new_swap_size;
vms$pointer swapper_base;
vms$pointer swap_size;

vms$string_initializer(message, 80);

void *arg$print;
void *arg$print;

rtl$strcpy(&message, RUN_S_STARTED "PAGER.SYS process started");
rtl$print(&message, NULL);

swapper_base = (vms$pointer) argv[0];
arg$print = &swapper_base;
swapper_base = (vms$pointer) argv[0];
arg$print = &swapper_base;

rtl$strcpy(&message, PAGER_I_SWPADDR
"setting swapper base address at $%016lX");
rtl$print(&message, &arg$print);

swap_size = 0;
new_swap_size = vms$swap_size(swap_size, 0);
swap_size = new_swap_size;

rtl$strcpy(&message, PAGER_I_SWPADDR
"setting swapper base address at $%016lX");
rtl$print(&message, &arg$print);
// Initialize B+tree that contains address space ID. Each address space
// is associated to a new B+tree that contains allocated pages. When
// pager is launched, no process is running with this pager.

swap_size = 0;
new_swap_size = vms$swap_size(swap_size, 0);
swap_size = new_swap_size;
address_spaces = NULL;

return(0);
}

0 comments on commit 8312c42

Please sign in to comment.