ref: d9880518f0d6923561252e290417c0cd2acd26b5
parent: e8221d07d8c9932393f76758363327c07bdbc2dd
parent: a079cd1a3a17ec7eef4d1b5009dade4a05346ddb
author: aiju <[email protected]>
date: Sun Apr 12 12:16:19 EDT 2015
merge
--- a/sys/src/9/port/devsegment.c
+++ b/sys/src/9/port/devsegment.c
@@ -319,7 +319,7 @@
segmentread(Chan *c, void *a, long n, vlong voff)
{
Globalseg *g;
- char buf[32];
+ char buf[128];
if(c->qid.type == QTDIR)
return devdirread(c, a, n, (Dirtab *)0, 0L, segmentgen);
@@ -329,11 +329,11 @@
g = c->aux;
if(g->s == nil)
error("segment not yet allocated");
- if(g->s->type&SG_TYPE == SG_FIXED)
- sprint(buf, "va %#p %#p fixed %#p\n", g->s->base, g->s->top-g->s->base,
+ if((g->s->type&SG_TYPE) == SG_FIXED)
+ snprint(buf, sizeof(buf), "va %#p %#p fixed %#p\n", g->s->base, g->s->top-g->s->base,
g->s->map[0]->pages[0]->pa);
else
- sprint(buf, "va %#p %#p\n", g->s->base, g->s->top-g->s->base);
+ snprint(buf, sizeof(buf), "va %#p %#p\n", g->s->base, g->s->top-g->s->base);
return readstr(voff, a, n, buf);
case Qdata:
g = c->aux;
--- a/sys/src/9/port/fault.c
+++ b/sys/src/9/port/fault.c
@@ -267,7 +267,6 @@
copypage(old, *pg);
putpage(old);
}
- case SG_FIXED: /* Never paged out */
mmuphys = PPN((*pg)->pa) | PTEWRITE | PTEVALID;
(*pg)->modref = PG_MOD|PG_REF;
break;
@@ -280,6 +279,7 @@
new->ref = 1;
*pg = new;
}
+ case SG_FIXED: /* Never paged out */
if (checkaddr && addr == addr2check)
(*checkaddr)(addr, s, *pg);
mmuphys = PPN((*pg)->pa) |PTEWRITE|PTEUNCACHED|PTEVALID;
--- a/sys/src/9/zynq/zynq
+++ b/sys/src/9/zynq/zynq
@@ -21,6 +21,7 @@
draw screen
mouse
usb
+ segment
link
etherzynq