summaryrefslogtreecommitdiffstats
path: root/sys/i386/include/pcb.h
Commit message (Collapse)AuthorAgeFilesLines
* Major update to the way synchronization is done in the kernel. Highlightsjasone2000-09-071-5/+1
| | | | | | | | | | | | | | | include: * Mutual exclusion is used instead of spl*(). See mutex(9). (Note: The alpha port is still in transition and currently uses both.) * Per-CPU idle processes. * Interrupts are run in their own separate kernel threads and can be preempted (i386 only). Partially contributed by: BSDi (BSD/OS) Submissions by (at least): cp, dfr, dillon, grog, jake, jhb, sheldonh
* Change #ifdef KERNEL to #ifdef _KERNEL in the public headers. "KERNEL"peter1999-12-291-1/+1
| | | | | | is an application space macro and the applications are supposed to be free to use it as they please (but cannot). This is consistant with the other BSD's who made this change quite some time ago. More commits to come.
* User ldt sharing.luoqi1999-12-061-3/+6
|
* $Id$ -> $FreeBSD$peter1999-08-281-1/+1
|
* Implement support for hardware debug registers on the i386.jlemon1999-07-091-1/+10
| | | | Submitted by: Brian Dean <brdean@unx.sas.com>
* Unifdef VM86.jlemon1999-06-011-5/+1
| | | | Reviewed by: silence on on -current
* Enable vmspace sharing on SMP. Major changes are,luoqi1999-04-281-3/+5
| | | | | | | | | | | | | | | | | - %fs register is added to trapframe and saved/restored upon kernel entry/exit. - Per-cpu pages are no longer mapped at the same virtual address. - Each cpu now has a separate gdt selector table. A new segment selector is added to point to per-cpu pages, per-cpu global variables are now accessed through this new selector (%fs). The selectors in gdt table are rearranged for cache line optimization. - fask_vfork is now on as default for both UP and SMP. - Some aio code cleanup. Reviewed by: Alan Cox <alc@cs.rice.edu> John Dyson <dyson@iquest.net> Julian Elischer <julian@whistel.com> Bruce Evans <bde@zeta.org.au> David Greenman <dg@root.com>
* Ifdefed some SMP and VM86 code. Note that although VM86 is not a globalbde1998-02-031-1/+9
| | | | | option, the ifdef on it in a header works because only the name of the VM86 extension is hidden.
* Don't #include unneeded includes here. pcb_ext.h picks up lots of otherpeter1997-10-101-4/+2
| | | | stuff with it.
* VM86 kernel support.dyson1997-08-091-6/+4
| | | | | | | Work done by BSDI, Jonathan Lemon <jlemon@americantv.com>, Mike Smith <msmith@gsoft.com.au>, Sean Eric Fagan <sef@kithrup.com>, and probably alot of others. Submitted by: Jnathan Lemon <jlemon@americantv.com>
* Preliminary support for per-cpu data pages.peter1997-06-221-9/+1
| | | | | | | | | | | | | | | | This eliminates a lot of #ifdef SMP type code. Things like _curproc reside in a data page that is unique on each cpu, eliminating the expensive macros like: #define curproc (SMPcurproc[cpunumber()]) There are some unresolved bootstrap and address space sharing issues at present, but Steve is waiting on this for other work. There is still some strictly temporary code present that isn't exactly pretty. This is part of a larger change that has run into some bumps, this part is standalone so it should be safe. The temporary code goes away when the full idle cpu support is finished. Reviewed by: fsmp, dyson
* Preserve %fs and %gs across context switches. This has a relatively lowbde1997-06-071-2/+4
| | | | | | | cost since it is only done in cpu_switch(), not for every exception. The extra state is kept in the pcb, and handled much like the npx state, with similar deficiencies (the state is not preserved across signal handlers, and error handling loses state).
* remove #include opt_smp.hpeter1997-05-071-3/+5
| | | | declare SMPcurpcb[] next to #define and uniprocessor counterpart
* Man the liferafts! Here comes the long awaited SMP -> -current merge!peter1997-04-261-1/+11
| | | | | | | | | | | | | | | | There are various options documented in i386/conf/LINT, there is more to come over the next few days. The kernel should run pretty much "as before" without the options to activate SMP mode. There are a handful of known "loose ends" that need to be fixed, but have been put off since the SMP kernel is in a moderately good condition at the moment. This commit is the result of the tinkering and testing over the last 14 months by many people. A special thanks to Steve Passe for implementing the APIC code!
* No longer use an i386tss as the basis of our pcb - it wasn't particularlypeter1997-04-071-15/+12
| | | | | | | | | | | | | | | | convenient and makes life difficult for my next commit. We still need an i386tss to point to for the tss slot in the gdt, so we use a common tss shared between all processes. Note that this is going to break debugging until this series of commits is finished. core dumps will change again too. :-( we really need a more modern core dump format that doesn't depend on the pcb/upages. This change makes VM86 mode harder, but the following commits will remove a lot of constraints for the VM86 system, including the possibility of extending the pcb for an IO port map etc. Obtained from: bde
* Back out part 1 of the MCFH that changed $Id$ to $FreeBSD$. We are notpeter1997-02-221-1/+1
| | | | ready for it yet.
* Make the long-awaited change from $Id$ to $FreeBSD$jkh1997-01-141-1/+1
| | | | | | | | This will make a number of things easier in the future, as well as (finally!) avoiding the Id-smashing problem which has plagued developers for so long. Boy, I'm glad we're not using sup anymore. This update would have been insane otherwise.
* Eliminated pcb_inl. It was always 0 because context switches don't occurbde1996-07-311-2/+1
| | | | in interrupt handlers.
* Don't return unused values in cpu_switch() or savectx().bde1996-05-011-2/+2
| | | | Don't preserve unused registers in the NPX case in savectx().
* Fix cpu_fork for real.phk1996-04-251-2/+2
| | | | Suggested by: bde
* savectx returns through cpu_switch in case of the child, so it mustphk1996-04-191-2/+2
| | | | return void just like cpu_switch. Fix prototype and usage from machdep.c
* Fix a bogon. cpu_fork & savectx ecpected cpu_switch to restore %eax,phk1996-04-181-2/+2
| | | | they shouldn't.
* Mega-commit for Linux emulator update.. This has been stress tested underpeter1996-03-021-2/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | netscape-2.0 for Linux running all the Java stuff. The scrollbars are now working, at least on my machine. (whew! :-) I'm uncomfortable with the size of this commit, but it's too inter-dependant to easily seperate out. The main changes: COMPAT_LINUX is *GONE*. Most of the code has been moved out of the i386 machine dependent section into the linux emulator itself. The int 0x80 syscall code was almost identical to the lcall 7,0 code and a minor tweak allows them to both be used with the same C code. All kernels can now just modload the lkm and it'll DTRT without having to rebuild the kernel first. Like IBCS2, you can statically compile it in with "options LINUX". A pile of new syscalls implemented, including getdents(), llseek(), readv(), writev(), msync(), personality(). The Linux-ELF libraries want to use some of these. linux_select() now obeys Linux semantics, ie: returns the time remaining of the timeout value rather than leaving it the original value. Quite a few bugs removed, including incorrect arguments being used in syscalls.. eg: mixups between passing the sigset as an int, vs passing it as a pointer and doing a copyin(), missing return values, unhandled cases, SIOC* ioctls, etc. The build for the code has changed. i386/conf/files now knows how to build linux_genassym and generate linux_assym.h on the fly. Supporting changes elsewhere in the kernel: The user-mode signal trampoline has moved from the U area to immediately below the top of the stack (below PS_STRINGS). This allows the different binary emulations to have their own signal trampoline code (which gets rid of the hardwired syscall 103 (sigreturn on BSD, syslog on Linux)) and so that the emulator can provide the exact "struct sigcontext *" argument to the program's signal handlers. The sigstack's "ss_flags" now uses SS_DISABLE and SS_ONSTACK flags, which have the same values as the re-used SA_DISABLE and SA_ONSTACK which are intended for sigaction only. This enables the support of a SA_RESETHAND flag to sigaction to implement the gross SYSV and Linux SA_ONESHOT signal semantics where the signal handler is reset when it's triggered. makesyscalls.sh no longer appends the struct sysentvec on the end of the generated init_sysent.c code. It's a lot saner to have it in a seperate file rather than trying to update the structure inside the awk script. :-) At exec time, the dozen bytes or so of signal trampoline code are copied to the top of the user's stack, rather than obtaining the trampoline code the old way by getting a clone of the parent's user area. This allows Linux and native binaries to freely exec each other without getting trampolines mixed up.
* Simplified savectx() a little and fixed a bug that caused it to returndg1996-01-231-2/+2
| | | | | | garbage in the child process rather than "1" like it is supposed to. Reviewed by: bde
* Killed some unused stuff inherited from Bill Jolitz. Note that sincedg1995-08-171-11/+3
| | | | | | | this changes the size of the pcb struct, gdb will need to be rebuilt or debugging won't work correctly. Reviewed by: Bruce Evans
* i386/exception.s,bde1994-12-031-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Keep track of interrupt nesting level. It is normally 0 for syscalls and traps, but is fudged to 1 for their exit processing in case they metamorphose into an interrupt handler. i386/genassym.c; Remove support for the obsolete pcb_iml and pcb_cmap2. Add support for pcb_inl. i386/swtch.s: Fudge the interrupt nesting level across context switches and in the idle loop so that the work for preemptive context switches gets counted as interrupt time, the work for voluntary context switches gets counted mostly as system time (the part when curproc == 0 gets counted as interrupt time), and only truly idle time gets counted as idle time. Remove obsolete support (commented out and otherwise) for pcb_iml. Load curpcb just before curproc instead of just after so that curpcb is always valid if curproc is. A few more changes like this may fix tracing through context switches. Remove obsolete function swtch_to_inactive(). include/cpu.h: Use the new interrupt nesting level variable to implement a non-fake CLF_INTR() so that accounting for the interrupt state works. You can use top, iostat or (best) an up to date systat to see interrupt overheads. I see the expected huge interrupt overheads for ISA devices (on a 486DX/33, about 55% for an IDE drive transferring 1250K/sec and the same for a WD8013EBT network card transferring 1100K/sec). The huge interrupt overheads for serial devices are unfortunately normally invisible. include/pcb.h: Remove the obsolete pcb_iml and pcb_cmap2. Replace them by padding to preserve binary compatibility. Use part of the new padding for pcb_inl. isa/icu.s: isa/vector.s: Keep track of interrupt nesting level.
* Added prototypes.phk1994-10-081-1/+2
|
* Change all #includes to follow the current Berkeley style. Some of thesewollman1994-08-131-3/+3
| | | | | | | | | | | | | | | | | | | | | ``changes'' are actually not changes at all, but CVS sometimes has trouble telling the difference. This also includes support for second-directory compiles. This is not quite complete yet, as `config' doesn't yet do the right thing. You can still make it work trivially, however, by doing the following: rm /sys/compile mkdir /usr/obj/sys/compile ln -s M-. /sys/compile cd /sys/i386/conf config MYKERNEL cd ../../compile/MYKERNEL ln -s /sys @ rm machine ln -s @/i386/include machine make depend make
* The big 4.4BSD Lite to FreeBSD 2.0.0 (Development) patch.rgrimes1994-05-251-0/+7
| | | | | Reviewed by: Rodney W. Grimes Submitted by: John Dyson and David Greenman
* Convert syscall to trapframe. Based on work done by John Brezak.dg1994-01-031-2/+1
|
* Made all header files idempotent and moved incorrect common data fromwollman1993-11-071-2/+2
| | | | | headers into a related source file. Added cons.h as first step towards moving i386/i386/cons.h to machine/cons.h where it belongs.
* All:rgrimes1993-10-081-9/+9
| | | | | | | | | | | | | | | | | | | | | | | Remove patch kit headers, and add $Id$ This is mostly to align some more code with NetBSD. cpu.h: Remove the old function vs. include configuration stuff that was ifdefed out when we went to inline functions. Remove the define of resettodr that made it a nop, there is already a function that makes it a nop, no need to #define one. Remove the #defines of processor types, they are now defined in cputypes.h, #include that file. Add struct cpu_nameclass for support of cpu types. frame.h: include sys/signal.h, it will be needed in the future. put the sigframe structure here that was in machdep.c pcb.h: Add multiple inclusion protection. Add pcb_ldt and pcb_ldt_len to pcb structure, this is for the user mode ldt.
* Initial import, 0.1 + pk 0.2.4-B1rgrimes1993-06-121-0/+87
OpenPOWER on IntegriCloud