summaryrefslogtreecommitdiffstats
path: root/sys/sparc64
Commit message (Collapse)AuthorAgeFilesLines
* Fix KBI breakage by r190520 which affects older linux.ko binaries:dchagin2009-04-051-2/+2
| | | | | | | | | | | | | | 1) Move the new field (brand_note) to the end of the Brandinfo structure. 2) Add a new flag BI_BRAND_NOTE that indicates that the brand_note pointer is valid. 3) Use the brand_note field if the flag BI_BRAND_NOTE is set and as old modules won't have the flag set, so the new field brand_note would be ignored. Suggested by: jhb Reviewed by: jhb Approved by: kib (mentor) MFC after: 6 days
* Revert r190105 so that removing options KDB but DDB or GDB beingmarius2009-03-201-0/+2
| | | | | available will cause the kernel to not respect -d and boot_kdb=1 for consistency with the other platforms as pointed out by marcel@.
* Hook up the generic OFW pnpinfo string method.marius2009-03-195-0/+5
|
* Bring the implementation of the pnpinfo string function more inmarius2009-03-191-8/+6
| | | | line with the rest of this file.
* - As suggested by OpenSolaris use up-burst-sizes for determining themarius2009-03-192-45/+54
| | | | | | | | | | supported burst sizes. - Add support for 64-bit burst sizes (required for SBus GEM). - Failing to register as interrupt controller during attach shouldn't be fatal so just inform about this instead of panicing. - Take advantage of KOBJMETHOD_END. - Remove some redundant variables. - Add missing const.
* Add device found in B100.marius2009-03-191-1/+2
|
* Sort include.marius2009-03-191-1/+1
|
* - Ensure we find no unexpected partner.marius2009-03-192-53/+60
| | | | | | | | | | | | | | | | | | | | | | | - Failing to register as interrupt controller during attach shouldn't be fatal so just inform about this instead of panicing. - Disable rerun of the streaming cache as workaround for a silicon bug of certain Psycho versions. - Remove the comment regarding lack of newbus'ified bus_dma(9) as being able to associate a DMA tag with a device would allow to implement CDMA flushing/syncing in bus_dmamap_sync(9) but that would totally kill performance. Given that for devices not behind a PCI-PCI bridge the host-to-PCI bridges also only do CDMA flushing/syncing based on interrupts there's no additional disadvantage for polling(4) callbacks in the case schizo(4) has to do the CDMA flushing/syncing but rather a general problem. - Don't panic if the power failure, power management or over-temperature interrupts doesn't exist as these aren't mandatory and not available with all controllers (not even Psychos). [1] - Take advantage of KOBJMETHOD_END. - Remove some redundant variables. - Add missing const. PR: 131371 [1]
* - Take advantage of KOBJMETHOD_END.marius2009-03-191-9/+13
| | | | | | | | | - Hook up the streaming buffer (not used by iommu(4) by default, yet) if available and usable. [1] - Move the message regarding belated registration as interrupt control under bootverbose as this isn't something the user should worry about. Tested by: Michael Moll [1]
* - There's no need to wrap kdb_active and kdb_trap() in #ifdef KDB asmarius2009-03-192-15/+5
| | | | | | | | | they're always available. - Remove unused variable. [1] - Add a missing const. - Sort includes. Submitted by: Christoph Mallon [1]
* - Remove the delay in cpu_mp_shutdown() which is no longer necessary sincemarius2009-03-191-12/+2
| | | | | we have stopped using SUNW,stop-self with r186395. - There's no need to wrap kdb_active in #ifdef KDB as it's always available.
* There's no need to wrap kdb_enter() in #ifdef KDB as it's always available.marius2009-03-191-2/+0
|
* Take advantage of KOBJMETHOD_END.marius2009-03-192-2/+2
|
* Take advantage of KOBJMETHOD_END.marius2009-03-194-4/+4
|
* Remove the uscanner(4) driver, this follows the removal of the kernel scannerthompsa2009-03-191-1/+0
| | | | | | | driver in Linux 2.6. uscanner was just a simple wrapper around a fifo and contained no logic, the default interface is now libusb (supported by sane). Reviewed by: HPS
* - Sort device methods.marius2009-03-196-22/+22
| | | | - Take advantage of KOBJMETHOD_END.
* - Failing to register as interrupt controller during attach shouldn'tmarius2009-03-192-38/+41
| | | | | | | be fatal so just inform about this instead of panicing. - Sort device methods. - Take advantage of KOBJMETHOD_END. - Remove some redundant variables.
* Add missing const.marius2009-03-181-5/+5
|
* Add AT_EXECPATH ELF auxinfo entry type. The value's a_ptr is a pointerkib2009-03-171-4/+2
| | | | | | | | | | to the full path of the image that is being executed. Increase AT_COUNT. Remove no longer true comment about types used in Linux ELF binaries, listed types contain FreeBSD-specific entries. Reviewed by: kan
* Implement new way of branding ELF binaries by looking to adchagin2009-03-131-2/+4
| | | | | | | | | | | | ".note.ABI-tag" section. The search order of a brand is changed, now first of all the ".note.ABI-tag" is looked through. Move code which fetch osreldate for ELF binary to check_note() handler. PR: 118473 Approved by: kib (mentor)
* Uncomment txp(4), txp(4) should work on all architectures.yongari2009-03-121-1/+1
|
* Change over the usb kernel options to the new stack (retaining existingthompsa2009-02-231-58/+5
| | | | naming). The old usb stack can be compiled in my prefixing the name with 'o'.
* Add uslcom to the build too.thompsa2009-02-151-0/+1
| | | | Reminded by: Michael Butler
* Switch over GENERIC kernels to USB2 by default.thompsa2009-02-151-5/+56
| | | | Tested by: make universe
* Improve r185008 so the streaming cache is only flushed whenmarius2009-02-102-8/+11
| | | | a mapping actually met the threshold.
* - Use the generally more appropriate PROM base rather than themarius2009-02-101-1/+1
| | | | | | | | | kernel one as the non-faulting flush address in the loader so we can can change KERNBASE and VM_MIN_KERNEL_ADDRESS if we ever want to without needing to worry about using a compatible loader. - Correctly check for LOADER_DEBUG. - Add a missing const for page_sizes[].
* - Currently the PMAP code is laid out to let the kernel TSB cover themarius2009-01-013-2/+29
| | | | | | | | | | | whole KVA space using one locked 4MB dTLB entry per GB of physical memory. On Cheetah-class machines only the dt16 can hold locked entries though, which would be completely consumed for the kernel TSB on machines with >= 16GB. Therefore limit the KVA space to use no more than half of the lockable dTLB slots, given that we need them also for other things. - Add sanity checks which ensure that we don't exhaust the (lockable) TLB slots.
* - According to comments in OpenBSD, E{2,4}50 tend to have fragilemarius2008-12-221-28/+12
| | | | | | | | | | | | | | | | | | | | | | | | | firmware versions which wedge when using the OFW test service, so given that we don't really depend on SUNW,stop-self just nuke it altogether instead of risking problems. - At least Fire V880 have a small hardware glitch which causes the reception of IDR_NACKs for CPUs we actually haven't tried to send an IPI to, even not as part of the initial try. According to tests this apparently can be safely ignored though, so just return if checking for the individual IDR_NACKs indicates no outstanding dispatch. Serializing the sending of IPIs between MD and MI code by the combined usage of smp_ipi_mtx makes no difference to this phenomenon. [1] - Provide relevant debugging bits already with the initial panic in case of problems with the IPI dispatch, which would have allowed to diagnose the above problem without a specially built kernel. - In case of cheetah_ipi_selected() base the delay we wait for other CPUs which also might want to dispatch IPIs on the total amount of CPUs instead of just the number of CPUs we let this CPU send IPIs to because in the worst case all CPUs also want to IPI us at the same time. Reported and access for extensive tests provided by: Beat Gaetzi [1]
* Modularize the Open Firmware client interface to allow run-time switchingnwhitehorn2008-12-206-22/+27
| | | | | | | | | | | | of OFW access semantics, in order to allow future support for real-mode OF access and flattened device frees. OF client interface modules are implemented using KOBJ, in a similar way to the PPC PMAP modules. Because we need Open Firmware to be available before mutexes can be used on sparc64, changes are also included to allow KOBJ to be used very early in the boot process by only using the mutex once we know it has been initialized. Reviewed by: marius, grehan
* - Failing to register as interrupt controller during attach shouldn'tmarius2008-12-181-10/+35
| | | | | | | | | | | | | | | | be fatal so just inform about this instead of panicing. - Ensure we use the right softc in case the interrupt of a child is is routed to the companion PBM instead. This hasn't been seen in the wild so far but given that it's the case for the Schizo interrupts, handling this situation also for child interrupts as a precaution seemed a good idea. - Deal with broken firmware versions which miss child entries in the ino-bitmap as seen on V880 by belatedly registering as interrupt controller in schizo_setup_intr(). [1] - Add missing '\n' when printing the warning regarding Schizo Errata I-13. Reported and tested by: Beat Gaetzi [1]
* Make gpart the default partitioning class on all platforms.marcel2008-12-171-2/+2
| | | | | | | Both ia64 and powerpc were using gpart exclusively already so there's no change for those two. Discussed on: arch@
* AT_DEBUG and AT_BRK were OBE like 10 years ago, so retire them.imp2008-12-171-12/+0
| | | | Reviewed by: peter
* Adapt parts of the sparc64 Open Firmware bus enumeration code (in particular,nwhitehorn2008-12-1513-261/+22
| | | | | | | | | | | | | | | the code for parsing interrupt maps) to PowerPC and reflect their new MI status by moving them to the shared dev/ofw directory. This commit also modifies the OFW PCI enumeration procedure on PowerPC to allow the bus to find non-firmware-enumerated devices that Apple likes to add, and adds some useful Open Firmware properties (compat and name) to the pnpinfo string of children on OFW SBus, EBus, PCI, and MacIO links. Because of the change to PCI enumeration on PowerPC, X has started working again on PPC machines with Grackle hostbridges. Reviewed by: marius Obtained from: sparc64
* Remove "[KEEP THIS!]" from COMPAT_43TTY. It's not really that important.ed2008-12-021-1/+1
| | | | | | | Sgtty is a programming interface that has been replaced by termios over the years. In June we already removed <sgtty.h>, which exposes the ioctl()'s that are implemented by this interface. The importance of this flag is overrated right now.
* Switch to ath hal source code. Note this removes the ath_halsam2008-12-011-0/+1
| | | | | | | | | | | | | | | | | module; the ath module now brings in the hal support. Kernel config files are almost backwards compatible; supplying device ath_hal gives you the same chip support that the binary hal did but you must also include options AH_SUPPORT_AR5416 to enable the extended format descriptors used by 11n parts. It is now possible to control the chip support included in a build by specifying exactly which chips are to be supported in the config file; consult ath_hal(4) for information.
* Add sv_flags field to struct sysentvec with intention to provide descriptionkib2008-11-221-1/+2
| | | | | | | | of the ABI of the currently executing image. Change some places to test the flags instead of explicit comparing with address of known sysentvec structures to determine ABI features. Discussed with: dchagin, imp, jhb, peter
* - bump __FreeBSD version to reflect added buf_ring, memory barriers,kmacy2008-11-221-0/+4
| | | | | | | | | | | | | | | | | and ifnet functions - add memory barriers to <machine/atomic.h> - update drivers to only conditionally define their own - add lockless producer / consumer ring buffer - remove ring buffer implementation from cxgb and update its callers - add if_transmit(struct ifnet *ifp, struct mbuf *m) to ifnet to allow drivers to efficiently manage multiple hardware queues (i.e. not serialize all packets through one ifq) - expose if_qflush to allow drivers to flush any driver managed queues This work was supported by Bitgravity Inc. and Chelsio Inc.
* - According to OpenSolaris, CDMA flushing/syncing for Tomatillosmarius2008-11-204-74/+218
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | and XMITS has to be basically done in the same manner as for the Sabres, i.e. only for devices behind PCI-PCI-bridges and after a PIO read on the far side of the farest PCI-PCI-bridge. Given that the Tomatillo documentation mentions no difference to the Schizo bridges in this regard and this is also still part of the procedure described Schizo documentation this seems about right so adjust accordingly (the unconditional CDMA flushing/syncing previously done was based on how Linux behaves). - Implement CDMA flushing/syncing for Schizo version >= 5, which requires the workaround described in Schizo Errata I-23. According to Schizo Errata I-13 it's just unusable with version < 5 though. [1] - Don't register the Schizo streaming buffer for now until it's usage is sorted out according to the erratas. - Register our interrupt filters with the revived INTR_FAST so they these interrupts can even interrupt filters of device drivers as necessary. - Remove the comment regarding lack of newbus'ified bus_dma(9) as being able to associate a DMA tag with a device would allow to implement CDMA flushing/syncing in bus_dmamap_sync(9) but that would totally kill performance. Given that for devices not behind a PCI-PCI bridge the host-to-PCI bridges also only do CDMA flushing/syncing based on interrupts there's no additional disadvantage for polling(4) callbacks in the case schizo(4) has to do the CDMA flushing/syncing but rather a general problem. Reported by: Michael Moll [1]
* Use the interrupt level right below PIL_FAST for executing interruptmarius2008-11-192-10/+19
| | | | | | | filters instead of PIL_FAST and allow special filters and handlers for interrupts which need to be able to interrupt even filters, f.e. bus error interrupts, to be registered with the revived INTR_FAST at PIL_FAST.
* - Allow the front-end to specify that iommu(4) should disablemarius2008-11-163-19/+25
| | | | | | | | | rerun of the streaming cache for silicon bug workarounds. - Announce the presence of a streaming cache on attach for informational purposes. - For performance reasons don't do unnecessary flushes of the streaming cache when coherent mappings are synced. - Fix some minor style issues.
* Use the spitfire VIS block copy/zero functions also with cheetah-marius2008-11-161-1/+7
| | | | | | | | | | | | class CPUs. In theory one could also use versions additionally taking advantage of the prefetch cache with cheetah-class CPUs, in my worldstone runs these either didn't provide extra speedup (USIII+) in comparison to the existing spitfire versions or were even slightly slower (USIIIi) though, so they aren't committed for now. The basic problem leading to the VIS-based copy/zero functions being initially disabled for cheetah-class CPUs was solved by letting cheetah_init() clear DCR_IFPOE.
* Micro-optimize spitfire_block_{copy,zero}():marius2008-11-161-9/+4
| | | | | | - Predict the loop as taken as it's more likely that there's still data to copy and memory to zero respectively. - Don't waste the delay slot.
* - Turn off interrupts instead of only entering a critical sectionmarius2008-10-281-14/+10
| | | | | | | | | | | | | | | | | | | | | | while doing the block store workaround so we restore the correct floating-point registers state in case of nested floating-point operations resulting from nested interrupts. This allows the VIS-based block copy/zero functions to be used on machines requiring this workaround. Alternatively, we could take care of saving the floating-point registers here, which would be more inefficiently though and also involves turning off interrupts. - It turns out that the SCZ_PCI_DMA_SYNC register doesn't work like the TOMXMS_PCI_DMA_SYNC_PEND one (but more like the corresponding register in of Hummingbird and Sabre bridges) and writing the INO of the respective device to it causes a Safari bus error. However, due to the Schizo errata I-23, SCZ_PCI_DMA_SYNC can't be used as intended either, so remove consistent DMA syncing for Schzio bridges for now, which means that add-on cards with non-"sun4u compliant" (whatever that means exactly) PCI-PCI-bridges should be avoided until the proper workaround is implemented. [1] Reported by: Michael Moll [1]
* - In GCC 4.2 __builtin_frame_address() was fixed to include themarius2008-10-272-23/+11
| | | | | | | | | | V9 stack bias so we no longer need to add it in db_backtrace() and stack_capture() respectively. This also reverts r182018, which kludged around the resulting unaligned access. - Sync the sun4v versions of db_trace.c and stack_machdep.c with the sparc64 ones and fix some style bugs. MFC after: 3 days
* Enable mpt(4) as some later models have on-board Fusion-MPTmarius2008-10-111-3/+2
| | | | | | | | controllers and it seems to work just fine with at least an add-on SAS3080X. While at it, remove the commented out ncr(4) as it doesn't even use bus_dma(9), which isn't worth fixing though as sym(4) already supports a superset of the controllers driven by ncr(4).
* Collect N identical (or near identical) mkdumpheader() implementations intopeter2008-10-011-22/+1
| | | | one, as threatened in the comment. Textdump magic can be passed in.
* Add a driver for `Schizo' Fireplane/Safari to PCI 2.1 and `Tomatillo'marius2008-09-283-0/+1649
| | | | | | JBus to PCI 2.2 bridges. In theory, this driver should also handle `XMITS' Fireplane/Safari to PCI-X bridges but due to lack of access to such hardware, support for these hasn't be fleshed out, yet.
* Replace all calls to minor() with dev2unit().ed2008-09-271-2/+2
| | | | | | | | | | | | | | | After I removed all the unit2minor()/minor2unit() calls from the kernel yesterday, I realised calling minor() everywhere is quite confusing. Character devices now only have the ability to store a unit number, not a minor number. Remove the confusion by using dev2unit() everywhere. This commit could also be considered as a bug fix. A lot of drivers call minor(), while they should actually be calling dev2unit(). In -CURRENT this isn't a problem, but it turns out we never had any problem reports related to that issue in the past. I suspect not many people connect more than 256 pieces of the same hardware. Reviewed by: kib
* Change the static struct sysentvec and struct Elf_Brandinfo initializerskib2008-09-241-46/+47
| | | | | | | | | | | to the C99 style. At least, it is easier to read sysent definitions that way, and search for the actual instances of sigcode etc. Explicitely initialize sysentvec.sv_maxssiz that was missed in most sysvecs. No objection from: jhb MFC after: 1 month
* Use the STICK timers only when absolutely necessary, i.e. if a machinemarius2008-09-203-29/+33
| | | | | | | | | | consists of CPUs running at different speeds, for driving hardclock as these timers in turn are driven at frequencies as low as 5MHz, resulting in bad granularity compared to the TICK timers. However, don't employ the workaround for the BlackBird erratum #1 when using the TICK timer on machines with cheetah-class CPUs for performance reasons. Reported by: Florian Smeets
OpenPOWER on IntegriCloud