brown paper bag patch. mem.h was forgotten in previous patch to add sys to pc port Reference: /n/atom/patch/applied2013/fspcmachsz Date: Tue Aug 27 18:32:32 CES 2013 Signed-off-by: quanstro@quanstro.net --- /sys/src/fs/pc/mem.h Tue Aug 27 18:31:55 2013 +++ /sys/src/fs/pc/mem.h Tue Aug 27 18:31:56 2013 @@ -1,15 +1,25 @@ +#define KiB 1024u /* Kibi 0x0000000000000400 */ +#define MiB 1048576u /* Mebi 0x0000000000100000 */ +#define GiB 1073741824u /* Gibi 000000000040000000 */ +#define TiB 1099511627776ull /* Tebi 0x0000010000000000 */ +#define PiB 1125899906842624ull /* Pebi 0x0004000000000000 */ +#define EiB 1152921504606846976ull /* Exbi 0x1000000000000000 */ + #define BY2WD 4 /* bytes per word */ #define BY2V 8 /* bytes per vlong */ #define BY2PG 4096 /* bytes per page */ #define PGSHIFT 12 /* log(BY2PG) */ #define PGROUND(s) (((s)+(BY2PG-1))&~(BY2PG-1)) #define MB (1024*1024) -#define MiB (1024*1024) #define HZ 1000 /* clock frequency */ #define TK2MS(t) (((ulong)(t)*1000)/HZ) /* ticks to milliseconds - beware rounding */ #define MS2TK(t) (((ulong)(t)*HZ)/1000) /* milliseconds to ticks - beware rounding */ #define TK2SEC(t) ((t)/HZ) /* ticks to seconds */ + +#define MACHSZ (4*KiB) +#define MACHMAX 32 +#define MACHSTKSZ (6*4*KiB) /* * Fundamental addresses