uint 3 buf.h uint dev; uint 4 buf.h uint blockno; uint 32 console.c uint x; uint 57 console.c uint *argp; uint 67 console.c argp = (uint*)(void*)(&fmt + 1); uint 109 console.c uint pcs[10]; uint 180 console.c uint r; // Read index uint 181 console.c uint w; // Write index uint 182 console.c uint e; // Edit index uint 230 console.c uint target; uint 2 date.h uint second; uint 3 date.h uint minute; uint 4 date.h uint hour; uint 5 date.h uint day; uint 6 date.h uint month; uint 7 date.h uint year; uint 77 defs.h extern volatile uint* lapic; uint 156 defs.h extern uint ticks; uint 7 elf.h uint magic; // must equal ELF_MAGIC uint 11 elf.h uint version; uint 12 elf.h uint entry; uint 13 elf.h uint phoff; uint 14 elf.h uint shoff; uint 15 elf.h uint flags; uint 26 elf.h uint type; uint 27 elf.h uint off; uint 28 elf.h uint vaddr; uint 29 elf.h uint paddr; uint 30 elf.h uint filesz; uint 31 elf.h uint memsz; uint 32 elf.h uint flags; uint 33 elf.h uint align; uint 15 exec.c uint argc, sz, sp, ustack[3+MAXARG+1]; uint 8 file.h uint off; uint 14 file.h uint dev; // Device number uint 15 file.h uint inum; // Inode number uint 23 file.h uint size; uint 24 file.h uint addrs[NDIRECT+1]; uint 53 fs.c static uint uint 356 fs.c static uint uint 359 fs.c uint addr, *a; uint 374 fs.c a = (uint*)bp->data; uint 396 fs.c uint *a; uint 407 fs.c a = (uint*)bp->data; uint 437 fs.c uint tot, m; uint 465 fs.c uint tot, m; uint 508 fs.c uint off, inum; uint 14 fs.h uint size; // Size of file system image (blocks) uint 15 fs.h uint nblocks; // Number of data blocks uint 16 fs.h uint ninodes; // Number of inodes. uint 17 fs.h uint nlog; // Number of log blocks uint 18 fs.h uint logstart; // Block number of first log block uint 19 fs.h uint inodestart; // Block number of first inode block uint 20 fs.h uint bmapstart; // Block number of first free map block uint 24 fs.h #define NINDIRECT (BSIZE / sizeof(uint)) uint 33 fs.h uint size; // Size of file (bytes) uint 34 fs.h uint addrs[NDIRECT+1]; // Data block addresses uint 29 ioapic.c uint reg; uint 30 ioapic.c uint pad[3]; uint 31 ioapic.c uint data; uint 34 ioapic.c static uint uint 49 kalloc.c p = (char*)PGROUNDUP((uint)vstart); uint 64 kalloc.c if((uint)v % PGSIZE || v < end || v2p(v) >= PHYSTOP) uint 9 kbd.c static uint shift; uint 13 kbd.c uint st, data, c; uint 43 lapic.c volatile uint *lapic; // Initialized in mp.c uint 185 lapic.c static uint cmos_read(uint reg) uint 79 main.c memmove(code, _binary_entryother_start, (uint)_binary_entryother_size); uint 24 memide.c disksize = (uint)_binary_fs_img_size/BSIZE; uint 13 memlayout.h static inline uint v2p(void *a) { return ((uint) (a)) - KERNBASE; } uint 18 memlayout.h #define V2P(a) (((uint) (a)) - KERNBASE) uint 32 mkfs.c uint freeinode = 1; uint 33 mkfs.c uint freeblock; uint 41 mkfs.c uint ialloc(ushort type); uint 55 mkfs.c uint uint 58 mkfs.c uint y; uint 71 mkfs.c uint rootino, inum, off; uint 187 mkfs.c uint bn; uint 201 mkfs.c uint bn; uint 223 mkfs.c uint uint 226 mkfs.c uint inum = freeinode++; uint 259 mkfs.c uint fbn, off, n1; uint 262 mkfs.c uint indirect[NINDIRECT]; uint 263 mkfs.c uint x; uint 53 mmu.h uint lim_15_0 : 16; // Low bits of segment limit uint 54 mmu.h uint base_15_0 : 16; // Low bits of segment base address uint 55 mmu.h uint base_23_16 : 8; // Middle bits of segment base address uint 56 mmu.h uint type : 4; // Segment type (see STS_ constants) uint 57 mmu.h uint s : 1; // 0 = system, 1 = application uint 58 mmu.h uint dpl : 2; // Descriptor Privilege Level uint 59 mmu.h uint p : 1; // Present uint 60 mmu.h uint lim_19_16 : 4; // High bits of segment limit uint 61 mmu.h uint avl : 1; // Unused (available for software use) uint 62 mmu.h uint rsv1 : 1; // Reserved uint 63 mmu.h uint db : 1; // 0 = 16-bit segment, 1 = 32-bit segment uint 64 mmu.h uint g : 1; // Granularity: limit scaled by 4K when set uint 65 mmu.h uint base_31_24 : 8; // High bits of segment base address uint 70 mmu.h { ((lim) >> 12) & 0xffff, (uint)(base) & 0xffff, \ uint 71 mmu.h ((uint)(base) >> 16) & 0xff, type, 1, dpl, 1, \ uint 72 mmu.h (uint)(lim) >> 28, 0, 0, 1, 1, (uint)(base) >> 24 } uint 74 mmu.h { (lim) & 0xffff, (uint)(base) & 0xffff, \ uint 75 mmu.h ((uint)(base) >> 16) & 0xff, type, 1, dpl, 1, \ uint 76 mmu.h (uint)(lim) >> 16, 0, 0, 1, 0, (uint)(base) >> 24 } uint 112 mmu.h #define PDX(va) (((uint)(va) >> PDXSHIFT) & 0x3FF) uint 115 mmu.h #define PTX(va) (((uint)(va) >> PTXSHIFT) & 0x3FF) uint 118 mmu.h #define PGADDR(d, t, o) ((uint)((d) << PDXSHIFT | (t) << PTXSHIFT | (o))) uint 144 mmu.h #define PTE_ADDR(pte) ((uint)(pte) & ~0xFFF) uint 145 mmu.h #define PTE_FLAGS(pte) ((uint)(pte) & 0xFFF) uint 148 mmu.h typedef uint pte_t; uint 152 mmu.h uint link; // Old ts selector uint 153 mmu.h uint esp0; // Stack pointers and segment selectors uint 156 mmu.h uint *esp1; uint 159 mmu.h uint *esp2; uint 163 mmu.h uint *eip; // Saved state from last task switch uint 164 mmu.h uint eflags; uint 165 mmu.h uint eax; // More saved state (registers) uint 166 mmu.h uint ecx; uint 167 mmu.h uint edx; uint 168 mmu.h uint ebx; uint 169 mmu.h uint *esp; uint 170 mmu.h uint *ebp; uint 171 mmu.h uint esi; uint 172 mmu.h uint edi; uint 194 mmu.h uint off_15_0 : 16; // low 16 bits of offset in segment uint 195 mmu.h uint cs : 16; // code segment selector uint 196 mmu.h uint args : 5; // # args, 0 for interrupt/trap gates uint 197 mmu.h uint rsv1 : 3; // reserved(should be zero I guess) uint 198 mmu.h uint type : 4; // type(STS_{TG,IG32,TG32}) uint 199 mmu.h uint s : 1; // must be 0 (system) uint 200 mmu.h uint dpl : 2; // descriptor(meaning new) privilege level uint 201 mmu.h uint p : 1; // Present uint 202 mmu.h uint off_31_16 : 16; // high bits of offset in segment uint 215 mmu.h (gate).off_15_0 = (uint)(off) & 0xffff; \ uint 223 mmu.h (gate).off_31_16 = (uint)(off) >> 16; \ uint 60 mp.c uint p; uint 88 mp.c conf = (struct mpconf*) p2v((uint) mp->physaddr); uint 112 mp.c lapic = (uint*)conf->lapicaddr; uint 20 mp.h uint *oemtable; // OEM table pointer uint 23 mp.h uint *lapicaddr; // address of local APIC uint 36 mp.h uint feature; // feature flags from CPUID instruction uint 45 mp.h uint *addr; // I/O APIC address uint 15 pipe.c uint nread; // number of bytes read uint 16 pipe.c uint nwrite; // number of bytes written uint 17 printf.c uint x; uint 44 printf.c uint *ap; uint 47 printf.c ap = (uint*)(void*)&fmt + 1; uint 66 proc.c *(uint*)sp = (uint)trapret; uint 71 proc.c p->context->eip = (uint)forkret; uint 110 proc.c uint sz; uint 449 proc.c uint pc[10]; uint 460 proc.c getcallerpcs((uint*)p->context->ebp+2, pc); uint 10 proc.h volatile uint started; // Has the CPU started? uint 45 proc.h uint edi; uint 46 proc.h uint esi; uint 47 proc.h uint ebx; uint 48 proc.h uint ebp; uint 49 proc.h uint eip; uint 56 proc.h uint sz; // Size of process memory (bytes) uint 70 spinlock.c uint *ebp; uint 73 spinlock.c ebp = (uint*)v - 2; uint 75 spinlock.c if(ebp == 0 || ebp < (uint*)KERNBASE || ebp == (uint*)0xffffffff) uint 78 spinlock.c ebp = (uint*)ebp[0]; // saved %ebp uint 3 spinlock.h uint locked; // Is the lock held? uint 8 spinlock.h uint pcs[10]; // The call stack (an array of program counters) uint 8 stat.h uint ino; // Inode number uint 10 stat.h uint size; // Size of file in bytes uint 61 syscall.c if((uint)i >= proc->sz || (uint)i+size > proc->sz) uint 187 sysfile.c uint off; uint 241 sysfile.c uint off; uint 399 sysfile.c uint uargv, uarg; uint 63 sysproc.c uint ticks0; uint 85 sysproc.c uint xticks; uint 13 trap.c extern uint vectors[]; // in vectors.S: array of 256 entry pointers uint 15 trap.c uint ticks; uint 4 types.h typedef uint pde_t; uint 26 ulib.c uint uint 14 umalloc.c uint size; uint 67 umalloc.c uint nunits; uint 35 user.h uint strlen(char*); uint 1419 usertests.c uint amt; uint 1454 usertests.c amt = (BIG) - (uint)a; uint 1521 usertests.c sbrk(BIG - (uint)sbrk(0)); uint 1566 usertests.c uint p; uint 1571 usertests.c for(p = 0; p <= (uint)hi; p += 4096){ uint 76 vm.c a = (char*)PGROUNDDOWN((uint)va); uint 77 vm.c last = (char*)PGROUNDDOWN(((uint)va) + size - 1); uint 117 vm.c uint phys_start; uint 118 vm.c uint phys_end; uint 141 vm.c (uint)k->phys_start, k->perm) < 0) uint 171 vm.c cpu->ts.esp0 = (uint)proc->kstack + KSTACKSIZE; uint 199 vm.c uint i, pa, n; uint 202 vm.c if((uint) addr % PGSIZE != 0) uint 224 vm.c uint a; uint 253 vm.c uint a, pa; uint 280 vm.c uint i; uint 314 vm.c uint pa, i, flags; uint 361 vm.c uint n, va0; uint 365 vm.c va0 = (uint)PGROUNDDOWN(va); uint 68 x86.h pd[1] = (uint)p; uint 69 x86.h pd[2] = (uint)p >> 16; uint 82 x86.h pd[1] = (uint)p; uint 83 x86.h pd[2] = (uint)p >> 16; uint 94 x86.h static inline uint uint 97 x86.h uint eflags; uint 120 x86.h static inline uint uint 123 x86.h uint result; uint 133 x86.h static inline uint uint 136 x86.h uint val; uint 152 x86.h uint edi; uint 153 x86.h uint esi; uint 154 x86.h uint ebp; uint 155 x86.h uint oesp; // useless & ignored uint 156 x86.h uint ebx; uint 157 x86.h uint edx; uint 158 x86.h uint ecx; uint 159 x86.h uint eax; uint 170 x86.h uint trapno; uint 173 x86.h uint err; uint 174 x86.h uint eip; uint 177 x86.h uint eflags; uint 180 x86.h uint esp;