summaryrefslogtreecommitdiffstats
path: root/sys/sparc64
Commit message (Collapse)AuthorAgeFilesLines
* Change the process flags P_KSES to be P_THREADED.julian2003-02-271-1/+1
| | | | This is just a cosmetic change but I've been meaning to do it for about a year.
* cat KSE > /dev/nulldavidxu2003-02-271-3/+0
|
* Implemented "nooption" and "nomakeoption" config(8) tokens.ru2003-02-262-41/+47
| | | | | | | | | | | | | | | | | | | | | | | | Fixed memory leak in the "nodevice" option implementation. Use these instead of sed(1) in MD NOTES. Use a single makefile (sys/conf/makeLINT.mk) to generate LINT for all architectures. (Previous versions missed the LINT dependency on Makefile, and i386 version also missed the dependency on ${NOTES}.) Fixed bugs in the previous NOTES conversion using the "nodevice" token and sed(1): - i386 LINT lost "device pst". - pc98 LINT lost SC_*, MAXCONS and KBD_DISABLE_KEYMAP_LOAD options, and got needless DPT_* options. - Added nooptions PPC_DEBUG, PPC_PROBE_CHIPSET, KBD_INSTALL_CDEV to sparc64 LINT so that it has a chance to config(8). This basically returns us to where we were before.
* Unbreak the IOMMU code.mux2003-02-261-1/+1
| | | | | Pointy hat to: mux Reviewed by: tmm
* Correctly set BUS_SPACE_MAXSIZE in all the busdma backends.mux2003-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.
* Move most everything back to a MI NOTES, and use "nodevice" in MD NOTESobrien2003-02-252-0/+127
| | | | | | | Where needed. Use 'sed' for now in place of "nooptions". Add a sparc64 MD NOTES. Reviewed by: arch@
* Cleanup of the d_mmap_t interface.mux2003-02-251-7/+0
| | | | | | | | | | | | | | | | | | | | | | | | | - Get rid of the useless atop() / pmap_phys_address() detour. The device mmap handlers must now give back the physical address without atop()'ing it. - Don't borrow the physical address of the mapping in the returned int. Now we properly pass a vm_offset_t * and expect it to be filled by the mmap handler when the mapping was successful. The mmap handler must now return 0 when successful, any other value is considered as an error. Previously, returning -1 was the only way to fail. This change thus accidentally fixes some devices which were bogusly returning errno constants which would have been considered as addresses by the device pager. - Garbage collect the poorly named pmap_phys_address() now that it's no longer used. - Convert all the d_mmap_t consumers to the new API. I'm still not sure wheter we need a __FreeBSD_version bump for this, since and we didn't guarantee API/ABI stability until 5.1-RELEASE. Discussed with: alc, phk, jake Reviewed by: peter Compile-tested on: LINT (i386), GENERIC (alpha and sparc64) Runtime-tested on: i386
* Make the 'a' parameter of bus_space_write_multi_stream_*() a const pointer.obrien2003-02-241-3/+3
|
* The rest of our platforms make bus_space_write_multi_stream_2's 'a' aobrien2003-02-231-1/+1
| | | | const pointer.
* Add an empty bus_space_unmap() like Alpha has. puc(4) uses it.obrien2003-02-231-0/+11
|
* Uncomment the xl(4) driver since it's now working properlymux2003-02-201-1/+1
| | | | on sparc64.
* Fix definite panic when releasing interrupt resources.jake2003-02-191-1/+1
| | | | Spotted by: tmm
* Missed a missing M_WAITOK.jake2003-02-191-1/+1
|
* Use M_WAITOK.jake2003-02-192-2/+4
|
* Implement interrupt resource allocation and setup. Set the interruptjake2003-02-195-16/+111
| | | | | | | group number properly based on the board id. Perform dummy reads of registers after writing to flush the hardware write buffers. This gets the soon to be committed zs attachment working.
* Back out M_* changes, per decision of the TRB.imp2003-02-1911-16/+16
| | | | Approved by: trb
* Add central and fhc.jake2003-02-181-0/+2
|
* Add drivers for the central and fhc busses found in enterprise classjake2003-02-188-0/+1082
| | | | | | | | | | | | UltraSPARCs, and an eeprom attachment for fhc, which allows the date to be set properly on these machines. Central is a wierd bus which seems to only ever have 1 fhc attached to it. FHC (FireHose Controller) is another wierd bus with various things on it depending where its attached. The fhc attached to central has eeprom and zs, and the fhcs which attach directly to nexus have simm-status, environment and other nodes, none of which I'll probably ever have documentation for. Thanks to Ade Lovett for providing access to an 8 cpu e4500.
* Move a bunch of flags from the KSE to the thread.julian2003-02-172-8/+7
| | | | | | | | I was in two minds as to where to put them in the first case.. I should have listenned to the other mind. Submitted by: parts by davidxu@ Reviewed by: jeff@ mini@
* - Split the struct kse into struct upcall and struct kse. struct kse willjeff2003-02-171-1/+1
| | | | | | | soon be visible only to schedulers. This greatly simplifies much the KSE code. Submitted by: davidxu
* - Move ke_sticks, ke_iticks, ke_uticks, ke_uu, ke_su, and ke_iu back intojeff2003-02-171-2/+2
| | | | | | | the proc. These counters are only examined through calcru. Submitted by: davidxu Tested on: x86, alpha, UP/SMP
* Fix the style of the SCHED_4BSD commit.obrien2003-02-131-1/+1
|
* Implement fpclassify():mike2003-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)
* Fix a problem in bus_dmamap_load_{mbuf,uio} when the first mbuf or the firstharti2003-02-041-8/+12
| | | | | | | | | | | | uio segment is empty. In this case no dma segment is create by bus_dmamap_load_buffer, but the calling routine clears the first flag. Under certain combinations of addresses of the first and second mbuf/uio buffer this leads to corrupted DMA segment descriptors. This was already fixed by tmm in sparc64/sparc64/iommu.c. PR: kern/47733 Reviewed by: sam Approved by: jake (mentor)
* Split statclock into statclock and profclock, and made the method for drivingjake2003-02-032-14/+12
| | | | | | | | | | | | | statclock based on profhz when profiling is enabled MD, since most platforms don't use this anyway. This removes the need for statclock_process, whose only purpose was to subdivide profhz, and gets the profiling clock running outside of sched_lock on platforms that implement suswintr. Also changed the interface for starting and stopping the profiling clock to do just that, instead of changing the rate of statclock, since they can now be separate. Reviewed by: jhb, tmm Tested on: i386, sparc64
* Put replace spaces with tabs in keeping with the rest of the file.joe2003-02-011-1/+1
|
* Reversion of commit by Davidxu plus fixes since applied.julian2003-02-013-4/+5
| | | | | | | | I'm not convinced there is anything major wrong with the patch but them's the rules.. I am using my "David's mentor" hat to revert this as he's offline for a while.
* SCSI Changers, SCSI Tapes, and SES devices work just about as well asmjacob2003-01-311-3/+3
| | | | anything else in sparc64.
* Fix another mistake in the bus_dmamem_alloc_size() thingscottl2003-01-291-2/+2
| | | | Submitted by: tmm
* Fix some more missing dt_ prefixes for dma tag fields.scottl2003-01-294-11/+11
|
* Fix a typo in dt_maxsize from the last commitscottl2003-01-291-1/+1
|
* Implement bus_dmamem_alloc_size() and bus_dmamem_free_size() asscottl2003-01-296-15/+146
| | | | | | | | | | | | | | | | | | | | 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)
* Enable device zs and device sab by default.jake2003-01-271-2/+2
|
* Fix standard kse breakage of non-x86 platforms.jake2003-01-261-2/+1
| | | | Pointy hat to: davidxu
* Move UPCALL related data structure out of kse, introduce a newdavidxu2003-01-262-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | data structure called kse_upcall to manage UPCALL. All KSE binding and loaning code are gone. A thread owns an upcall can collect all completed syscall contexts in its ksegrp, turn itself into UPCALL mode, and takes those contexts back to userland. Any thread without upcall structure has to export their contexts and exit at user boundary. Any thread running in user mode owns an upcall structure, when it enters kernel, if the kse mailbox's current thread pointer is not NULL, then when the thread is blocked in kernel, a new UPCALL thread is created and the upcall structure is transfered to the new UPCALL thread. if the kse mailbox's current thread pointer is NULL, then when a thread is blocked in kernel, no UPCALL thread will be created. Each upcall always has an owner thread. Userland can remove an upcall by calling kse_exit, when all upcalls in ksegrp are removed, the group is atomatically shutdown. An upcall owner thread also exits when process is in exiting state. when an owner thread exits, the upcall it owns is also removed. KSE is a pure scheduler entity. it represents a virtual cpu. when a thread is running, it always has a KSE associated with it. scheduler is free to assign a KSE to thread according thread priority, if thread priority is changed, KSE can be moved from one thread to another. When a ksegrp is created, there is always N KSEs created in the group. the N is the number of physical cpu in the current system. This makes it is possible that even an userland UTS is single CPU safe, threads in kernel still can execute on different cpu in parallel. Userland calls kse_create to add more upcall structures into ksegrp to increase concurrent in userland itself, kernel is not restricted by number of upcalls userland provides. The code hasn't been tested under SMP by author due to lack of hardware. Reviewed by: julian
* - Introduce the SCHED_ULE and SCHED_4BSD options for compile time selectionjeff2003-01-261-0/+1
| | | | | of the scheduler. - Add SCHED_4BSD as the scheduler for all kernel config files in cvs.
* Merge some code paths back together so that we only instantiate 1 copy ofjake2003-01-261-121/+97
| | | | the user tlb fault handlers.
* Moved some (gas) macros up so they can be used in more places.jake2003-01-241-25/+25
|
* Fixes for a number of problems in the IOMMU code:tmm2003-01-212-16/+23
| | | | | | | | | | | | | | | | | | | | | | | | | | 1.) Fix an off-by-one in the DVMA space handling, which would make it possible to allocate one page beyond the end of the DVMA area. This page was aliased to the first page. Apparently, this bug was responsible for the trashed nvram/eeprom some people were reporting, in conjunction with a number of unfortunate coincidences. 2.) Fix broken boundary and and lowaddr calculations. 3.) Fix a memory leak on an error path. 4.) Update a outdated comment to reflect the introduction of IOMMU_MAX_PRE, make the usage of IOMMU_MAX_PRE more consistent and KASSERT that the preallocation size is not 0. 5.) Fix a case where an error return was lost. 6.) When signalling an error to the caller by invoking the callback, do not use a segment pointer of NULL for compatability with existing drivers. Also, increase the maximum segment number to 64; it is rather arbitrary, with the exception of the of the stack space consumed by the segment array. Special thanks go to Harti Brandt <brandt@fokus.fraunhofer.de> for spotting 4 and 5, and testing many iterations of patches. Pointy hats to: tmm
* Fix iommu_dvmamap_sync(): it was still operating as if the BUS_DMASYNC_*tmm2003-01-211-5/+13
| | | | | | constants where flag bits (as in NetBSD), although they are consecutively numbered in FreeBSD. This would cause unnecessary flushing in the BUS_DMASYNC_POSTWRITE case, but was otherwise mostly harmless.
* Remove M_TRYWAIT/M_WAITOK/M_WAIT. Callers should use 0.alfred2003-01-2111-16/+16
| | | | Merge M_NOWAIT/M_DONTWAIT into a single flag M_NOWAIT.
* - Add a VM_WAIT in the appropriate cases where vm_page_alloc() fails and flagsjeff2003-01-211-16/+22
| | | | | | | | | | indicate that uma_small_alloc should not. This code should be refactored so that there is not so much cross arch duplication. Reviewed by: jake Spotted by: tmm Tested on: alpha, sparc64 Pointy hat to: jeff and everyone who cut and pasted the bad code. :-)
* Resolve relative relocations in klds before trying to parse the module'sjake2003-01-211-1/+23
| | | | | | | | | | | | metadata. This fixes module dependency resolution by the kernel linker on sparc64, where the relocations for the metadata are different than on other architectures; the relative offset is in the addend of an Elf_Rela record instead of the original value of the location being patched. Also fix printf formats in debug code. Submitted by: Hartmut Brandt <brandt@fokus.gmd.de> PR: 46732 Tested on: alpha (obrien), i386, sparc64
* The abs() function isn't defined locally; include a header file thatmdodd2003-01-161-0/+1
| | | | defines it.
* Merge all the various copies of vm_fault_quick() into a singledillon2003-01-161-15/+0
| | | | portable copy.
* Merge all the various copies of vmapbuf() and vunmapbuf() into a singledillon2003-01-151-73/+0
| | | | | | | | portable copy. Note that pmap_extract() must be used instead of pmap_kextract(). This is precursor work to a reorganization of vmapbuf() to close remaining user/kernel races (which can lead to a panic).
* - GC a few more hand-rolled 'abs' macros.mdodd2003-01-151-2/+0
| | | | - GC a few hand-rolled min()/max() macros while I'm here.
* Enable rl(4). It is now fully working using busdma.obrien2003-01-131-1/+1
|
* Don't allow user process to set an invalid window state through sigreturn.jake2003-01-102-4/+9
| | | | Spotted by: tmm
* Implement bus_space_subregion.jake2003-01-081-0/+10
|
OpenPOWER on IntegriCloud