summaryrefslogtreecommitdiffstats
path: root/sys/arch/sgi/include (follow)
Commit message (Collapse)AuthorAgeFilesLines
* Remove unused spllock().visa2018-08-201-2/+1
| | | | OK deraadt@ mpi@
* Include <sys/mutex.h> instead of <machine/mutex.h>mpi2018-01-221-2/+2
| | | | required by upcoming MI mutex change.
* Add a dummy (for now) <machine/reloc.h> for mips64 to fix build.visa2017-08-121-0/+5
| | | | OK guenther@
* Define MAXCPUS per mips64 port.visa2017-07-301-1/+2
|
* Define register_splx_handler() in one place.visa2017-06-111-13/+2
|
* The device_to_pa routine really isn't needed. We always have physicalvisa2017-05-111-4/+4
| | | | | | | addresses. While there, pave the way for BUS_DMA_64BIT (not working yet). Diff from miod@; OK dlg@
* add a BUS_DMA_64BIT flag to bus_dma on all our archs.dlg2017-05-081-1/+2
| | | | | | | | | this is so drivers can advertise that they can handle 64 dma addresses to the platform. it may choose to handle dmamaps differently based on this flag. tweaks and ok tom@ ok kettenis@
* Let MP-safe interrupt handlers run without the kernel lock on sgi.visa2017-02-111-2/+3
| | | | OK miod@
* Rename mips64's trap_frame into trapframe.mpi2016-03-061-3/+3
| | | | | | For coherency with other archs and in order to use it in MI code. ok visa@, tobiasu@
* Add IPI logic. Assign two additional interrupts for inter-processorvisa2015-12-251-1/+3
| | | | | | signalling as a workaround to a limitation in the hub interrupt code, to allow four CPUs per node. At the moment, multi-node setups are not supported.
* Make interrupt masking MP-aware. Linux IP27 and IP35 ports served as avisa2015-12-251-1/+2
| | | | substitute for hardware documentation.
* Use the ErrorEPC register for curcpu() on Origin, for now.visa2015-12-251-4/+11
|
* Use consistant whitespace/comments for #define'ing LABELSECTOR,krw2015-09-301-4/+4
| | | | | LABELOFFSET and MAXPARTITIONS. Easier on the eye when scanning through all these files. No functional change.
* intr_barrier(9) for loongson, octeon and sgi.kettenis2015-09-131-1/+3
|
* The mplock implementations on MP-enabled mips64 platforms, octeon andvisa2015-09-091-51/+2
| | | | | | | sgi, are identical. Put one implementation in mips64 and drop the platform-specific copies, to remove duplicated code. ok miod@
* Remove {LOAD,COUNT}_TEXTA from libsa loadfile, it only made sense for a.outmiod2015-07-171-3/+3
| | | | kernels and we no longer have any.
* unify the mutex implementations on all the mips64 platforms.dlg2015-07-082-73/+5
| | | | | | | | this basically copies the sgi implementation to mips64 and removes it from the rest. this way they get an optimised UP mutex implementation and correct asserts on all platforms. ok miod@ jmatthew@
* rework sgi mutexes to use the owner pointer as the lock.dlg2015-04-211-6/+5
| | | | | | | | | | | | | | | | | | | | | | | | | this is like src/sys/arch/alpha/alpha/mutex.c r1.14. this changes sgi mutexes so they record which cpu owns the lock rather than just if the lock is held or not. the diagnostics compare the owner to the current cpus curcpu() address so they can actually tell if the current cpu holds the lock instead of whether any cpu holds the lock. instead of using custom asm to implement a cas this uses atomic_cas_ptr. while im here i also shuffled the code. on MULTIPROCESSOR systems instead of duplicating code between mtx_enter and mtx_enter_try, mtx_enter simply loops on mtx_enter_try until it succeeds. this also provides an alternative implementation of mutexes on !MULTIPROCESSOR systems that avoids interlocking opcodes. mutexes wont contend on UP boxes, theyre basically wrappers around spls. we can just do the splraise, stash the owner as a guard value for DIAGNOSTIC and return. similarly, mtx_enter_try on UP will never fail, so we can just call mtx_enter and return 1. tested by and ok miod@
* Remove stale comment which used to explain why we had a special 31-bit freelistmiod2014-07-131-12/+1
| | | | for DMA, back when this was applicable.
* Support BUS_DMA_NOCACHE in bus_dma(9). Memory allocations done withmiod2014-03-101-15/+16
| | | | | | BUS_DMA_NOCACHE (or BUS_DMA_COHERENT if the platform does not have coherent caches) will use PMAP_NOCACHE when invoking pmap_enter(), to avoid creating cached mappings, and then evicting them from the cache.
* Rework the per-cpu cache information. Use a common struct to store the linemiod2014-03-091-2/+1
| | | | | | | size, the number of sets, and the total size (and the set size, for convenience) per cache (I$, D$, L2, L3). This allows cpu.c to print the number of ways (sets) of L2 and L3 caches from the cache information, rather than hardcoding this from the processor type.
* To prevent lock ordering problems with the kernel lock, we need to make surekettenis2014-02-101-3/+18
| | | | | | | | | | | we block all interrupts that can grab the kernel lock. The simplest way to achieve this is to make sure mutexes always raise the ipl to the highest level that has interrupts that grab the kernel lock. This will allow us to have "mpsafe" interrupt handlers at lower priority levels. No change for non-MULTIPROCESSOR kernels. ok miod@
* Remove support for a.out and ecoff. We only do elf now.deraadt2013-10-171-5/+0
| | | | ok miod
* add missing license (PD) blockjasper2013-06-012-4/+4
| | | | ok guenther@
* Add a dummy IPL_MPSAFE definition.kettenis2013-05-171-1/+4
| | | | ok miod@, mikeb@
* Unify the zs tty driver.sebastia2013-04-211-2/+2
| | | | | | | | | | Most of the hard work by mpi@, who provided the initial diff. Fixes for sparc from myself. Tested on sgi and sparc myself. Compiles and detects zstty on my powerbook, compile tested on sparc64 by me. Real testing with zs device on sparc64 by miod@ who also gave a lot of help and feedback. ok miod@, mpi@
* Add __strong_alias macros for all architectures to be able to aliasmartynas2013-03-281-6/+1
| | | | | another symbol without weak attribute. To be used in libc and libm soon. Agreed by kettenis@, guenther@, matthew@.
* refactor sys/param.h and machine/param.h. A lot of #ifdef _KERNEL is addedderaadt2013-03-231-11/+6
| | | | | | | to keep definitions our of user space. The MD files now follow a consistant order -- all namespace intrusion is at the tail can be cleaned up independently. locore, bootblocks, and libkvm still see enough visibility to build. Checked on 90% of platforms...
* create new machine/_float.h which is namespace clean. create a newderaadt2012-06-263-8/+3
| | | | | | | | | MI float.h which pulls in and defines the values that are needed from there, and repair sys/limits.h so that it defines the values it needs as well (depending on POSIX version, XPG version, etc). guenther has a more exact selection of that coming for limits.h. this also fixes a few mistakes for the vax. reviewed by kettenis and guenther.
* Add cache operation functions pointers to struct cpu_info; the variousmiod2012-06-242-26/+3
| | | | | | | | | cache lines and sizes are already there, after all. The ConfigCache cache routine is responsible for filling these function pointers; cache routine invocation macros are updated to use the cpu_info fields, but may still be overriden in <machine/cpu.h> on platforms where only one set of cache routines is used.
* Using the LLAddr register to store our curcpu() pointer on R10k SMP kernelsmiod2012-06-171-6/+28
| | | | | | | | | | was a nice trick, but this register is only 32-bit wide and will be sign-extended, which requires all cpu_info structs to be allocated within 2GB physical - something which may not be possible on some configurations. This diff changes IP30.MP kernels to no longer use LLAddr to store curcpu, but use unused fields of the MPConf structure in low memory, indexed with the physical processor id, which can be obtained from the Heart PRID register.
* Make it possible to disable the Sync-on-Green signal by setting themikeb2012-05-291-1/+2
| | | | | | | | ARCBios environment variable OSLoadOptions to "nosog". Now everyone can enjoy running O2 without an SGI monitor and don't turn vegetarian afterwards. All the essential bits come from NetBSD's crmfb driver except they've chosen to use a "SyncOnGreen" variable not saved by the ARCS. Pointers and corrections from and ok miod, jsing
* Proper support for the so-called `fast mode' of the Indigo2 ECC memorymiod2012-05-271-1/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | controller. In this mode, access to physical memory are not allowed to bypass the cache, and this allows the memory subsystem to run faster. Of course, some device drivers will require uncached memory access (e.g. for proper HPC DMA descriptor operation). New ip22-specific functions to switch between `fast mode' and `slow mode' are introduced. hpc(4) now provides read and write routines to fetch a dma descriptor from uncached memory into a local copy, and update it from said modified copy. On systems without the ECC MC, these will do nothing and operation will continue to access the uncached memory directly. On systems with the ECC MC, they will perform a copy, and the writeback will be done in slow mode. bus_dmamem_map() requests for DMA memory with BUS_DMA_COHERENT set in flags, which would return uncached memory, will now always fail on systems with the ECC memory controller. Drivers which really need uncached memory, and are aware of this particular setup, will now pass BUS_DMA_COHERENT | BUS_DMA_BUS1, which will let the request succeed. sq(4) will use all of the above to work mostly unmodified on ECC MC systems in fast mode. Finally, fast mode is enabled after autoconf. Tested on IP22 and IP28.
* It turns out that, when the IRIX header files mention CTR/DCD/DTR/RTS wiringmiod2012-05-121-2/+2
| | | | | | | | | | | | | | | is inverted on Indigo, this just means that Indigo does not use the same values as the later models. It does not mean that the Indigo is using wrong values, which is how I first read this. In reality, Indigo systems use the expected values of these signals being active low, while later designs use active high signals. So yes, some systems have inverted values - but the ones which need compensating are not those I thought. Change the logic to do TRT, but keep the device flags check, to be able to force the other behaviour if the kernel guesses wrongly. Tested on Indigo, Indy and Indigo 2.
* I am not sure what the mess with the wiring of carrier lines on Indigo resolvesmiod2012-04-291-1/+3
| | | | | to, so make this controllable with device flags, and default to non-bogus wiring.
* Rework the signature of the cache handling routines again. It makes more sensemiod2012-04-212-11/+11
| | | | | | | | | | | | to pass both the virtual and physical addresses of the page to clean to SyncDCachePage, which is the only routine using `Index' operations on the data cache, which might be virtually indexed at some levels but physically indexed at others. On the other hand, it does not make any sense to pass a physical address to routines using `Hit' operations (and they were discarding them anyway). In addition to making things cleaner, this fixes sporadic userland misbehaviour (read: SIGSGEV) on RM7000 O2 systems.
* Default DMA-reachable address constraints to the whole address space, andmiod2012-04-031-1/+2
| | | | | | | | | narrow these in the various ipXX_machdep.c. On IP22-like systems, narrow them to 28 bit physical addresses, but unpessimize this by extending this to 32 bit after autoconf, if no 28-bit limited hpc(4) device has been found. Since physical memory on these systems start at 128MB, this means that Indigo systems with more than 128MB memory will behave correctly (and so will Indy systems with E++ boards and more than 128MB memory).
* Work in progress support for the SGI Indigo, Indigo 2 and Indy systemsmiod2012-03-283-1/+191
| | | | | | | | | | | | | | | | | | | | | | | | | (IP20, IP22, IP24) in 64-bit mode, adapated from NetBSD. Currently limited to headless operation, input and video drivers will get ported soon. Should work on all R4000, R4440 and R5000 based systems. L2 cache on R5000SC Indy not supported yet (coming soon), R4600 not supported yet either (coming soon as well). Tested to boot multiuser on: Indigo2 R4000SC, Indy R4000PC, Indy R4000SC, Indy R5000SC, Indigo2 R4400SC. There are still glitches in the Ethernet driver which are being looked at. Expansion support is limited to the GIO E++ board; GIO boards with PCI-GIO bridges not ported yet due to the lack of hardware, and this kind of driver does not port blindly. Most of this work comes from NetBSD, polishing and integration work, as well as putting as many ``R4x00 in 64-bit mode'' erratas as necessary, by yours truly. More work is coming, as well as trying to get some easy way to boot install kernels (as older PROM can only boot ECOFF binaries, which won't do for the kernel).
* Move cache handling routines related definitions to a dedicated header file,miod2012-03-251-6/+6
| | | | rather than abusing <machine/cpu.h>.
* Change the page size computation logic to default to 16KB pages, and onlymiod2012-03-191-4/+6
| | | | | | | | restrict to 4KB if the kernel is configured with R5000 or RM7000 family support. Allow the kernel configuration to override this if it knows better (e.g. an upcoming kernel configuration with support for R5000, but where physical memory on R5000 systems fits within the first 512MB).
* No longer allow bus_space_barrier() to be a NULL pointer on a givenmiod2012-03-151-5/+2
| | | | | bus_space_tag on sgi, but rather always provide at least a dummy asm("sync") flavour. Saves a function pointer test at runtime.
* Specify the TLS variant for each platform.guenther2011-10-271-0/+3
|
* Remove the freelist member from vm_physsegoga2011-05-301-4/+1
| | | | | | | | | | | | | | | | | | The new world order of pmemrange makes this data completely redundant (being dealt with by the pmemrange constraints instead). Remove all code that messes with the freelist. While touching every caller of uvm_page_physload() anyway, add the flags argument to all callers (all but one is 0 and that one already used PHYSLOAD_DEVICE) and remove the macro magic to allow callers to continue without it. Should shrink the code a bit, as well. matthew@ pointed out some mistakes i'd made. ``freelist death, I like. Ok.' ariane@ `I agree with the general direction, go ahead and i'll fix any fallout shortly'' miod@ (68k 88k and vax i could not check would build)
* - enable fenvmartynas2011-04-281-0/+3
| | | | - add nearbyint, nearbyintf and nearbyintl implemented using fenv
* On IP27 systems, fill the array of node hub widget numbers early, so that allmiod2011-04-171-1/+4
| | | | | | hubs are known during autoconf. Then, pick the most populated 2GB window as our DMA memory window. xbridge(4) can thus program the correct settings regardless of the order in which the xbow(4) attach.
* Rename a few xbow global variable names to make them less ambiguous.miod2011-04-051-1/+6
| | | | | | | | | Remember the hub widget number of each node, instead of only the master node. Use this in xbridge to compute the proper direct DMA map configuration register value (it needs to embed the hub widget number matching the physical address range). This should allow us to pick memory from a different node than the one we booted from, as the DMA window, if wanted.
* Normalize sentinel. Use _MACHINE_*_H_ and _<ARCH>_*_H_ properly and consitently.pirofti2011-03-236-24/+24
| | | | Discussed and okay drahn@. Okay deraadt@.
* Convert netisr to a normal soft interrupt instead of hanving MD codeclaudio2010-12-211-6/+1
| | | | | | 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@
* FPU control/status register defines, and upcoming userland functionmiod2010-09-171-0/+3
| | | | prototypes to allow control of the FPU c/sr FS field.
* move machine dependent GET_CPU_INFO(), getcurcpu(), setcurcpu() to arch/sgi. ok miod@syuu2010-09-112-3/+10
|