M port/portdat.h => port/portdat.h +0 -1
@@ 344,7 344,6 @@ struct Page
ulong va; /* Virtual address for user */
ulong daddr; /* Disc address on swap */
ushort ref; /* Reference count */
- char lock; /* Software lock */
char modref; /* Simulated modify/reference bits */
char cachectl[MAXMACH]; /* Cache flushing control for putmmu */
Image *image; /* Associated text or swap image */
M port/sysfile.c => port/sysfile.c +7 -0
@@ 85,6 85,13 @@ openmode(ulong o)
}
long
+sysfsession(ulong *arg)
+{
+ USED(arg);
+ return 0;
+}
+
+long
syspipe(ulong *arg)
{
int fd[2];
M port/systab.h => port/systab.h +3 -0
@@ 40,6 40,7 @@ Syscall syssegflush;
Syscall sysrendezvous;
Syscall sysunmount;
Syscall syswait;
+Syscall sysfsession;
Syscall sysdeath;
Syscall *systab[]={
@@ 80,6 81,7 @@ Syscall *systab[]={
[RENDEZVOUS] sysrendezvous,
[UNMOUNT] sysunmount,
[WAIT] syswait,
+ [FSESSION] sysfsession,
};
char *sysctab[]={
@@ 120,4 122,5 @@ char *sysctab[]={
[RENDEZVOUS] "Rendez",
[UNMOUNT] "Unmount",
[WAIT] "Wait",
+ [FSESSION] "Fsession",
};
M power/mmu.c => power/mmu.c +40 -0
@@ 180,3 180,43 @@ putstlb(ulong tlbvirt, ulong tlbphys)
if(tlbphys == 0)
entry->virt = 0;
}
+
+/* Mapping routines for td's frame buffer
+Page*
+a16seg(Segment *s, ulong va)
+{
+ Page *pg;
+
+ pg = smalloc(sizeof(Page));
+ memset(pg, 0, sizeof(Page));
+ pg->va = va;
+ pg->pa = 0xd0000 + (va - s->base);
+ pg->ref = 1;
+ return pg;
+}
+
+Page*
+a32seg(Segment *s, ulong va)
+{
+ Page *pg;
+
+ pg = smalloc(sizeof(Page));
+ memset(pg, 0, sizeof(Page));
+ pg->va = va;
+ pg->pa = VMEA32SUP(ulong, va - s->base);
+ pg->ref = 1;
+ return pg;
+}
+
+void
+vmefree(Page *pg)
+{
+ int x;
+
+ lock(pg);
+ x = --pg->ref;
+ unlock(pg);
+ if(x <= 0)
+ free(pg);
+}
+*/