aboutsummaryrefslogtreecommitdiff
path: root/sys/alpha/include
Commit message (Collapse)AuthorAgeFilesLines
...
* Implement makectx(). The makectx() function is used by KDB to createMarcel Moolenaar2004-07-101-0/+1
| | | | | | | | | | | | a PCB from a trapframe for purposes of unwinding the stack. The PCB is used as the thread context and all but the thread that entered the debugger has a valid PCB. This function can also be used to create a context for the threads running on the CPUs that have been stopped when the debugger got entered. This however is not done at the time of this commit. Notes: svn path=/head/; revision=131905
* Introduce the KDB debugger frontend. The frontend provides a frameworkMarcel Moolenaar2004-07-101-0/+49
| | | | | | | | | | | | | | | | | | in which multiple (presumably different) debugger backends can be configured and which provides basic services to those backends. Besides providing services to backends, it also serves as the single point of contact for any and all code that wants to make use of the debugger functions, such as entering the debugger or handling of the alternate break sequence. For this purpose, the frontend has been made non-optional. All debugger requests are forwarded or handed over to the current backend, if applicable. Selection of the current backend is done by the debug.kdb.current sysctl. A list of configured backends can be obtained with the debug.kdb.available sysctl. One can enter the debugger by writing to the debug.kdb.enter sysctl. Notes: svn path=/head/; revision=131903
* Introduce the GDB debugger backend for the new KDB framework. TheMarcel Moolenaar2004-07-101-0/+52
| | | | | | | | | | | | backend improves over the old GDB support in the following ways: o Unified implementation with minimal MD code. o A simple interface for devices to register themselves as debug ports, ala consoles. o Compression by using run-length encoding. o Implements GDB threading support. Notes: svn path=/head/; revision=131899
* MFamd64/i386Alan Cox2004-07-051-0/+14
| | | | | | | | | Add partial pmap locking. Tested by: kensmith@ Notes: svn path=/head/; revision=131633
* Implement preemption of kernel threads natively in the scheduler ratherJohn Baldwin2004-07-021-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | than as one-off hacks in various other parts of the kernel: - Add a function maybe_preempt() that is called from sched_add() to determine if a thread about to be added to a run queue should be preempted to directly. If it is not safe to preempt or if the new thread does not have a high enough priority, then the function returns false and sched_add() adds the thread to the run queue. If the thread should be preempted to but the current thread is in a nested critical section, then the flag TDF_OWEPREEMPT is set and the thread is added to the run queue. Otherwise, mi_switch() is called immediately and the thread is never added to the run queue since it is switch to directly. When exiting an outermost critical section, if TDF_OWEPREEMPT is set, then clear it and call mi_switch() to perform the deferred preemption. - Remove explicit preemption from ithread_schedule() as calling setrunqueue() now does all the correct work. This also removes the do_switch argument from ithread_schedule(). - Do not use the manual preemption code in mtx_unlock if the architecture supports native preemption. - Don't call mi_switch() in a loop during shutdown to give ithreads a chance to run if the architecture supports native preemption since the ithreads will just preempt DELAY(). - Don't call mi_switch() from the page zeroing idle thread for architectures that support native preemption as it is unnecessary. - Native preemption is enabled on the same archs that supported ithread preemption, namely alpha, i386, and amd64. This change should largely be a NOP for the default case as committed except that we will do fewer context switches in a few cases and will avoid the run queues completely when preempting. Approved by: scottl (with his re@ hat) Notes: svn path=/head/; revision=131481
* - Remove unused definitions.Alan Cox2004-06-231-5/+2
| | | | | | | - Move a definition inside the scope of a #ifdef _KERNEL. Notes: svn path=/head/; revision=130965
* Backed out previous commit. Blind substitution of dev_t by `struct cdev *'Bruce Evans2004-06-201-1/+1
| | | | | | | was just wrong here because the dev_t's are user dev_t's. Notes: svn path=/head/; revision=130764
* Do the dreaded s/dev_t/struct cdev */Poul-Henning Kamp2004-06-161-1/+1
| | | | | | | Bump __FreeBSD_version accordingly. Notes: svn path=/head/; revision=130585
* Remove atdevbase and replace it's remaining uses with direct references toJohn Baldwin2004-06-101-5/+0
| | | | | | | KERNBASE instead. Notes: svn path=/head/; revision=130312
* Moved most of the "MI" definitions and declarations from <machine/profile.h>Bruce Evans2004-05-191-12/+0
| | | | | | | | | to <sys/gmon.h>. Cleaned them up a little by not attempting to ifdef for incomplete and out of date support for GUPROF in userland, as in the sparc64 version. Notes: svn path=/head/; revision=129444
* <stdint.h> should define WINT_M{AX,IN} independent from whether WCHAR_MIN isStefan Farfeleder2004-05-181-1/+1
| | | | | | | | | | | defined. Otherwise first including <wchar.h> and then <stdint.h> leads to no WINT_M{AX,IN} at all. PR: 64956 Approved by: das (mentor) Notes: svn path=/head/; revision=129393
* Don't clear the exception flags after we finish emulating aDavid Schultz2004-05-061-0/+2
| | | | | | | | | | floating-point instruction in the kernel. The flags are supposed to be cumulative. Thanks to marcel for helping me test this. Notes: svn path=/head/; revision=128997
* Hide FLT_EVAL_METHOD and DECIMAL_DIG in pre-C99 compilationDavid Schultz2004-04-251-0/+2
| | | | | | | | | | environments. PR: 63935 Submitted by: Stefan Farfeleder <stefan@fafoe.narf.at> Notes: svn path=/head/; revision=128629
* MFamd64Alan Cox2004-04-181-8/+9
| | | | | | | | Simplify the sf_buf implementation. In short, make it a veneer over the direct virtual-to-physical mapping. Notes: svn path=/head/; revision=128388
* Remove avail_end. It is not used.Alan Cox2004-04-111-1/+0
| | | | Notes: svn path=/head/; revision=128101
* - pmap_kenter_temporary() is unused by machine-independent code. Therefore,Alan Cox2004-04-101-0/+1
| | | | | | | | | | | move its declaration to the machine-dependent header file on those machines that use it. In principle, only i386 should have it. Alpha and AMD64 should use their direct virtual-to-physical mapping. - Remove pmap_kenter_temporary() from ia64. It is unused. Approved by: marcel@ Notes: svn path=/head/; revision=128097
* Remove the advertsing clause, per the Regent's letter dated July 22, 1999.Warner Losh2004-04-0512-53/+0
| | | | | | | Approved by: core Notes: svn path=/head/; revision=127910
* Remove avail_start on those platforms that no longer use it. (Only amd64Alan Cox2004-04-051-1/+0
| | | | | | | does anything with it beyond simple initialization.) Notes: svn path=/head/; revision=127875
* Remove CADDR1 and CMAP1. They are unused.Alan Cox2004-04-031-2/+0
| | | | Notes: svn path=/head/; revision=127812
* Introduce the cpumask_t type. The purpose of the type is to create aMarcel Moolenaar2004-03-201-0/+1
| | | | | | | | | | | | | | | | | | | | | | level of abstraction for any and all CPU mask and CPU bitmap variables so that platforms have the ability to break free from the hard limit of 32 CPUs, simply because we don't have more bits in an u_int. Note that the type is not supposed to solve massive parallelism, where the number of CPUs can be larger than the width of the widest integral type. As such, cpumask_t is not supposed to be a compound type. If such would be necessary in the future, we can deal with the issues then and there. For now, it can be assumed that the type is integral and unsigned. With this commit, all MD definitions start off as u_int. This allows us to phase-in cpumask_t at our leasure without breaking anything. Once cpumask_t is used consistently, platforms can switch to wider (or smaller) types if such would be beneficial (or not; whatever :-) Compile-tested on: i386 Notes: svn path=/head/; revision=127239
* Remove unused declarations. (Some time ago, these variables became fieldsAlan Cox2004-03-071-2/+0
| | | | | | | of vm/vm.h's struct kva_md_info.) Notes: svn path=/head/; revision=126715
* Fix syntax errors and wrong function prototypes in several MD headerLukas Ertl2004-03-051-2/+2
| | | | | | | | | | | files when using non-GNUC compilers. PR: kern/58515 Submitted by: Stefan Farfeleder <stefan@fafoe.narf.at> Approved by: grog (mentor), obrien Notes: svn path=/head/; revision=126649
* Provide sysarch(2) prototypes in the MD sysarch.h headers. While I'mJacques Vidrine2004-01-091-0/+1
| | | | | | | | | | | | | at it, use the ANSI C generic pointer type for the second argument, thus matching the documentation. Remove the now extraneous (and now conflicting) function declarations in various libc sources. Remove now unnecessary casts. Reviewed by: bde Notes: svn path=/head/; revision=124296
* GC the unused <machine/kse.h> file.Peter Wemm2003-12-241-49/+0
| | | | Notes: svn path=/head/; revision=123791
* Move the bktr(4) <arch>/include/ioctl_{bt848,meteor}.h files to dev/bktrDavid E. O'Brien2003-12-082-445/+36
| | | | | | | | | as these ioctl's aren't MD. This also means they are installed in /usr/include/dev/bktr now. Also provide compatability wrappers for where these headers lived in 4.x. Notes: svn path=/head/; revision=123288
* Ooops. These are still used by the bktr driver. David O'Brien hasWarner Losh2003-12-071-0/+187
| | | | | | | | | plans for dealing, but I'll let him deal. Pointy hat to: imp@ Notes: svn path=/head/; revision=123223
* Remote meteor driver. It hasn't compiled in over 3 years. If someoneWarner Losh2003-12-071-187/+0
| | | | | | | | makes it compile again, and can test it, we can restore the driver to the tree. Notes: svn path=/head/; revision=123213
* Widen the enable/disable helper function's argument in line with thePeter Wemm2003-11-171-3/+4
| | | | | | | ithread_create() changes etc. This should be mostly a NOP. Notes: svn path=/head/; revision=122841
* - Modify alpha's sf_buf implementation to use the direct virtual-to-Alan Cox2003-11-161-0/+57
| | | | | | | | | | | | physical mapping. - Move the sf_buf API to its own header file; make struct sf_buf's definition machine dependent. In this commit, we remove an unnecessary field from struct sf_buf on the alpha, amd64, and ia64. Ultimately, we may eliminate struct sf_buf on those architecures except as an opaque pointer that references a vm page. Notes: svn path=/head/; revision=122780
* Document the lockfunc and lockfuncarg arguments to bus_dma_tag_create() inScott Long2003-11-071-0/+4
| | | | | | | the busdma headers. Notes: svn path=/head/; revision=122266
* Move pmap_resident_count() from the MD pmap.h to the MI pmap.h.Bruce M Simpson2003-10-061-1/+0
| | | | | | | | | | | Add a definition of pmap_wired_count(). Add a definition of vmspace_wired_count(). Reviewed by: truckman Discussed with: peter Notes: svn path=/head/; revision=120831
* Add sysentvec->sv_fixlimits() hook so that we can catch cases on 64 bitPeter Wemm2003-09-251-12/+0
| | | | | | | | | | | | | | | | | | | | | | | | systems where the data/stack/etc limits are too big for a 32 bit process. Move the 5 or so identical instances of ELF_RTLD_ADDR() into imgact_elf.c. Supply an ia32_fixlimits function. Export the clip/default values to sysctl under the compat.ia32 heirarchy. Have mmap(0, ...) respect the current p->p_limits[RLIMIT_DATA].rlim_max value rather than the sysctl tweakable variable. This allows mmap to place mappings at sensible locations when limits have been reduced. Have the imgact_elf.c ld-elf.so.1 placement algorithm use the same method as mmap(0, ...) now does. Note that we cannot remove all references to the sysctl tweakable maxdsiz etc variables because /etc/login.conf specifies a datasize of 'unlimited'. And that causes exec etc to fail since it can no longer find space to mmap things. Notes: svn path=/head/; revision=120422
* Implement the bus_space_map() function to allocate resources and initializeYoshihiro Takahashi2003-09-231-0/+18
| | | | | | | a bus_handle, but currently it does only initializing a bus_handle. Notes: svn path=/head/; revision=120375
* Fix build breakage caused by the inclusion of <ddb/ddb.h> whileMarcel Moolenaar2003-09-071-1/+2
| | | | | | | | | building a module. Inclusion of option files (opt_ddb.h in this case) is not possible for modules. The inclusion of opt_ddb.h in this header is questionable. Notes: svn path=/head/; revision=119826
* Standardize idempotentcy ifdefs. Consistently use _MACHINE_VARARGS_H_Alexander Kabaev2003-09-011-3/+3
| | | | | | | symbol. Notes: svn path=/head/; revision=119628
* Cleanup <machine/cpu.h> by moving MD prototypes to <machine/md_var.h>Marcel Moolenaar2003-08-173-73/+57
| | | | | | | | | | | | | | | | | | like we have on other platforms. Move savectx() to <machine/pcb.h>. A lot of files got these MD prototypes through the indirect inclusion of <machine/cpu.h> and now need to include <machine/md_var.h>. The number of which is unexpectedly large... osf1_misc.c especially is tricky because szsigcode is redefined in one of the osf1 header files. Reordering of the include files was needed. linprocfs.c now needs an explicit extern declaration. Tested with: LINT Notes: svn path=/head/; revision=119008
* Further cleanup <machine/cpu.h> and <machine/md_var.h>: move the MIMarcel Moolenaar2003-08-162-4/+6
| | | | | | | | | | | | | | | | | | | | | | prototypes of cpu_halt(), cpu_reset() and swi_vm() from md_var.h to cpu.h. This affects db_command.c and kern_shutdown.c. ia64: move all MD prototypes from cpu.h to md_var.h. This affects madt.c, interrupt.c and mp_machdep.c. Remove is_physical_memory(). It's not used (vm_machdep.c). alpha: the MD prototypes have been left in cpu.h with a comment that they should be there. Moving them is left for later. It was expected that the impact would be significant enough to be done in a seperate commit. powerpc: MD prototypes left in cpu.h. Comment added. Suggested by: bde Tested with: make universe (pc98 incomplete) Notes: svn path=/head/; revision=118990
* Expand inline the relevant parts of src/COPYRIGHT for Matt Dillon'sWarner Losh2003-08-121-2/+24
| | | | | | | | | copyrighted files. Approved by: Matt Dillon Notes: svn path=/head/; revision=118848
* - Since td_critnest is now initialized in MI code, it doesn't have to beJohn Baldwin2003-08-041-2/+0
| | | | | | | | | set in cpu_critical_fork_exit() anymore. - As far as I can tell, cpu_thread_link() has never been used, not even when it was originally added, so remove it. Notes: svn path=/head/; revision=118443
* Style sync.David E. O'Brien2003-08-031-7/+7
| | | | Notes: svn path=/head/; revision=118382
* Deal with 'options KSTACK_PAGES' being a global option.Peter Wemm2003-07-311-0/+2
| | | | Notes: svn path=/head/; revision=118239
* - Introduce a new busdma flag BUS_DMA_ZERO to request for zero'edMaxime Henrion2003-07-271-0/+1
| | | | | | | | | | memory in bus_dmamem_alloc(). This is possible now that contigmalloc() supports the M_ZERO flag. - Remove the locking of Giant around calls to contigmalloc() since contigmalloc() now grabs Giant itself. Notes: svn path=/head/; revision=118081
* Implement alpha_pal_wrunique() and alpha_pal_rdunique(). Both areMarcel Moolenaar2003-07-241-0/+17
| | | | | | | | used to set and get the thread pointer. Note that a context switch will automaticly save and restore the thread pointer. Notes: svn path=/head/; revision=117955
* Use a spare for the thread pointer (mc_thrptr). The thread pointerMarcel Moolenaar2003-07-241-1/+2
| | | | | | | | is only read and written by set_mcontext() and get_mcontext() for use by threading libraries. Notes: svn path=/head/; revision=117954
* Mega busdma API commit.Scott Long2003-07-011-1/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | Add two new arguments to bus_dma_tag_create(): lockfunc and lockfuncarg. Lockfunc allows a driver to provide a function for managing its locking semantics while using busdma. At the moment, this is used for the asynchronous busdma_swi and callback mechanism. Two lockfunc implementations are provided: busdma_lock_mutex() performs standard mutex operations on the mutex that is specified from lockfuncarg. dftl_lock() is a panic implementation and is defaulted to when NULL, NULL are passed to bus_dma_tag_create(). The only time that NULL, NULL should ever be used is when the driver ensures that bus_dmamap_load() will not be deferred. Drivers that do not provide their own locking can pass busdma_lock_mutex,&Giant args in order to preserve the former behaviour. sparc64 and powerpc do not provide real busdma_swi functions, so this is largely a noop on those platforms. The busdma_swi on is64 is not properly locked yet, so warnings will be emitted on this platform when busdma callback deferrals happen. If anyone gets panics or warnings from dflt_lock() being called, please let me know right away. Reviewed by: tmm, gibbs Notes: svn path=/head/; revision=117126
* Migrate the thread stack management functions from the machine-dependentAlan Cox2003-06-141-1/+1
| | | | | | | | | | | | | | | | | | | to the machine-independent parts of the VM. At the same time, this introduces vm object locking for the non-i386 platforms. Two details: 1. KSTACK_GUARD has been removed in favor of KSTACK_GUARD_PAGES. The different machine-dependent implementations used various combinations of KSTACK_GUARD and KSTACK_GUARD_PAGES. To disable guard page, set KSTACK_GUARD_PAGES to 0. 2. Remove the (unnecessary) clearing of PG_ZERO in vm_thread_new. In 5.x, (but not 4.x,) PG_ZERO can only be set if VM_ALLOC_ZERO is passed to vm_page_alloc() or vm_page_grab(). Notes: svn path=/head/; revision=116355
* Rename BUS_DMAMEM_NOSYNC to BUS_DMA_COHERENT.Hiten Pandya2003-05-301-1/+1
| | | | | | | | | | | | | | | | | | | | The current name is confusing, because it indicates to the client that a bus_dmamap_sync() operation is not necessary when the flag is specified, which is wrong. The main purpose of this flag is to hint the underlying architecture that DMA memory should be mapped in a coherent way, but the architecture can ignore it. But if the architecture does supports coherent mapping of memory, then it makes bus_dmamap_sync() calls cheap. This flag is the same as the one in NetBSD's Bus DMA. Reviewed by: gibbs, scottl, des (implicitly) Approved by: re@ (jhb) Notes: svn path=/head/; revision=115416
* Bring back bus_dmasync_op_t. It is now a typedef to an int, though theScott Long2003-05-271-1/+2
| | | | | | | | | | | BUS_DMASYNC_ definitions remain as before. The does not change the ABI, and reverts the API to be a bit more compatible and flexible. This has survived a full 'make universe'. Approved by: re (bmah) Notes: svn path=/head/; revision=115343
* De-orbit bus_dmamem_alloc_size(). It's a hack and was never used anyways.Scott Long2003-05-261-6/+0
| | | | | | | | | No need for it to pollute the 5.x API any further. Approved by: re (bmah) Notes: svn path=/head/; revision=115316
* sys/sys/limits.h:Alexander Kabaev2003-05-192-4/+4
| | | | | | | | | | | | | | | | | | - Fix visibilty test for LONG_BIT and WORD_BIT. `#if defined(__FOO_VISIBLE)' is alays wrong because __FOO_VISIBLE is always defined (to 0 for invisibility). sys/<arch>/include/limits.h sys/<arch>/include/_limits.h: - Style fixes. Submitted by: bde Reviewed by: bsdmike Approved by: re (scottl) Notes: svn path=/head/; revision=115164