| plan 9 kernel history: overview | file list | diff list |
1991/0719/pc/mem.h (diff list | history)
| 1991/0613/sys/src/9/pc/mem.h:37,43 – 1991/0614/sys/src/9/pc/mem.h:37,43 (short | long) | ||
| 1991/0613 | /* * segment descriptor initializers */ | |
| 1991/0614 | #define DATASEG(p) { SEGG|SEGB|(0xF<<16)|SEGP|SEGPL(p)|SEGDATA|SEGW, 0xFFFF } | |
| 1991/0613 | #define EXECSEG(p) { SEGG|SEGD|(0xF<<16)|SEGP|SEGPL(p)|SEGEXEC|SEGR, 0xFFFF } /* | |
| 1991/0614/sys/src/9/pc/mem.h:1,57 – 1991/0625/sys/src/9/pc/mem.h:1,75 (short | long) | ||
| 1991/0613 |
| |
| 1991/0625 | /* * Memory and machine-specific definitions. Used in C and assembler. */ | |
| 1991/0613 |
| |
| 1991/0625 | /* * Sizes */ | |
| 1991/0613 | ||
| 1991/0625 | #define BI2BY 8 /* bits per byte */ #define BI2WD 32 /* bits per word */ #define BY2WD 4 /* bytes per word */ #define BY2PG 4096 /* bytes per page */ #define WD2PG (BY2PG/BY2WD) /* words per page */ #define PGSHIFT 13 /* log(BY2PG) */ #define PGROUND(s) (((s)+(BY2PG-1))&~(BY2PG-1)) #define MAXMACH 1 /* max # cpus system can run */ | |
| 1991/0613 | /* | |
| 1991/0625 | * Time (???) * Clock frequency is 68.3900 HZ | |
| 1991/0613 | */ | |
| 1991/0625 | #define HZ (68) /* clock frequency */ #define MS2HZ (1000/HZ) /* millisec per clock tick */ #define TK2SEC(t) ((t)*100/6839) /* ticks to seconds */ #define TK2MS(t) ((((ulong)(t))*100000)/6839) /* ticks to milliseconds */ #define MS2TK(t) ((((ulong)(t))*6839)/100000) /* milliseconds to ticks */ | |
| 1991/0613 | /* | |
| 1991/0625 | * Fundamental addresses | |
| 1991/0613 | */ | |
| 1991/0625 | #define USERADDR 0xC0000000 #define UREGADDR (USERADDR+BY2PG-4*16) | |
| 1991/0613 | /* | |
| 1991/0625 | * Address spaces * * User is at 0-2GB * Kernel is at 2GB-4GB | |
| 1991/0613 | */ | |
| 1991/0614 |
| |
| 1991/0613 |
| |
| 1991/0625 | #define UZERO 0 /* base of user address space */ #define UTZERO (UZERO+BY2PG) /* first address in user text */ #define TSTKTOP USERADDR /* end of new stack in sysexec */ #define TSTKSIZ 10 #define USTKTOP (TSTKTOP-TSTKSIZ*BY2PG) /* byte just beyond user stack */ #define KZERO 0x80000000 /* base of kernel address space */ #define KTZERO KZERO /* first address in kernel text */ #define USTKSIZE (4*1024*1024) /* size of user stack */ #define MACHSIZE 4096 #define isphys(x) ((x)&KZERO) | |
| 1991/0613 | /* * known segments (in GDT) and their selectors */ | |
| 1991/0625 | #define NULLSEG 0 /* null segment */ #define KESEG 1 /* kernel executable */ #define KDSEG 2 /* kernel data/stack */ #define UESEG 3 /* user executable */ #define UDSEG 4 /* user data/stack */ #define SYSGATE 5 /* system call gate */ #define SELGDT (0<<3) /* selector is in gdt */ #define SELLDT (1<<3) /* selector is in ldt */ #define SELECTOR(i, t, p) (((i)<<4) | (t) | (p)) | |
| 1991/0613 | #define NULLSEL SELECTOR(NULLSEG, SELGDT, 0) #define KESEL SELECTOR(KESEG, SELGDT, 0) #define KDSEL SELECTOR(KDSEG, SELGDT, 0) | |
| 1991/0614/sys/src/9/pc/mem.h:60,99 – 1991/0625/sys/src/9/pc/mem.h:78,80 | ||
| 1991/0613 | #define UDSEL SELECTOR(UDSEG, SELGDT, 3) #define USSEL SELECTOR(UDSEG, SELGDT, 3) | |
| 1991/0625/sys/src/9/pc/mem.h:78,80 – 1991/0627/sys/src/9/pc/mem.h:78,97 (short | long) | ||
| 1991/0613 | #define UDSEL SELECTOR(UDSEG, SELGDT, 3) #define USSEL SELECTOR(UDSEG, SELGDT, 3) | |
| 1991/0627 | /* * fields in segment descriptors */ #define SEGDATA (0x10<<8) /* data/stack segment */ #define SEGEXEC (0x18<<8) /* executable segment */ #define SEGCG (0x0C<<8) /* call gate */ #define SEGIG (0x0E<<8) /* interrupt gate */ #define SEGTG (0x0F<<8) /* task gate */ #define SEGP (1<<15) /* segment present */ #define SEGPL(x) ((x)<<13) /* priority level */ #define SEGB (1<<22) /* granularity 1==4k (for expand-down) */ #define SEGG (1<<23) /* granularity 1==4k (for other) */ #define SEGE (1<<10) /* expand down */ #define SEGW (1<<9) /* writable (for data/stack) */ #define SEGR (1<<9) /* readable (for code) */ #define SEGD (1<<22) /* default 1==32bit (for code) */ | |
| 1991/0627/sys/src/9/pc/mem.h:68,74 – 1991/0629/sys/src/9/pc/mem.h:68,74 (short | long) | ||
| 1991/0625 | #define SELGDT (0<<3) /* selector is in gdt */ #define SELLDT (1<<3) /* selector is in ldt */ | |
| 1991/0629 | #define SELECTOR(i, t, p) (((i)<<3) | (t) | (p)) | |
| 1991/0625 | ||
| 1991/0613 | #define NULLSEL SELECTOR(NULLSEG, SELGDT, 0) #define KESEL SELECTOR(KESEG, SELGDT, 0) | |
| 1991/0629/sys/src/9/pc/mem.h:59,68 – 1991/0703/sys/src/9/pc/mem.h:59,68 (short | long) | ||
| 1991/0613 | */ | |
| 1991/0625 | #define NULLSEG 0 /* null segment */ | |
| 1991/0703 | #define KDSEG 1 /* kernel data/stack */ #define KESEG 2 /* kernel executable */ #define UDSEG 3 /* user data/stack */ #define UESEG 4 /* user executable */ | |
| 1991/0625 | #define SYSGATE 5 /* system call gate */ #define SELGDT (0<<3) /* selector is in gdt */ | |
| 1991/0629/sys/src/9/pc/mem.h:86,91 – 1991/0703/sys/src/9/pc/mem.h:86,92 | ||
| 1991/0627 | #define SEGCG (0x0C<<8) /* call gate */ #define SEGIG (0x0E<<8) /* interrupt gate */ #define SEGTG (0x0F<<8) /* task gate */ | |
| 1991/0703 | #define SEGTYPE (0x1F<<8) | |
| 1991/0627 | #define SEGP (1<<15) /* segment present */ #define SEGPL(x) ((x)<<13) /* priority level */ | |
| 1991/0703/sys/src/9/pc/mem.h:17,31 – 1991/0705/sys/src/9/pc/mem.h:17,31 (short | long) | ||
| 1991/0625 | #define MAXMACH 1 /* max # cpus system can run */ | |
| 1991/0613 | /* | |
| 1991/0625 |
| |
| 1991/0705 | * Time * Clock frequency is ??? HZ | |
| 1991/0613 | */ | |
| 1991/0625 |
| |
| 1991/0705 | #define HZ (18) /* clock frequency */ #define MS2HZ (54) /* millisec per clock tick */ #define TK2SEC(t) ((t)*10/185) /* ticks to seconds */ #define TK2MS(t) ((((ulong)(t))*10000)/185) /* ticks to milliseconds */ #define MS2TK(t) ((((ulong)(t))*185)/10000) /* milliseconds to ticks */ | |
| 1991/0613 | /* | |
| 1991/0625 | * Fundamental addresses | |
| 1991/0705/sys/src/9/pc/mem.h:5,11 – 1991/0706/sys/src/9/pc/mem.h:5,10 (short | long) | ||
| 1991/0625 | /* * Sizes */ | |
| 1991/0613 | ||
| 1991/0625 | #define BI2BY 8 /* bits per byte */ #define BI2WD 32 /* bits per word */ #define BY2WD 4 /* bytes per word */ | |
| 1991/0705/sys/src/9/pc/mem.h:20,26 – 1991/0706/sys/src/9/pc/mem.h:19,24 | ||
| 1991/0705 | * Time * Clock frequency is ??? HZ | |
| 1991/0613 | */ | |
| 1991/0705 | #define HZ (18) /* clock frequency */ #define MS2HZ (54) /* millisec per clock tick */ #define TK2SEC(t) ((t)*10/185) /* ticks to seconds */ | |
| 1991/0705/sys/src/9/pc/mem.h:30,36 – 1991/0706/sys/src/9/pc/mem.h:28,33 | ||
| 1991/0613 | /* | |
| 1991/0625 | * Fundamental addresses | |
| 1991/0613 | */ | |
| 1991/0625 | #define USERADDR 0xC0000000 #define UREGADDR (USERADDR+BY2PG-4*16) | |
| 1991/0705/sys/src/9/pc/mem.h:40,46 – 1991/0706/sys/src/9/pc/mem.h:37,42 | ||
| 1991/0625 | * User is at 0-2GB * Kernel is at 2GB-4GB | |
| 1991/0613 | */ | |
| 1991/0625 | #define UZERO 0 /* base of user address space */ #define UTZERO (UZERO+BY2PG) /* first address in user text */ #define TSTKTOP USERADDR /* end of new stack in sysexec */ | |
| 1991/0705/sys/src/9/pc/mem.h:55,63 – 1991/0706/sys/src/9/pc/mem.h:51,58 | ||
| 1991/0625 | #define isphys(x) ((x)&KZERO) | |
| 1991/0613 | /* | |
| 1991/0706 | * known 80386 segments (in GDT) and their selectors | |
| 1991/0613 | */ | |
| 1991/0625 |
| |
| 1991/0703 | #define KDSEG 1 /* kernel data/stack */ #define KESEG 2 /* kernel executable */ | |
| 1991/0705/sys/src/9/pc/mem.h:64,69 – 1991/0706/sys/src/9/pc/mem.h:59,66 | ||
| 1991/0703 | #define UDSEG 3 /* user data/stack */ #define UESEG 4 /* user executable */ | |
| 1991/0625 | #define SYSGATE 5 /* system call gate */ | |
| 1991/0706 | #define RDSEG 6 /* reboot data/stack */ #define RESEG 7 /* reboot executable */ | |
| 1991/0625 | #define SELGDT (0<<3) /* selector is in gdt */ #define SELLDT (1<<3) /* selector is in ldt */ | |
| 1991/0705/sys/src/9/pc/mem.h:77,82 – 1991/0706/sys/src/9/pc/mem.h:74,81 | ||
| 1991/0613 | #define UESEL SELECTOR(UESEG, SELGDT, 3) #define UDSEL SELECTOR(UDSEG, SELGDT, 3) #define USSEL SELECTOR(UDSEG, SELGDT, 3) | |
| 1991/0706 | #define RDSEL SELECTOR(RDSEG, SELGDT, 0) #define RESEL SELECTOR(RESEG, SELGDT, 0) | |
| 1991/0613 | ||
| 1991/0627 | /* * fields in segment descriptors | |
| 1991/0705/sys/src/9/pc/mem.h:96,98 – 1991/0706/sys/src/9/pc/mem.h:95,104 | ||
| 1991/0627 | #define SEGW (1<<9) /* writable (for data/stack) */ #define SEGR (1<<9) /* readable (for code) */ #define SEGD (1<<22) /* default 1==32bit (for code) */ | |
| 1991/0706 | /* * virtual MMU entries */ #define PTEMAPMEM (1024*1024) /* ??? */ #define SEGMAPSIZE 16 /* ??? */ #define PTEPERTAB (PTEMAPMEM/BY2PG) /* ??? */ | |
| 1991/0706/sys/src/9/pc/mem.h:17,29 – 1991/0709/sys/src/9/pc/mem.h:17,28 (short | long) | ||
| 1991/0625 | ||
| 1991/0613 | /* | |
| 1991/0705 | * Time | |
| 1991/0613 | */ | |
| 1991/0705 |
| |
| 1991/0709 | #define HZ (20) /* clock frequency */ #define MS2HZ (1000/HZ) /* millisec per clock tick */ #define TK2SEC(t) ((t)/HZ) /* ticks to seconds */ #define TK2MS(t) ((((ulong)(t))*1000)/HZ) /* ticks to milliseconds */ #define MS2TK(t) ((((ulong)(t))*HZ)/1000) /* milliseconds to ticks */ | |
| 1991/0613 | /* | |
| 1991/0625 | * Fundamental addresses | |
| 1991/0709/sys/src/9/pc/mem.h:96,103 – 1991/0710/sys/src/9/pc/mem.h:96,114 (short | long) | ||
| 1991/0627 | #define SEGD (1<<22) /* default 1==32bit (for code) */ | |
| 1991/0706 | /* | |
| 1991/0710 | * virtual MMU | |
| 1991/0706 | */ #define PTEMAPMEM (1024*1024) /* ??? */ #define SEGMAPSIZE 16 /* ??? */ #define PTEPERTAB (PTEMAPMEM/BY2PG) /* ??? */ | |
| 1991/0710 | /* * physical MMU */ #define PPN(x) ((x)&~(BY2PG-1)) #define PTEVALID (1<<0) #define PTEUNCACHED 0 /* everything is uncached */ #define PTEWRITE (1<<1) #define PTERONLY (0<<1) #define PTEKERNEL (0<<2) #define PTEUSER (1<<2) | |
| 1991/0710/sys/src/9/pc/mem.h:10,16 – 1991/0711/sys/src/9/pc/mem.h:10,16 (short | long) | ||
| 1991/0625 | #define BY2WD 4 /* bytes per word */ #define BY2PG 4096 /* bytes per page */ #define WD2PG (BY2PG/BY2WD) /* words per page */ | |
| 1991/0711 | #define PGSHIFT 12 /* log(BY2PG) */ | |
| 1991/0625 | #define PGROUND(s) (((s)+(BY2PG-1))&~(BY2PG-1)) #define MAXMACH 1 /* max # cpus system can run */ | |
| 1991/0710/sys/src/9/pc/mem.h:47,53 – 1991/0711/sys/src/9/pc/mem.h:47,53 | ||
| 1991/0625 | #define MACHSIZE 4096 | |
| 1991/0711 | #define isphys(x) (((ulong)x)&KZERO) | |
| 1991/0625 | ||
| 1991/0613 | /* | |
| 1991/0706 | * known 80386 segments (in GDT) and their selectors | |
| 1991/0710/sys/src/9/pc/mem.h:101,111 – 1991/0711/sys/src/9/pc/mem.h:101,111 | ||
| 1991/0706 | #define PTEMAPMEM (1024*1024) /* ??? */ #define SEGMAPSIZE 16 /* ??? */ #define PTEPERTAB (PTEMAPMEM/BY2PG) /* ??? */ | |
| 1991/0711 | #define PPN(x) ((x)&~(BY2PG-1)) | |
| 1991/0710 | /* * physical MMU */ | |
| 1991/0711/sys/src/9/pc/mem.h:69,78 – 1991/0716/sys/src/9/pc/mem.h:69,76 (short | long) | ||
| 1991/0613 | #define NULLSEL SELECTOR(NULLSEG, SELGDT, 0) #define KESEL SELECTOR(KESEG, SELGDT, 0) #define KDSEL SELECTOR(KDSEG, SELGDT, 0) | |
| 1991/0706 | #define RDSEL SELECTOR(RDSEG, SELGDT, 0) #define RESEL SELECTOR(RESEG, SELGDT, 0) | |
| 1991/0613 | ||
| 1991/0711/sys/src/9/pc/mem.h:112,114 – 1991/0716/sys/src/9/pc/mem.h:110,117 | ||
| 1991/0710 | #define PTERONLY (0<<1) #define PTEKERNEL (0<<2) #define PTEUSER (1<<2) | |
| 1991/0716 | /* * flag register bits that we care about */ #define IFLAG 0x200 | |
| 1991/0716/sys/src/9/pc/mem.h:59,65 – 1991/0717/sys/src/9/pc/mem.h:59,66 (short | long) | ||
| 1991/0703 | #define UESEG 4 /* user executable */ | |
| 1991/0625 | #define SYSGATE 5 /* system call gate */ | |
| 1991/0706 | #define RDSEG 6 /* reboot data/stack */ | |
| 1991/0717 | #define RESEG 7 /* reboot executable */ #define TSSSEG 8 /* task segment */ | |
| 1991/0625 | #define SELGDT (0<<3) /* selector is in gdt */ #define SELLDT (1<<3) /* selector is in ldt */ | |
| 1991/0716/sys/src/9/pc/mem.h:73,78 – 1991/0717/sys/src/9/pc/mem.h:74,80 | ||
| 1991/0613 | #define UDSEL SELECTOR(UDSEG, SELGDT, 3) | |
| 1991/0706 | #define RDSEL SELECTOR(RDSEG, SELGDT, 0) #define RESEL SELECTOR(RESEG, SELGDT, 0) | |
| 1991/0717 | #define TSSSEL SELECTOR(TSSSEG, SELGDT, 0) | |
| 1991/0613 | ||
| 1991/0627 | /* * fields in segment descriptors | |
| 1991/0716/sys/src/9/pc/mem.h:79,84 – 1991/0717/sys/src/9/pc/mem.h:81,87 | ||
| 1991/0627 | */ #define SEGDATA (0x10<<8) /* data/stack segment */ #define SEGEXEC (0x18<<8) /* executable segment */ | |
| 1991/0717 | #define SEGTSS (0x9<<8) /* TSS segment */ | |
| 1991/0627 | #define SEGCG (0x0C<<8) /* call gate */ #define SEGIG (0x0E<<8) /* interrupt gate */ #define SEGTG (0x0F<<8) /* task gate */ | |
| 1991/0717/sys/src/9/pc/mem.h:27,49 – 1991/0718/sys/src/9/pc/mem.h:27,54 (short | long) | ||
| 1991/0613 | /* | |
| 1991/0625 | * Fundamental addresses | |
| 1991/0613 | */ | |
| 1991/0625 |
| |
| 1991/0613 | /* | |
| 1991/0625 |
| |
| 1991/0718 | * Address spaces | |
| 1991/0625 | * | |
| 1991/0718 | * User is at 0-2GB * Kernel is at 2GB-4GB * * To avoid an extra page map, both the user stack (USTKTOP) and * the temporary user stack (TSTKTOP) should be in the the same * 4 meg. | |
| 1991/0613 | */ | |
| 1991/0625 |
| |
| 1991/0718 | #define UZERO 0 /* base of user address space */ #define UTZERO (UZERO+BY2PG) /* first address in user text */ #define KZERO 0x80000000 /* base of kernel address space */ #define KTZERO KZERO /* first address in kernel text */ #define USERADDR 0xC0000000 /* struct User */ #define UREGADDR (USERADDR+BY2PG-4*16) #define TSTKTOP USERADDR /* end of new stack in sysexec */ | |
| 1991/0625 | #define TSTKSIZ 10 | |
| 1991/0718 | #define USTKTOP (TSTKTOP-TSTKSIZ*BY2PG) /* byte just beyond user stack */ #define USTKSIZE (4*1024*1024 - TSTKSIZ*BY2PG) /* size of user stack */ #define USTKBTM USTKTOP - USTKSIZE | |
| 1991/0625 | #define MACHSIZE 4096 | |
| 1991/0718/sys/src/9/pc/mem.h:48,54 – 1991/0719/sys/src/9/pc/mem.h:48,54 (short | long) | ||
| 1991/0625 | #define TSTKSIZ 10 | |
| 1991/0718 | #define USTKTOP (TSTKTOP-TSTKSIZ*BY2PG) /* byte just beyond user stack */ #define USTKSIZE (4*1024*1024 - TSTKSIZ*BY2PG) /* size of user stack */ | |
| 1991/0719 | #define USTKBTM (USTKTOP - USTKSIZE) | |
| 1991/0625 | #define MACHSIZE 4096 | |
| 1991/0718/sys/src/9/pc/mem.h:63,71 – 1991/0719/sys/src/9/pc/mem.h:63,69 | ||
| 1991/0703 | #define UDSEG 3 /* user data/stack */ #define UESEG 4 /* user executable */ | |
| 1991/0625 | #define SYSGATE 5 /* system call gate */ | |
| 1991/0706 |
| |
| 1991/0717 |
| |
| 1991/0719 | #define TSSSEG 6 /* task segment */ | |
| 1991/0625 | #define SELGDT (0<<3) /* selector is in gdt */ #define SELLDT (1<<3) /* selector is in ldt */ | |
| 1991/0718/sys/src/9/pc/mem.h:77,84 – 1991/0719/sys/src/9/pc/mem.h:75,80 | ||
| 1991/0613 | #define KDSEL SELECTOR(KDSEG, SELGDT, 0) #define UESEL SELECTOR(UESEG, SELGDT, 3) #define UDSEL SELECTOR(UDSEG, SELGDT, 3) | |
| 1991/0706 |
| |
| 1991/0717 | #define TSSSEL SELECTOR(TSSSEG, SELGDT, 0) | |
| 1991/0613 | ||
| 1991/0627 | /* | |
| 1991/0719/sys/src/9/pc/mem.h:18,24 – 1991/0807/sys/src/9/pc/mem.h:18,24 (short | long) | ||
| 1991/0613 | /* | |
| 1991/0705 | * Time | |
| 1991/0613 | */ | |
| 1991/0709 |
| |
| 1991/0807 | #define HZ (1000) /* clock frequency */ | |
| 1991/0709 | #define MS2HZ (1000/HZ) /* millisec per clock tick */ #define TK2SEC(t) ((t)/HZ) /* ticks to seconds */ #define TK2MS(t) ((((ulong)(t))*1000)/HZ) /* ticks to milliseconds */ | |
| 1991/0719/sys/src/9/pc/mem.h:43,49 – 1991/0807/sys/src/9/pc/mem.h:43,49 | ||
| 1991/0718 | #define KZERO 0x80000000 /* base of kernel address space */ #define KTZERO KZERO /* first address in kernel text */ #define USERADDR 0xC0000000 /* struct User */ | |
| 1991/0807 | #define UREGADDR (USERADDR+BY2PG-4*17) | |
| 1991/0718 | #define TSTKTOP USERADDR /* end of new stack in sysexec */ | |
| 1991/0625 | #define TSTKSIZ 10 | |
| 1991/0718 | #define USTKTOP (TSTKTOP-TSTKSIZ*BY2PG) /* byte just beyond user stack */ | |
| 1991/0807/sys/src/9/pc/mem.h:18,24 – 1991/0808/sys/src/9/pc/mem.h:18,24 (short | long) | ||
| 1991/0613 | /* | |
| 1991/0705 | * Time | |
| 1991/0613 | */ | |
| 1991/0807 |
| |
| 1991/0808 | #define HZ (20) /* clock frequency */ | |
| 1991/0709 | #define MS2HZ (1000/HZ) /* millisec per clock tick */ #define TK2SEC(t) ((t)/HZ) /* ticks to seconds */ #define TK2MS(t) ((((ulong)(t))*1000)/HZ) /* ticks to milliseconds */ | |
| 1991/0808/sys/src/9/pc/mem.h:47,54 – 1991/1004/sys/src/9/pc/mem.h:47,53 (short | long) | ||
| 1991/0718 | #define TSTKTOP USERADDR /* end of new stack in sysexec */ | |
| 1991/0625 | #define TSTKSIZ 10 | |
| 1991/0718 | #define USTKTOP (TSTKTOP-TSTKSIZ*BY2PG) /* byte just beyond user stack */ | |
| 1991/0719 |
| |
| 1991/1004 | #define USTKSIZE (16*1024*1024 - TSTKSIZ*BY2PG) /* size of user stack */ | |
| 1991/0625 | #define MACHSIZE 4096 | |
| 1991/1004/sys/src/9/pc/mem.h:48,53 – 1991/1210/sys/src/9/pc/mem.h:48,54 (short | long) | ||
| 1991/0625 | #define TSTKSIZ 10 | |
| 1991/0718 | #define USTKTOP (TSTKTOP-TSTKSIZ*BY2PG) /* byte just beyond user stack */ | |
| 1991/1004 | #define USTKSIZE (16*1024*1024 - TSTKSIZ*BY2PG) /* size of user stack */ | |
| 1991/1210 | #define ROMBIOS (KZERO|0xF0000) | |
| 1991/0625 | #define MACHSIZE 4096 | |
| 1991/1210/sys/src/9/pc/mem.h:43,49 – 1991/1214/sys/src/9/pc/mem.h:43,49 (short | long) | ||
| 1991/0718 | #define KZERO 0x80000000 /* base of kernel address space */ #define KTZERO KZERO /* first address in kernel text */ #define USERADDR 0xC0000000 /* struct User */ | |
| 1991/0807 |
| |
| 1991/1214 | #define UREGADDR (USERADDR+BY2PG-4*19) | |
| 1991/0718 | #define TSTKTOP USERADDR /* end of new stack in sysexec */ | |
| 1991/0625 | #define TSTKSIZ 10 | |
| 1991/0718 | #define USTKTOP (TSTKTOP-TSTKSIZ*BY2PG) /* byte just beyond user stack */ | |
| 1991/1210/sys/src/9/pc/mem.h:62,69 – 1991/1214/sys/src/9/pc/mem.h:62,68 | ||
| 1991/0703 | #define KESEG 2 /* kernel executable */ #define UDSEG 3 /* user data/stack */ #define UESEG 4 /* user executable */ | |
| 1991/0625 |
| |
| 1991/0719 |
| |
| 1991/1214 | #define TSSSEG 5 /* task segment */ | |
| 1991/0625 | #define SELGDT (0<<3) /* selector is in gdt */ #define SELLDT (1<<3) /* selector is in ldt */ | |
| 1991/1214/sys/src/9/pc/mem.h:12,17 – 1992/0625/sys/src/9/pc/mem.h:12,18 (short | long) | ||
| 1991/0625 | #define WD2PG (BY2PG/BY2WD) /* words per page */ | |
| 1991/0711 | #define PGSHIFT 12 /* log(BY2PG) */ | |
| 1991/0625 | #define PGROUND(s) (((s)+(BY2PG-1))&~(BY2PG-1)) | |
| 1992/0625 | #define MB (1024*1024) | |
| 1991/0625 | #define MAXMACH 1 /* max # cpus system can run */ | |
| 1992/0625/sys/src/9/pc/mem.h:12,18 – 1992/0726/sys/src/9/pc/mem.h:12,17 (short | long) | ||
| 1991/0625 | #define WD2PG (BY2PG/BY2WD) /* words per page */ | |
| 1991/0711 | #define PGSHIFT 12 /* log(BY2PG) */ | |
| 1991/0625 | #define PGROUND(s) (((s)+(BY2PG-1))&~(BY2PG-1)) | |
| 1992/0625 |
| |
| 1991/0625 | #define MAXMACH 1 /* max # cpus system can run */ | |
| 1992/0726/sys/src/9/pc/mem.h:108,114 – 1992/0804/sys/src/9/pc/mem.h:108,114 (short | long) | ||
| 1991/0710 | * physical MMU */ #define PTEVALID (1<<0) | |
| 1992/0804 | #define PTEUNCACHED (1<<4) | |
| 1991/0710 | #define PTEWRITE (1<<1) #define PTERONLY (0<<1) #define PTEKERNEL (0<<2) | |
| 1992/0804/sys/src/9/pc/mem.h:99,107 – 1992/0805/sys/src/9/pc/mem.h:99,107 (short | long) | ||
| 1991/0706 | /* | |
| 1991/0710 | * virtual MMU | |
| 1991/0706 | */ | |
| 1992/0805 | #define PTEMAPMEM (1024*1024) #define SEGMAPSIZE 64 #define PTEPERTAB (PTEMAPMEM/BY2PG) | |
| 1991/0711 | #define PPN(x) ((x)&~(BY2PG-1)) | |
| 1991/0710 | /* | |
| 1992/0805/sys/src/9/pc/mem.h:49,54 – 1992/0930/sys/src/9/pc/mem.h:49,55 (short | long) | ||
|
Add ISAMEMSIZE.
rsc Fri Mar 4 12:44:25 2005 | ||
| 1991/0718 | #define USTKTOP (TSTKTOP-TSTKSIZ*BY2PG) /* byte just beyond user stack */ | |
| 1991/1004 | #define USTKSIZE (16*1024*1024 - TSTKSIZ*BY2PG) /* size of user stack */ | |
| 1991/1210 | #define ROMBIOS (KZERO|0xF0000) | |
| 1992/0930 | #define ISAMEMSIZE (4*MB) /* mem space reserved for ISA */ | |
| 1991/0625 | #define MACHSIZE 4096 | |
| 1992/0930/sys/src/9/pc/mem.h:53,59 – 1992/1013/sys/src/9/pc/mem.h:53,58 (short | long) | ||
|
Remove isphys.
rsc Fri Mar 4 12:44:25 2005 | ||
| 1991/0625 | #define MACHSIZE 4096 | |
| 1991/0711 |
| |
| 1991/0625 | ||
| 1991/0613 | /* | |
| 1991/0706 | * known 80386 segments (in GDT) and their selectors | |
| Too many diffs (26 > 25). Stopping. | ||