uint 62 bio.c bget(uint dev, uint blockno) uint 97 bio.c bread(uint dev, uint blockno) uint 15 bootmain.c void readseg(uchar*, uint, uint); uint 60 bootmain.c readsect(void *dst, uint offset) uint 79 bootmain.c readseg(uchar* pa, uint count, uint offset) uint 3 buf.h uint dev; uint 4 buf.h uint blockno; uint 6 buf.h uint refcnt; uint 33 console.c uint x; uint 58 console.c uint *argp; uint 68 console.c argp = (uint*)(void*)(&fmt + 1); uint 110 console.c uint pcs[10]; uint 184 console.c uint r; // Read index uint 185 console.c uint w; // Write index uint 186 console.c uint e; // Edit index uint 238 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 15 defs.h struct buf* bread(uint, uint); uint 39 defs.h int dirlink(struct inode*, char*, uint); uint 40 defs.h struct inode* dirlookup(struct inode*, char*, uint*); uint 41 defs.h struct inode* ialloc(uint, short); uint 52 defs.h int readi(struct inode*, char*, uint, uint); uint 54 defs.h int writei(struct inode*, char*, uint, uint); uint 78 defs.h extern volatile uint* lapic; uint 81 defs.h void lapicstartap(uchar, uint); uint 129 defs.h void getcallerpcs(void*, uint*); uint 143 defs.h int memcmp(const void*, const void*, uint); uint 144 defs.h void* memmove(void*, const void*, uint); uint 145 defs.h void* memset(void*, int, uint); uint 148 defs.h int strncmp(const char*, const char*, uint); uint 155 defs.h int fetchint(uint, int*); uint 156 defs.h int fetchstr(uint, char**); uint 164 defs.h extern uint ticks; uint 178 defs.h int allocuvm(pde_t*, uint, uint); uint 179 defs.h int deallocuvm(pde_t*, uint, uint); uint 181 defs.h void inituvm(pde_t*, char*, uint); uint 182 defs.h int loaduvm(pde_t*, char*, struct inode*, uint, uint); uint 183 defs.h pde_t* copyuvm(pde_t*, uint); uint 186 defs.h int copyout(pde_t*, uint, void*, uint); 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 24 file.h uint size; uint 25 file.h uint addrs[NDIRECT+1]; uint 56 fs.c static uint uint 57 fs.c balloc(uint dev) uint 82 fs.c bfree(int dev, uint b) uint 188 fs.c static struct inode* iget(uint dev, uint inum); uint 195 fs.c ialloc(uint dev, short type) uint 242 fs.c iget(uint dev, uint inum) uint 372 fs.c static uint uint 373 fs.c bmap(struct inode *ip, uint bn) uint 375 fs.c uint addr, *a; uint 390 fs.c a = (uint*)bp->data; uint 412 fs.c uint *a; uint 423 fs.c a = (uint*)bp->data; uint 453 fs.c readi(struct inode *ip, char *dst, uint off, uint n) uint 455 fs.c uint tot, m; uint 482 fs.c writei(struct inode *ip, char *src, uint off, uint n) uint 484 fs.c uint tot, m; uint 525 fs.c dirlookup(struct inode *dp, char *name, uint *poff) uint 527 fs.c uint off, inum; uint 552 fs.c dirlink(struct inode *dp, char *name, uint inum) uint 15 fs.h uint size; // Size of file system image (blocks) uint 16 fs.h uint nblocks; // Number of data blocks uint 17 fs.h uint ninodes; // Number of inodes. uint 18 fs.h uint nlog; // Number of log blocks uint 19 fs.h uint logstart; // Block number of first log block uint 20 fs.h uint inodestart; // Block number of first inode block uint 21 fs.h uint bmapstart; // Block number of first free map block uint 25 fs.h #define NINDIRECT (BSIZE / sizeof(uint)) uint 34 fs.h uint size; // Size of file (bytes) uint 35 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 42 ioapic.c ioapicwrite(int reg, uint data) uint 50 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 44 lapic.c volatile uint *lapic; // Initialized in mp.c uint 129 lapic.c lapicstartap(uchar apicid, uint addr) uint 174 lapic.c static uint uint 175 lapic.c cmos_read(uint reg) uint 75 main.c memmove(code, _binary_entryother_start, (uint)_binary_entryother_size); uint 25 memide.c disksize = (uint)_binary_fs_img_size/BSIZE; uint 11 memlayout.h #define V2P(a) (((uint) (a)) - KERNBASE) uint 32 mkfs.c uint freeinode = 1; uint 33 mkfs.c uint freeblock; uint 37 mkfs.c void wsect(uint, void*); uint 38 mkfs.c void winode(uint, struct dinode*); uint 39 mkfs.c void rinode(uint inum, struct dinode *ip); uint 40 mkfs.c void rsect(uint sec, void *buf); uint 41 mkfs.c uint ialloc(ushort type); uint 42 mkfs.c void iappend(uint inum, void *p, int n); uint 55 mkfs.c uint uint 56 mkfs.c xint(uint x) uint 58 mkfs.c uint y; uint 71 mkfs.c uint rootino, inum, off; uint 171 mkfs.c wsect(uint sec, void *buf) uint 184 mkfs.c winode(uint inum, struct dinode *ip) uint 187 mkfs.c uint bn; uint 198 mkfs.c rinode(uint inum, struct dinode *ip) uint 201 mkfs.c uint bn; uint 211 mkfs.c rsect(uint sec, void *buf) uint 223 mkfs.c uint uint 226 mkfs.c uint inum = freeinode++; uint 256 mkfs.c iappend(uint inum, void *xp, int n) uint 259 mkfs.c uint fbn, off, n1; uint 262 mkfs.c uint indirect[NINDIRECT]; uint 263 mkfs.c uint x; uint 27 mmu.h uint lim_15_0 : 16; // Low bits of segment limit uint 28 mmu.h uint base_15_0 : 16; // Low bits of segment base address uint 29 mmu.h uint base_23_16 : 8; // Middle bits of segment base address uint 30 mmu.h uint type : 4; // Segment type (see STS_ constants) uint 31 mmu.h uint s : 1; // 0 = system, 1 = application uint 32 mmu.h uint dpl : 2; // Descriptor Privilege Level uint 33 mmu.h uint p : 1; // Present uint 34 mmu.h uint lim_19_16 : 4; // High bits of segment limit uint 35 mmu.h uint avl : 1; // Unused (available for software use) uint 36 mmu.h uint rsv1 : 1; // Reserved uint 37 mmu.h uint db : 1; // 0 = 16-bit segment, 1 = 32-bit segment uint 38 mmu.h uint g : 1; // Granularity: limit scaled by 4K when set uint 39 mmu.h uint base_31_24 : 8; // High bits of segment base address uint 44 mmu.h { ((lim) >> 12) & 0xffff, (uint)(base) & 0xffff, \ uint 45 mmu.h ((uint)(base) >> 16) & 0xff, type, 1, dpl, 1, \ uint 46 mmu.h (uint)(lim) >> 28, 0, 0, 1, 1, (uint)(base) >> 24 } uint 48 mmu.h { (lim) & 0xffff, (uint)(base) & 0xffff, \ uint 49 mmu.h ((uint)(base) >> 16) & 0xff, type, 1, dpl, 1, \ uint 50 mmu.h (uint)(lim) >> 16, 0, 0, 1, 0, (uint)(base) >> 24 } uint 74 mmu.h #define PDX(va) (((uint)(va) >> PDXSHIFT) & 0x3FF) uint 77 mmu.h #define PTX(va) (((uint)(va) >> PTXSHIFT) & 0x3FF) uint 80 mmu.h #define PGADDR(d, t, o) ((uint)((d) << PDXSHIFT | (t) << PTXSHIFT | (o))) uint 100 mmu.h #define PTE_ADDR(pte) ((uint)(pte) & ~0xFFF) uint 101 mmu.h #define PTE_FLAGS(pte) ((uint)(pte) & 0xFFF) uint 104 mmu.h typedef uint pte_t; uint 108 mmu.h uint link; // Old ts selector uint 109 mmu.h uint esp0; // Stack pointers and segment selectors uint 112 mmu.h uint *esp1; uint 115 mmu.h uint *esp2; uint 119 mmu.h uint *eip; // Saved state from last task switch uint 120 mmu.h uint eflags; uint 121 mmu.h uint eax; // More saved state (registers) uint 122 mmu.h uint ecx; uint 123 mmu.h uint edx; uint 124 mmu.h uint ebx; uint 125 mmu.h uint *esp; uint 126 mmu.h uint *ebp; uint 127 mmu.h uint esi; uint 128 mmu.h uint edi; uint 149 mmu.h uint off_15_0 : 16; // low 16 bits of offset in segment uint 150 mmu.h uint cs : 16; // code segment selector uint 151 mmu.h uint args : 5; // # args, 0 for interrupt/trap gates uint 152 mmu.h uint rsv1 : 3; // reserved(should be zero I guess) uint 153 mmu.h uint type : 4; // type(STS_{IG32,TG32}) uint 154 mmu.h uint s : 1; // must be 0 (system) uint 155 mmu.h uint dpl : 2; // descriptor(meaning new) privilege level uint 156 mmu.h uint p : 1; // Present uint 157 mmu.h uint off_31_16 : 16; // high bits of offset in segment uint 170 mmu.h (gate).off_15_0 = (uint)(off) & 0xffff; \ uint 178 mmu.h (gate).off_31_16 = (uint)(off) >> 16; \ uint 31 mp.c mpsearch1(uint a, int len) uint 52 mp.c uint p; uint 80 mp.c conf = (struct mpconf*) P2V((uint) mp->physaddr); uint 104 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 16 pipe.c uint nread; // number of bytes read uint 17 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 108 proc.c *(uint*)sp = (uint)trapret; uint 113 proc.c p->context->eip = (uint)forkret; uint 161 proc.c uint sz; uint 517 proc.c uint pc[10]; uint 528 proc.c getcallerpcs((uint*)p->context->ebp+2, pc); uint 7 proc.h volatile uint started; // Has the CPU started? uint 28 proc.h uint edi; uint 29 proc.h uint esi; uint 30 proc.h uint ebx; uint 31 proc.h uint ebp; uint 32 proc.h uint eip; uint 39 proc.h uint sz; // Size of process memory (bytes) uint 3 sleeplock.h uint locked; // Is the lock held? uint 72 spinlock.c getcallerpcs(void *v, uint pcs[]) uint 74 spinlock.c uint *ebp; uint 77 spinlock.c ebp = (uint*)v - 2; uint 79 spinlock.c if(ebp == 0 || ebp < (uint*)KERNBASE || ebp == (uint*)0xffffffff) uint 82 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 5 string.c memset(void *dst, int c, uint n) uint 16 string.c memcmp(const void *v1, const void *v2, uint n) uint 32 string.c memmove(void *dst, const void *src, uint n) uint 53 string.c memcpy(void *dst, const void *src, uint n) uint 59 string.c strncmp(const char *p, const char *q, uint n) uint 18 syscall.c fetchint(uint addr, int *ip) uint 32 syscall.c fetchstr(uint addr, char **pp) uint 66 syscall.c if(size < 0 || (uint)i >= curproc->sz || (uint)i+size > curproc->sz) uint 190 sysfile.c uint off; uint 401 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 37 ulib.c memset(void *dst, int c, uint n) uint 14 umalloc.c uint size; uint 47 umalloc.c morecore(uint nu) uint 64 umalloc.c malloc(uint nbytes) uint 67 umalloc.c uint nunits; uint 35 user.h uint strlen(const char*); uint 36 user.h void* memset(void*, int, uint); uint 37 user.h void* malloc(uint); 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 61 vm.c mappages(pde_t *pgdir, void *va, uint size, uint pa, int perm) uint 66 vm.c a = (char*)PGROUNDDOWN((uint)va); uint 67 vm.c last = (char*)PGROUNDDOWN(((uint)va) + size - 1); uint 107 vm.c uint phys_start; uint 108 vm.c uint phys_end; uint 131 vm.c (uint)k->phys_start, k->perm) < 0) { uint 171 vm.c mycpu()->ts.esp0 = (uint)p->kstack + KSTACKSIZE; uint 183 vm.c inituvm(pde_t *pgdir, char *init, uint sz) uint 198 vm.c loaduvm(pde_t *pgdir, char *addr, struct inode *ip, uint offset, uint sz) uint 200 vm.c uint i, pa, n; uint 203 vm.c if((uint) addr % PGSIZE != 0) uint 222 vm.c allocuvm(pde_t *pgdir, uint oldsz, uint newsz) uint 225 vm.c uint a; uint 256 vm.c deallocuvm(pde_t *pgdir, uint oldsz, uint newsz) uint 259 vm.c uint a, pa; uint 286 vm.c uint i; uint 316 vm.c copyuvm(pde_t *pgdir, uint sz) uint 320 vm.c uint pa, i, flags; uint 366 vm.c copyout(pde_t *pgdir, uint va, void *p, uint len) uint 369 vm.c uint n, va0; uint 373 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 121 x86.h xchg(volatile uint *addr, uint newval) uint 123 x86.h uint result; uint 133 x86.h static inline uint uint 136 x86.h uint val; uint 142 x86.h lcr3(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;