From 461c2b68a16ab3314202ec7796fe7eb8a7731f2d Mon Sep 17 00:00:00 2001 From: cinap_lenrek Date: Sun, 12 Apr 2015 22:30:30 +0200 Subject: kernel: fixed segment support (for fpga experiments) fixed segments are continuous in physical memory but allocated in user pages. unlike shared segments, they are not allocated on demand but the pages are allocated on creation time (devsegment). fixed segments are never swapped out, segfreed or resized and can only be destroyed as a whole. the physical base address can be discovered by userspace reading the ctl file in devsegment. --- sys/src/9/port/fault.c | 1 + 1 file changed, 1 insertion(+) (limited to 'sys/src/9/port/fault.c') diff --git a/sys/src/9/port/fault.c b/sys/src/9/port/fault.c index 5aff0a731..f1ce5c223 100644 --- a/sys/src/9/port/fault.c +++ b/sys/src/9/port/fault.c @@ -267,6 +267,7 @@ fixfault(Segment *s, uintptr addr, int read, int doputmmu) copypage(old, *pg); putpage(old); } + case SG_FIXED: /* Never paged out */ mmuphys = PPN((*pg)->pa) | PTEWRITE | PTEVALID; (*pg)->modref = PG_MOD|PG_REF; break; -- cgit v1.2.3