summaryrefslogtreecommitdiff
path: root/sys/arch/sparc/include
AgeCommit message (Collapse)Author
2011-03-23Normalize sentinel. Use _MACHINE_*_H_ and _<ARCH>_*_H_ properly and consitently.Paul Irofti
Discussed and okay drahn@. Okay deraadt@.
2011-03-11Use _MACHINE_ENDIAN_H_ for this is The Right Thing To Do.Paul Irofti
Okay guenther@, millert@.
2010-12-26Kill pmap_phys_address(), and force every driver's mmap() routine to returnMiod Vallat
a physical address [more precisely, something suitable to pass to pmap_enter()'sphysical address argument]. This allows MI drivers to implement mmap() routines without having to know about the pmap_phys_address() implementation and #ifdef obfuscation.
2010-12-21Convert netisr to a normal soft interrupt instead of hanving MD codeClaudio Jeker
for it. This makes the netisr a real C function which will help further development. No noticable performance change on i386 and amd64. With input from kettenis@ and miod@ additional OKs mikeb@ and henning@
2010-12-15oops, i forgot to check in the BRKSIZ define in uvm, but deraadt thinksTed Unangst
its better as a per arch MD define anyway. all default to MAXDSIZ as before.
2010-12-06Change the signature of PMAP_PREFER from void PMAP_PREFER(..., vaddr_t *) toMiod Vallat
vaddr_t PMAP_PREFER(..., vaddr_t). This allows better compiler optimization when the function is inlined, and avoids accessing memory on architectures when we can pass function arguments in registers.
2010-11-27Remove ddb single-step load and store counters. Most platforms do notMiod Vallat
implement them, and they are of questionable usefulness.
2010-11-27Misaligned load/store recovery code in the kernel, enabled by T_FIXALIGNMiod Vallat
userland traps on a per-process basis, were necessary for *some* SunOS binaries on sparc, which had to compiled with explicit misaligned access code generation (i.e. for vendors to release a working SunOS/sparc version of their code until they could fix their bogus code). There is no reason to keep this code on sparc64, and now that we don't provide COMPAT_SUNOS anymore, there is no reason to keep this code on sparc. ok kettenis@
2010-09-05Fix inline assembler to make it acceptable to gcc4. Similar to what we'veMark Kettenis
done to sparc64 a couple of months ago. ok miod@
2010-07-21Fix more cdev initializations which were using enodev for poll; ok kettenisTheo de Raadt
2010-07-11typoMiod Vallat
2010-07-10sun4e (i.e. SPARCengine 1e) support. This platform is a mix between sun4 andMiod Vallat
sun4c, as it has a sun4c OpenPROM but a sun4 8KB pagesize. VME devices are not supported yet. ok deraadt@
2010-07-02remove support for compat_sunos (and m68k4k). ok deraadt guentherTed Unangst
2010-06-29In the boot blocks, stop assuming we have a 1:1 mapping of low physicalMiod Vallat
memory, but instead gather memory layout information and work with the MMU (or the PROM) to make sure we can actually load the kernel image in a proper contiguous physical memory area. In order to do this, we look at the kernel image twice; during the first pass, the kernel footprint is computed, and then after making sure it can be loaded, the second pass loads the actual image. Since such a logic doesn't work on media which can not seek backwards, such as tapes, we check for the boot device being a tape and, in that case, assume a fixed (generous) image size and don't load the kernel symbol table (to avoid seeking backwards); since tape boot is supposed to be only used to boot bsd.rd, this is something we can live with. While there, lower the address the boot blocks are loaded in memory, because the last crank did not work with some early sun4c OpenPROM, which only map about 3.5MB of memory. Memory games logic from NetBSD, tape handling by me.
2010-06-29During kernel bootstrap, stop assuming the kernel image has been loaded inMiod Vallat
low physical memory, but instead figure out where it has been loaded from the current MMU setup. From NetBSD.
2010-06-29There is absolutely no need to double map DVMA addresses into the kernel addressMiod Vallat
space on SRMMU systems (i.e. sun4m), so don't do it anymore and update misleading comments.
2010-06-27Add the TPOFF* and DTP{MOD,OFF}* definitions that ld.so will need forPhilip Guenthe
doing thread-local storage and fix a typo in one that was already defined. ok kettenis@ drahn@
2010-06-27uvm constraints. Add two mandatory MD symbols, uvm_md_constraintsThordur I. Bjornsson
which contains the constraints for DMA/memory allocation for each architecture, and dma_constraints which contains the range of addresses that are dma accessable by the system. This is based on ariane@'s physcontig diff, with lots of bugfixes and additions the following additions by my self: Introduce a new function pool_set_constraints() which sets the address range for which we allocate pages for the pool from, this is now used for the mbuf/mbuf cluster pools to keep them dma accessible. The !direct archs no longer stuff pages into the kernel object in uvm_km_getpage_pla but rather do a pmap_extract() in uvm_km_putpages. Tested heavily by my self on i386, amd64 and sparc64. Some tests on alpha and SGI. "commit it" beck, art, oga, deraadt "i like the diff" deraadt
2010-06-18Remove IOMMU pte defines; only those in iommureg.h are used.Miod Vallat
2010-06-07Nuke old eeprom.h compatibility defines; ok todd@Miod Vallat
2010-06-06typo in commentMiod Vallat
2010-05-15Make fb_pfour_id() take a volatile pointer as argument.Miod Vallat
2010-04-22Committing on behalf or ariane@.Owain Ainsworth
recommit pmemrange: physmem allocator: change the view of free memory from single free pages to free ranges. Classify memory based on region with associated use-counter (which is used to construct a priority list of where to allocate memory). Based on code from tedu@, help from many. Useable now that bugs have been found and fixed in most architecture's pmap.c ok by everyone who has done a pmap or uvm commit in the last year.
2010-04-21more cleanup to cope with the change that tries to make proc.h not actTheo de Raadt
like it is everything.h ok tedu
2009-12-25Fix (currently unused) bus_space_vaddr() return value.Miod Vallat
2009-11-27Move MB_LEN_MAX into the machine-independent sys/limits.h header,Philip Guenthe
rather than defining it separately for each architecture. Also set it to 4, to accommodate for future UTF-8 support (rfc3629). Diff by stsp, committing to catch the libc major bump ok kettenis@, guenther@
2009-11-04Get rid of __HAVE_GENERIC_SOFT_INTERRUPTS now that all our platforms support it.Mark Kettenis
ok jsing@, miod@
2009-11-02s/hz/Hz/ on multiples of the SI unit hertz other than MHz.Igor Sobrado
reminded by STeve Andre.
2009-07-30Make sure the BUS_SPACE_BARRIER_xxx constants are all non-zero and can beMiod Vallat
or'ed together, even on platforms where bus_space_barrier() ignores the barrier argument yet.
2009-07-26Make sure all platforms understand the flags argument of bus_space_map() andMiod Vallat
bus_space_alloc() as a bitmask of flags, and not a boolean controlling cacheability; and make sure the three MI BUS_SPACE_MAP_xxx values documented in the manual page are defined on all platforms as well.
2009-07-13Add a somewhat minimal bus_dma(9) implementation. Only fully implemented forMark Kettenis
the sun4m iommu. Bits and pieces from NetBSD, with some additional tweaks and a bus_dmamap_load_mbuf() implementation from myself. ok miod@
2009-07-12Add protection against multiple inclusion.Mark Kettenis
ok miod@
2009-04-10generic soft interrupts support for sparc. Soft interrupt handlers are nowMiod Vallat
kept in a separate intrhand array, with their own enable bits so that soft interrupts sharing the same level only get invoked if really triggered. Inspired by NetBSD with significant changes. ok kettenis@
2009-03-26Remove cpu_wait(). It's original use was to be called from the reaper soOwain Ainsworth
MD code would free resources that couldn't be freed until we were no longer running in that processor. However, it's is unused on all architectures since mikeb@'s tss changes on x86 earlier in the year. ok miod@
2009-03-15Introduce splsoftassert(), similar to splassert() but for soft interruptMiod Vallat
levels. This will allow for platforms where soft interrupt levels do not map to real hardware interrupt levels to have soft ipl values overlapping hard ipl values without breaking spl asserts.
2009-02-26Add a two new ioctls to the apm(4) interface.Owain Ainsworth
APM_IOC_{SUSPEND,STANDBY}_REQ: This is to fix an issue with apm suspend where a call to zzz suspended the machine immediately, not giving anyone listening for apm events (other than apmd) a chance to deal with the upcoming change. This hit X hard since the introduction of drm, since it needs to have time to idle the 3d engine and otherwise get the device into a recoverable state. Such things are needed until we support modesetting in the kernel. Now, instead of forcing a suspend, using ioctl sends out an event similar to if you had put the lid down, giving all userland applications a chance to reply. tested by sthen@ and beck@, especial thanks to sthen for sitting there while I tried to debug this remotely, I owe him beer. Prompted by and ok deraadt@
2009-02-12Keep track of resident pages in pm_stats, and use this to implement a realMiod Vallat
pmap_resident_count(). From NetBSD
2008-12-11revert back to 1.4, since there's still some code that uses this; pointedMartynas Venckus
out by theo
2008-12-09sparc does not have extended precision, therefore remove unusedMartynas Venckus
definitions. ok millert@. tested by jsg@
2008-11-29Iain Hibbert (plunky@netbsd) removed clauses 3 and 4 from hisRay Lai
licenses as well. Thanks! "Groovy" deraadt
2008-10-23Move the va_copy define to <sys/stdrag.h> making sure it is uniformalyMark Kettenis
protected by __ISO_C_VISIBLE > 1999. With a little help from miod@. ok miod@
2008-09-07- replace dtoa w/ David's gdtoa, version 2008-03-15Martynas Venckus
- provide proper dtoa locks - use the real strtof implementation - add strtold, __hdtoa, __hldtoa - add %a/%A support - don't lose precision in printf, don't round to double anymore - implement extended-precision versions of libc functions: fpclassify, isnan, isinf, signbit, isnormal, isfinite, now that the ieee.h is fixed - separate vax versions of strtof, and __hdtoa - add complex math support. added functions: cacos, casin, catan, ccos, csin, ctan, cacosh, casinh, catanh, ccosh, csinh, ctanh, cexp, clog, cabs, cpow, csqrt, carg, cimag, conj, cproj, creal, cacosf, casinf, catanf, ccosf, csinf, ctanf, cacoshf, casinhf, catanhf, ccoshf, csinhf, ctanhf, cexpf, clogf, cabsf, cpowf, csqrtf, cargf, cimagf, conjf, cprojf, crealf - add fdim, fmax, fmin - add log2. (adapted implementation e_log.c. could be more acruate & faster, but it's good enough for now) - remove wrappers & cruft in libm, supposed to work-around mistakes in SVID, etc.; use ieee versions. fixes issues in python 2.6 for djm@ - make _digittoint static - proper definitions for i386, and amd64 in ieee.h - sh, powerpc don't really have extended-precision - add missing definitions for mips64 (quad), m{6,8}k (96-bit) float.h for LDBL_* - merge lead to frac for m{6,8}k, for gdtoa to work properly - add FRAC*BITS & EXT_TO_ARRAY32 definitions in ieee.h, for hdtoa&ldtoa to use - add EXT_IMPLICIT_NBIT definition, which indicates implicit normalization bit - add regression tests for libc: fpclassify and printf - arith.h & gd_qnan.h definitions - update ieee.h: hppa doesn't have quad-precision, hppa64 does - add missing prototypes to gdtoaimp - on 64-bit platforms make sure gdtoa doesn't use a long when it really wants an int - etc., what i may have forgotten... - bump libm major, due to removed&changed symbols - no libc bump, since this is riding on djm's libc major crank from a day ago discussed with / requested by / testing theo, sthen@, djm@, jsg@, merdely@, jsing@, tedu@, brad@, jakemsr@, and others. looks good to millert@ parts of the diff ok kettenis@ this commit does not include: - man page changes
2008-07-22Do not define VM_MIN_ADDRESS as __LDPGSZ, but provide its value, to preventMiod Vallat
uvm_map.c from requiring <machine/exec.h>.
2008-07-21- add proper double_t and float_t definitions for each archMartynas Venckus
- math.h shouldn't define FLT_EVAL_METHOD, but float.h should (per C99). remove from math.h, and add proper definitions in float.h ok millert@
2008-07-18Add a macro that clears the want_resched flag that need_resched sets.Artur Grabowski
Right now when mi_switch picks up the same proc, we didn't clear the flag which would mean that every time we service an AST we would attempt a context switch. For some architectures, amd64 being probably the most extreme, that meant attempting to context switch for every trap and interrupt. Now we clear_resched explicitly after every context switch, even if it didn't do anything. Which also allows us to remove some more code in cpu_switchto (not done yet). miod@ ok
2008-06-26First pass at removing clauses 3 and 4 from NetBSD licenses.Ray Lai
Not sure what's more surprising: how long it took for NetBSD to catch up to the rest of the BSDs (including UCB), or the amount of code that NetBSD has claimed for itself without attributing to the actual authors. OK deraadt@
2008-06-24On user/kernel shared page table machines, do not let processes map theirTheo de Raadt
own page 0, as discussed with miod (and many others previously, including art and toby). On sparc, make this __LDPGSZ because PAGE_SIZE is non-constant ok miod tedu
2008-03-22- remove pre-uvm prototype of pmap_page_index()Jasper Lievisse Adriaanse
ok miod@
2007-12-15Remove a lot of symbols from the namespace, otherwise sys/sysctl.h andTheo de Raadt
rpc/pmap_prot.h collide.. "struct pmap" from the kernel should not make it out to userland. ok miod
2007-11-28ctob/btoc -> ptoa/atopMartin Reindl
from Rodolfo Gouveia