summaryrefslogtreecommitdiffstats
path: root/sys/i386/include/md_var.h
Commit message (Collapse)AuthorAgeFilesLines
* Clean up some low level bootstrap code:peter2000-08-111-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - stop using the evil 'struct trapframe' argument for mi_startup() (formerly main()). There are much better ways of doing it. - do not use prepare_usermode() - setregs() in execve() will do it all for us as long as the p_md.md_regs pointer is set. (which is now done in machdep.c rather than init_main.c. The Alpha port did it this way all along and is much cleaner). - collect all the magic %cr0 etc register settings into one place and have the AP's call that instead of using magic numbers (!!) that keep changing over and over again. - Make it safe to call kthread_create() earlier, including during the device probe sequence. It doesn't need the callback mechanism that NetBSD's version uses. - kthreads created this way are root-less as they exist before the root filesystem is mounted. init(1) is set up so that it aquires the root pointers prior to running. If other kthreads want filesystem acccess we can make this code more generic. - set all threads start times once we have decided what time it is. - init uses a trampoline rather than the evil prepare_usermode() hack. - kern_descrip.c has a couple of tweaks to deal with forking when there is no rootdir or cwd etc. - adjust the early SYSINIT() sequence so that a few prereqisites are in place. eg: make sure the run queue is initialized before doing forks. With this, the USB code can easily create a kthread to do the device tree discovery. (I have tested it, it works nicely). There are still some open issues before this is truely useful. - tsleep() does not like working before the clock is running. It sort-of tries to spin wait, but it can do more useful things now. - stopping a kthread in kld code at unload time is "interesting" but we have a solution for that. The Alpha code needs no changes for this. It already uses pretty much the same strategies, but a little cleaner.
* Don't forget to reset the hardware debug registers when a process thatbsd2000-02-201-0/+1
| | | | | | | | | | was using them exits. Don't allow a user process to cause the kernel to take a TRCTRAP on a user space address. Reviewed by: jlemon, sef Approved by: jkh
* oszsigcode -> szosigcodemarcel1999-12-041-1/+1
| | | | Pointed out by: bde
* Add a per-signal flag to mark handlers registered with osigaction, so weluoqi1999-10-111-2/+1
| | | | | | | | | | | | | | | can provide the correct context to each signal handler. Fix broken sigsuspend(): don't use p_oldsigmask as a flag, use SAS_OLDMASK as we did before the linuxthreads support merge (submitted by bde). Move ps_sigstk from to p_sigacts to the main proc structure since signal stack should not be shared among threads. Move SAS_OLDMASK and SAS_ALTSTACK flags from sigacts::ps_flags to proc::p_flag. Move PS_NOCLDSTOP and PS_NOCLDWAIT flags from proc::p_flag to procsig::ps_flag. Reviewed by: marcel, jdp, bde
* Simplification of the signal trampoline and other cleanups.marcel1999-10-071-0/+1
| | | | | | | | | | | | | | | o Remove unused defines from genassym.c that were needed by the trampoline. o Add load_gs_param function to support.s that catches a fault when %gs is loaded with an invalid descriptor. The function returns EFAULT in that case. o Remove struct trapframe from mcontext_t and replace it with the list of registers. o Modify sendsig and sigreturn accordingly. This commit contains a patch by bde. Reviewed by: luoqi, jdp
* $Id$ -> $FreeBSD$peter1999-08-281-1/+1
|
* Implement support for hardware debug registers on the i386.jlemon1999-07-091-1/+3
| | | | Submitted by: Brian Dean <brdean@unx.sas.com>
* Enable vmspace sharing on SMP. Major changes are,luoqi1999-04-281-2/+3
| | | | | | | | | | | | | | | | | - %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>
* Moved declarations related to copying and zeroing to the right place.bde1999-01-081-1/+13
|
* Add the ability to specify where on the at_shutdown queue a handler ismsmith1998-10-301-2/+1
| | | | | | | | | installed. Remove cpu_power_down, and replace it with an entry at the end of the SHUTDOWN_FINAL queue in the only place it's used (APM). Submitted by: Some ideas from Bruce Walter <walter@fortean.com>
* Goodbye BOUNCE_BUFFERS, for a hack it has served us well.peter1998-09-251-9/+1
| | | | | | | | The last consumer of this code (the old SCSI system) has left us and the CAM code does it's own bouncing. The isa dma system has been doing it's own bouncing for a while too. Reviewed by: core
* Add new functions fill_fpregs() and set_fpregs(), like fill_regs()jdp1998-09-141-1/+3
| | | | | | | | and set_regs() but for the floating point register state. The code is stolen from procfs_machdep.c, and moved out of there into machdep.c. These functions are needed for generating ELF core dumps.
* Don't pretend to support ix86's with 16-bit ints by using longs just tobde1998-07-111-11/+10
| | | | | | ensure 32-bit variables. Doing so mainly bogotified some printf formats. Fixed disorder in md_var.h.
* Fixed disordering of busdma* and swi_vm.bde1998-02-011-4/+4
|
* Add prototypes for swi_vm, setsoftvm, schedsoftvm, and splsoftvm that weregibbs1998-01-211-1/+2
| | | | missed when I originally committed the bus dma code.
* Implementation of Bus Space for FreeBSD-x86.gibbs1998-01-151-1/+3
| | | | Obtained From: NetBSD
* Moved some extern declarations to header files (unused ones to /dev/null).bde1997-11-201-1/+8
|
* Moved declaration of etext from <machine/md_var.h> to <machine/cpu.h>bde1997-10-271-2/+1
| | | | | | | | and fixed everything that dependended on it being declared in the old place. It is used in "machine-independent" code in subr_prof.c. Moved declaration of btext from subr_prof.c to <machine/cpu.h>. It is machine-dependent.
* Revert the logic behind my last change, and use a function calledjoerg1997-09-131-2/+2
| | | | | | | `is_physical_memory()' now for the decision whether to dump some region of memory or not. Suggested by: davidg
* Do not ever try to coredump adapter memory regions.joerg1997-09-101-1/+2
| | | | | | | | | PR: 4486 Submitted by: tegge@idi.ntnu.no (Tor Egge) Implement a function is_adapter_memory() in order to determine what should nto be dumped at all. Currently, only populated with the ``ISA memory hole''. Adapter regions of other busses should be added.
* VM86 kernel support.dyson1997-08-091-2/+1
| | | | | | | 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>
* When APM is configured, turn off the power when halting for good.wollman1997-06-151-1/+2
|
* Preserve %fs and %gs across context switches. This has a relatively lowbde1997-06-071-1/+3
| | | | | | | 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).
* Improved CPU identification and initialization routines. Thiskato1997-03-221-1/+7
| | | | | | | | | | | | | supports All Cyrix CPUs, IBM Blue Lightning CPU and NexGen (now AMD) Nx586 CPU, and initialize special registers of Cyrix CPU and msr of IBM Blue Lightning CPU. If revision of Cyrix 6x86 CPU < 2.7, CPU cache is enabled in write-through mode. This can be disabled by kernel configuration options. Reviewed by: Bruce Evans <bde@freebsd.org> and Jordan K. Hubbard <jkh@freebsd.org>
* 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.
* Further improved version of hadling a HALT when there is no console.julian1996-10-311-1/+2
|
* Moved declarations of non-cpu things from <machine/cpufunc.h> to betterbde1996-07-011-1/+9
| | | | places.
* Mega-commit for Linux emulator update.. This has been stress tested underpeter1996-03-021-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* Rewrote cpu_fork so that it doesn't use pmap_activate, and removeddg1996-02-041-2/+1
| | | | | | | pmap_activate since it's not used anymore. Changed cpu_fork so that it uses one line of inline assembly rather than calling mvesp() to get the current stack pointer. Removed mvesp() since it is no longer being used.
* Allocate DMA bounce buffers only when requested by drivers. Only thebde1996-01-271-2/+1
| | | | | | | | | | | | | | | | | | | fd and wt drivers need bounce buffers, so this normally saves 32K-1K of kernel memory. Keep track of which DMA channels are busy. isa_dmadone() must now be called when DMA has finished or been aborted. Panic for unallocated and too-small (required) bounce buffers. fd.c: There will be new warnings about isa_dmadone() not being called after DMA has been aborted. sound/dmabuf.c: isa_dmadone() needs more parameters than are available, so temporarily use a new interface isa_dmadone_nobounce() to avoid having to worry about panics for fake parameters. Untested.
* Completed function declarations and/or added prototypes.bde1995-11-211-2/+2
|
* devfs changes..julian1995-09-031-2/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | changes to allow devices that don't probe (e.g. /dev/mem) to create devfs entries this required giving 'configure' its own SYSINIT entry so we could duck in just before it with a DEVFS init and some device inits.. my devfs now looks like: ./misc ./misc/speaker ./misc/mem ./misc/kmem ./misc/null ./misc/zero ./misc/io ./misc/console ./misc/pcaudio ./misc/pcaudioctl ./disks ./disks/rfloppy ./disks/rfloppy/fd0.1440 ./disks/rfloppy/fd1.1200 ./disks/floppy ./disks/floppy/fd0.1440 ./disks/floppy/fd1.1200 also some sligt cleanups.. DEVFS needs a lot of work but I'm getting back to it..
* Remove trailing whitespace.rgrimes1995-05-301-2/+2
|
* Add and move declarations to fix all of the warnings from `gcc -Wimplicit'bde1995-03-281-1/+2
| | | | | (except in netccitt, netiso and netns) that I didn't notice when I fixed "all" such warnings before.
* Add and move declarations to fix all of the warnings from `gcc -Wimplicit'bde1995-03-161-0/+68
(except in netccitt, netiso and netns) and most of the warnings from `gcc -Wnested-externs'. Fix all the bugs found. There were no serious ones.
OpenPOWER on IntegriCloud