summaryrefslogtreecommitdiff
path: root/sys/src/9/port/portdat.h
diff options
context:
space:
mode:
authorcinap_lenrek <cinap_lenrek@felloff.net>2014-03-04 22:37:15 +0100
committercinap_lenrek <cinap_lenrek@felloff.net>2014-03-04 22:37:15 +0100
commit316d8ad76b13583848db2d93187a921c18ee275c (patch)
treed0f5c3b98606ab42bbb31f3b952ba30c607df294 /sys/src/9/port/portdat.h
parent06c8a5b3911239937e0c99634e25cfc7209df436 (diff)
pc64: fix segattach
the comment about Physseg.size being in pages is wrong, change type to uintptr and correct the comment. change the length parameter of segattach() and isoverlap() to uintptr as well. segments can grow over 4GB in pc64 now and globalsegattach() in devsegment calculates len argument of isoverlap() by s->top - s->bot. note that the syscall still takes 32bit ulong argument for the length! check for integer overflow in segattach(), make sure segment goes not beyond USTKTOP. change PTEMAPMEM constant to uvlong as it is used to calculate SEGMAXSIZE.
Diffstat (limited to 'sys/src/9/port/portdat.h')
-rw-r--r--sys/src/9/port/portdat.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/sys/src/9/port/portdat.h b/sys/src/9/port/portdat.h
index 062a6ac56..ee92c43c3 100644
--- a/sys/src/9/port/portdat.h
+++ b/sys/src/9/port/portdat.h
@@ -389,7 +389,7 @@ struct Physseg
ulong attr; /* Segment attributes */
char *name; /* Attach name */
uintptr pa; /* Physical address */
- ulong size; /* Maximum segment size in pages */
+ uintptr size; /* Maximum segment size in bytes */
Page *(*pgalloc)(Segment*, uintptr); /* Allocation if we need it */
void (*pgfree)(Page*);
};