aboutsummaryrefslogtreecommitdiff
path: root/sys/alpha/include
Commit message (Collapse)AuthorAgeFilesLines
* 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
* Style fixes.Alexander Kabaev2003-05-041-9/+12
| | | | | | | | | | | | Remove DBL_DIG, DBL_MIN, DBL_MAX and their FLT_ counterparts, they were marked for deprecation ever since SUSv1 at least. Only define ULLONG_MIN/MAX and LLONG_MAX if long long type is supported. Restore a lost comment in MI _limits.h file and remove it from sys/limits.h where it does not belong. Notes: svn path=/head/; revision=114678
* Deprecate machine/limits.h in favor of new sys/limits.h.Alexander Kabaev2003-04-291-64/+4
| | | | | | | | | | Change all in-tree consumers to include <sys/limits.h> Discussed on: standards@ Partially submitted by: Craig Rodrigues <rodrigc@attbi.com> Notes: svn path=/head/; revision=114216
* Remove unmatched #endif left over incidenntally in last commit.Alexander Kabaev2003-04-281-1/+0
| | | | Notes: svn path=/head/; revision=114183
* Add a new sys/limits.h file which in turn depends on machine/_limits.hAlexander Kabaev2003-04-231-54/+39
| | | | | | | | | | | | to get actual constant values. This is in preparation for machine/limits.h retirement. Discussed on: standards@ Submitted by: Craig Rodrigues <rodrigc@attbi.com> (*) Modified by: kan Notes: svn path=/head/; revision=113941
* Protect the per-process UAC field with the proc lock where it isn't alreadyJohn Baldwin2003-04-171-1/+1
| | | | | | | protected. Notes: svn path=/head/; revision=113610
* Change the operation parameter of bus_dmamap_sync() from anMaxime Henrion2003-04-101-9/+5
| | | | | | | | | enum to an int and redefine the BUS_DMASYNC_* constants as flags. This allows us to specify several operations in one call to bus_dmamap_sync() as in NetBSD. Notes: svn path=/head/; revision=113347
* - Kill the pv_flags member of the alpha mdpage since it stop being usedJohn Baldwin2003-04-101-1/+0
| | | | | | | | | in rev 1.61 of pmap.c. - Now that pmap_page_is_free() is empty and since it is just a hack for the Alpha pmap, remove it. Notes: svn path=/head/; revision=113343
* Fix the osf1 abi module on SMP systems by making the size ofAndrew Gallatin2003-03-292-2/+3
| | | | | | | | | | | | | | | | | | | a struct pmap be the same on both SMP and UP kernels. It turns out that the size of a struct pmap is much larger on alpha SMP systems due to the number of pm_asn's being dependant on MAX_CPU. Since modules are supposed to be SMP agnostic, this has the affect of moving around the "interesting bits" of the vmspace (daddr, dsize) that the osf1 module wants to frob. So the module ends up scribbling in a pmap struct, and the user either sees a panic, or an application failure. While here, I've also shrunk MAXCPU to 8 now that it affects the size of pmap structs on UP systesm. This should be plenty, as I'm unware of any hardware we currently run in which supports more than 8 CPUs. Notes: svn path=/head/; revision=112809
* - Add vm_paddr_t, a physical address type. This is required for systemsJake Burkholder2003-03-251-0/+1
| | | | | | | | | | | | | | | | | | where physical addresses larger than virtual addresses, such as i386s with PAE. - Use this to represent physical addresses in the MI vm system and in the i386 pmap code. This also changes the paddr parameter to d_mmap_t. - Fix printf formats to handle physical addresses >4G in the i386 memory detection code, and due to kvtop returning vm_paddr_t instead of u_long. Note that this is a name change only; vm_paddr_t is still the same as vm_offset_t on all currently supported platforms. Sponsored by: DARPA, Network Associates Laboratories Discussed with: re, phk (cdevsw change) Notes: svn path=/head/; revision=112569
* Made the prototypes for pmap_kenter and pmap_kremove MD. These functionsJake Burkholder2003-03-161-0/+2
| | | | | | | | | | | | are machine dependent because they are not required to update the tlb when mappings are added or removed, and doing so is machine dependent. In addition, an implementation may require that pages mapped with pmap_kenter have a backing vm_page_t, which is not necessarily true of all physical pages, and so may choose to pass the vm_page_t to pmap_kenter instead of the physical address in order to make this requirement clear. Notes: svn path=/head/; revision=112312
* MFi386 revision 1.88Alan Cox2003-03-011-6/+0
| | | | | | | Remove some long unused declarations. Notes: svn path=/head/; revision=111697
* Correctly set BUS_SPACE_MAXSIZE in all the busdma backends.Maxime Henrion2003-02-261-1/+1
| | | | | | | | It was bogusly set to 64 * 1024 or 128 * 1024 because it was bogusly reused in the BUS_DMAMAP_NSEGS definition. Notes: svn path=/head/; revision=111524
* Remove support for running in SimOS. The support has rotted overMarcel Moolenaar2003-02-251-10/+0
| | | | | | | | | | | time and there's no indication that it will improve anytime soon. By removing support for SimOS it is possible to build LINT on Alpha, which is considered more important at the moment. Not objected to on: alpha@ Notes: svn path=/head/; revision=111457
* Workaround for compiling LINT. Large kernels (like LINT) can haveMarcel Moolenaar2003-02-231-20/+32
| | | | | | | | | | | | | | branch targets that are too far apart for the BRADDR relocation. This is caused by the branch prediction optimizationi in the atomic inlines here, because they jump across sections. The workaround is to suppress jumping to a different section when compiling LINT. To generate correct code in that case, the section directives are replaced by a branch and a label to deal with the fall-through case. Reasonably good C compilers will optimize this away anyway, so the end result isn't really that bad. Notes: svn path=/head/; revision=111295
* Change the console interface to pass a "struct consdev *" instead of aPoul-Henning Kamp2003-02-201-3/+3
| | | | | | | | | | | | dev_t to the method functions. The dev_t can still be found at struct consdev *->cn_dev. Add a void *cn_arg element to struct consdev which the drivers can use for retrieving their softc. Notes: svn path=/head/; revision=111194
* Implement fpclassify():Mike Barcroft2003-02-082-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | o Add a MD header private to libc called _fpmath.h; this header contains bitfield layouts of MD floating-point types. o Add a MI header private to libc called fpmath.h; this header contains bitfield layouts of MI floating-point types. o Add private libc variables to lib/libc/$arch/gen/infinity.c for storing NaN values. o Add __double_t and __float_t to <machine/_types.h>, and provide double_t and float_t typedefs in <math.h>. o Add some C99 manifest constants (FP_ILOGB0, FP_ILOGBNAN, HUGE_VALF, HUGE_VALL, INFINITY, NAN, and return values for fpclassify()) to <math.h> and others (FLT_EVAL_METHOD, DECIMAL_DIG) to <float.h> via <machine/float.h>. o Add C99 macro fpclassify() which calls __fpclassify{d,f,l}() based on the size of its argument. __fpclassifyl() is never called on alpha because (sizeof(long double) == sizeof(double)), which is good since __fpclassifyl() can't deal with such a small `long double'. This was developed by David Schultz and myself with input from bde and fenner. PR: 23103 Submitted by: David Schultz <dschultz@uclink.Berkeley.EDU> (significant portions) Reviewed by: bde, fenner (earlier versions) Notes: svn path=/head/; revision=110566
* Implement bus_dmamem_alloc_size() and bus_dmamem_free_size() asScott Long2003-01-291-0/+6
| | | | | | | | | | | | | | | | | | | | | | | counterparts to bus_dmamem_alloc() and bus_dmamem_free(). This allows the caller to specify the size of the allocation instead of it defaulting to the max_size field of the busdma tag. This is intended to aid in converting drivers to busdma. Lots of hardware cannot understand scatter/gather lists, which forces the driver to copy the i/o buffers to a single contiguous region before sending it to the hardware. Without these new methods, this would require a new busdma tag for each operation, or a complex internal allocator/cache for each driver. Allocations greater than PAGE_SIZE are rounded up to the next PAGE_SIZE by contigmalloc(), so this is not suitable for multiple static allocations that would be better served by a single fixed-length subdivided allocation. Reviewed by: jake (sparc64) Notes: svn path=/head/; revision=110030
* Protect against multiple inclusions.David E. O'Brien2003-01-181-0/+5
| | | | Notes: svn path=/head/; revision=109500
* MB_LEN_MAX is not MD, move it to the MI limits.h.Tim J. Robbins2002-12-222-2/+0
| | | | Notes: svn path=/head/; revision=108175
* Add getcontext, setcontext, and swapcontext as system calls.Daniel Eischen2002-11-164-14/+14
| | | | | | | | | | | | | | Previously these were libc functions but were requested to be made into system calls for atomicity and to coalesce what might be two entrances into the kernel (signal mask setting and floating point trap) into one. A few style nits and comments from bde are also included. Tested on alpha by: gallatin Notes: svn path=/head/; revision=106977
* Cast pointers in mem*_io() compat macros to uintptr_t so that they can beJohn Baldwin2002-11-081-5/+5
| | | | | | | used as bus handles by the bus_space functions implementing these macros. Notes: svn path=/head/; revision=106659
* Wrap ()'s around an argument before casting it to a void *. If theJohn Baldwin2002-11-061-6/+6
| | | | | | | | | argument is an expression you can end up casting part of it to void *. This resulted in bogus warnings about pointer arith using void *'s for the ep(4) driver. Notes: svn path=/head/; revision=106533
* - Enable the use of UMA_MD_PAGE_ALLOC on alpha.Jeff Roberson2002-11-011-0/+6
| | | | | | | | | | - Define uma_small_alloc and uma_small_free using K0SEG for virtual addresses. Approved by: re Notes: svn path=/head/; revision=106281
* Remove extranious memory barriers, and correct the placement of a few others.Andrew Gallatin2002-10-301-14/+4
| | | | | | | | | | | | | This provides a 30% reduction in system time and a 6% reduction in wallclock time for a make buildworld on my xp1000 (one 21264). FWIW, I've been running this for nearly 2 months without problems. Portions submitted by: ticso, jhb Tested by: jhb (ds20 dual 21264) Notes: svn path=/head/; revision=106179
* Use the newer "+" modifier on output contraints when a register orJohn Baldwin2002-10-252-62/+62
| | | | | | | | memory datum is used for both input and output instead of using matching constraints. Notes: svn path=/head/; revision=105958
* Split 4.x and 5.x signal handling so that we can keep 4.x signalPeter Wemm2002-10-254-7/+25
| | | | | | | | | | | | | | | | | | | handling clean and functional as 5.x evolves. This allows some of the nasty bandaids in the 5.x codepaths to be unwound. Encapsulate 4.x signal handling under COMPAT_FREEBSD4 (there is an anti-foot-shooting measure in place, 5.x folks need this for a while) and finish encapsulating the older stuff under COMPAT_43. Since the ancient stuff is required on alpha (longjmp(3) passes a 'struct osigcontext *' to the current sigreturn(2), instead of the 'ucontext_t *' that sigreturn is supposed to take), add a compile time check to prevent foot shooting there too. Add uniform COMPAT_43 stubs for ia64/sparc64/powerpc. Tested on: i386, alpha, ia64. Compiled on sparc64 (a few days ago). Approved by: re Notes: svn path=/head/; revision=105950
* psl.h isn't referenced anywhere that I could find on the alpha, so removePeter Wemm2002-10-211-32/+0
| | | | | | | this stub. Notes: svn path=/head/; revision=105657