summaryrefslogtreecommitdiff
path: root/x86.h
AgeCommit message (Collapse)AuthorFilesLines
2006-09-07more commentsrsc1-0/+4
2006-09-06no /* */ commentsrsc1-5/+8
2006-09-06standardize various * conventionsrsc1-7/+7
2006-09-06spacing fixes: no tabs, 2-space indents (for rtm)rsc1-71/+71
2006-09-03remove duplicationkaashoek1-9/+0
don't use the same name for two different pieces of code
2006-08-29clean up stale error checks and panicsrtm1-209/+3
delete unused functions a few comments
2006-08-10low-level keyboard input (not hooked up to /dev yet)rtm1-0/+1
fix acquire() to cli() *before* incrementing nlock make T_SYSCALL a trap gate, not an interrupt gate sadly, various crashes if you hold down a keyboard key...
2006-07-20uint32_t -> uint &crtm1-93/+84
2006-07-17standarize on unix-like lowercase struct namesrsc1-7/+7
2006-07-17goodbye PushRegsrsc1-5/+2
2006-07-16Eliminate annoying Pseudodesc structure.rsc1-3/+24
Eliminate unnecessary parts of mmu.h.
2006-07-16standardize on not using foo_ prefix in struct foorsc1-22/+22
2006-07-16New scheduler.rsc1-0/+14
Removed cli and sti stack in favor of tracking number of locks held on each CPU and explicit conditionals in spinlock.c.
2006-07-12i think my cmpxchg use was wrong in acquirertm1-14/+0
nesting cli/sti: release shouldn't always enable interrupts separate setup of lapic from starting of other cpus, so cpu() works earlier flag to disable locking in console output make locks work even when curproc==0 (still crashes in clock interrupt)
2006-07-11Changes to allow use of native x86 ELF compilers, which on myrsc1-1/+0
Linux 2.4 box using gcc 3.4.6 don't seem to follow the same conventions as the i386-jos-elf-gcc compilers. Can run make 'TOOLPREFIX=' or edit the Makefile. curproc[cpu()] can now be NULL, indicating that no proc is running. This seemed safer to me than having curproc[0] and curproc[1] both pointing at proc[0] potentially. The old implementation of swtch depended on the stack frame layout used inside swtch being okay to return from on the other stack (exactly the V6 you are not expected to understand this). It also could be called in two contexts: at boot time, to schedule the very first process, and later, on behalf of a process, to sleep or schedule some other process. I split this into two functions: scheduler and swtch. The scheduler is now a separate never-returning function, invoked by each cpu once set up. The scheduler looks like: scheduler() { setjmp(cpu.context); pick proc to schedule blah blah blah longjmp(proc.context) } The new swtch is intended to be called only when curproc[cpu()] is not NULL, that is, only on behalf of a user proc. It does: swtch() { if(setjmp(proc.context) == 0) longjmp(cpu.context) } to save the current proc context and then jump over to the scheduler, running on the cpu stack. Similarly the system call stubs are now in assembly in usys.S to avoid needing to know the details of stack frame layout used by the compiler. Also various changes in the debugging prints.
2006-07-06disable all interrupts when acquiring lockkaashoek1-0/+1
user program that makes a blocking system call
2006-07-05timer interruptskaashoek1-5/+0
disk interrupts (assuming bochs has a bug)
2006-07-01swtch saves callee-saved registersrtm1-0/+38
swtch idles on per-CPU stack, not on calling process's stack fix pipe bugs usertest.c tests pipes, fork, exit, close
2006-06-22checkpoint. booting second processor. stack is messed up, but thanks to cliffkaashoek1-0/+24
and plan 9 code, at least boots and gets into C code.
2006-06-12importrtm1-0/+301