summaryrefslogtreecommitdiffstats
path: root/sys/sparc64
Commit message (Collapse)AuthorAgeFilesLines
* Some machines can not only consist of CPUs running at different speedsmarius2010-02-211-2/+2
| | | | | | | | | | | but also of different types, f.e. Sun Fire V890 can be equipped with a mix of UltraSPARC IV and IV+ CPUs, requiring different MMU initialization and different workarounds for model specific errata. Therefore move the CPU implementation number from a global variable to the per-CPU data. Functions which are called before the latter is available are passed the implementation number as a parameter now. This file was missed in r204152.
* Starting with UltraSPARC IV CPUs the CPU caches are described with differentmarius2010-02-201-19/+37
| | | | OFW properties.
* Some machines can not only consist of CPUs running at different speedsmarius2010-02-2019-68/+83
| | | | | | | | | but also of different types, f.e. Sun Fire V890 can be equipped with a mix of UltraSPARC IV and IV+ CPUs, requiring different MMU initialization and different workarounds for model specific errata. Therefore move the CPU implementation number from a global variable to the per-CPU data. Functions which are called before the latter is available are passed the implementation number as a parameter now.
* Predict KASSERTs to be true.marius2010-02-131-1/+1
|
* Add ssm(4), which serves as a glue device allowing devices beneath themarius2010-02-131-0/+74
| | | | | | scalable shared memory node, which is used in large UltraSPARC III based machines to group snooping-coherency domains together, like schizo(4) to be treated like nexus(4) children.
* - Add the 'cmp' and 'core' pseudo-busses which are used to group CPU coresmarius2010-02-132-55/+47
| | | | | | | | | to the exclusion lists as the CPU nodes aren't handled as regular devices either. Also add the pseudo-devices found in Sun Fire V1280. - Allow nexus_attach() and nexus_alloc_resource() to be used by drivers derived from nexus(4) for subordinate busses. - Don't add the zero-sized memory resources of glue devices to the resource lists.
* Resurrect nexusvar.h from r167307.marius2010-02-131-0/+58
|
* Style fixesmarius2010-02-131-24/+19
|
* - Search the whole OFW device tree instead of only the children of themarius2010-02-136-128/+201
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | root nexus device for the CPUs as starting with UltraSPARC IV the 'cpu' nodes hang off of from 'cmp' (chip multi-threading processor) or 'core' or combinations thereof. Also in large UltraSPARC III based machines the 'cpu' nodes hang off of 'ssm' (scalable shared memory) nodes which group snooping-coherency domains together instead of directly from the nexus. It would be great if we could use newbus to deal with the different ways the 'cpu' devices can hang off of pseudo ones but unfortunately both cpu_mp_setmaxid() and sparc64_init() have to work prior to regular device probing. - Add support for UltraSPARC IV and IV+ CPUs. Due to the fact that these are multi-core each CPU has two Fireplane config registers and thus the module/target ID has to be determined differently so the one specific to a certain core is used. Similarly, starting with UltraSPARC IV the individual cores use a different property in the OFW device tree to indicate the CPU/core ID as it no longer is in coincidence with the shared slot/socket ID. This involves changing the MD KTR code to not directly read the UPA module ID either. We use the MID stored in the per-CPU data instead of calling cpu_get_mid() as a replacement in order prevent clobbering any registers as side-effect in the assembler version. This requires CATR() invocations from mp_startup() prior to mapping the per-CPU pages to be removed though. While at it additionally distinguish between CPUs with Fireplane and JBus interconnects as these also use slightly different sizes for the JBus/agent/module/target IDs. - Make sparc64_shutdown_final() static as it's not used outside of machdep.c.
* - At least the trap table of the Sun Fire V1280 firmware apparently hasmarius2010-02-132-10/+14
| | | | | | | | | | | no cleanwindows handler so just remove trying to trigger it from _start and the AP trampoline code as that leads to a crash there. This should be okay as leaking data from the OFW via the CPU registers on start of the kernel should be no real concern. - Make the comments of _start and the AP trampoline code regarding the initializations they perform match each other and reality. - Make the comments of the AP trampoline code regarding iTLB accesses refer to the right macro.
* - Assert that HEAPSZ is a multiple of PAGE_SIZE as at least the firmwaremarius2010-02-134-6/+132
| | | | | | | | | | | | | | | | | | | | | | | | | | | of Sun Fire V1280 doesn't round up the size itself but instead lets claiming of non page-sized amounts of memory fail. - Change parameters and variables related to the TLB slots to unsigned which is more appropriate. - Search the whole OFW device tree instead of only the children of the root nexus device for the BSP as starting with UltraSPARC IV the 'cpu' nodes hang off of from 'cmp' (chip multi-threading processor) or 'core' or combinations thereof. Also in large UltraSPARC III based machines the 'cpu' nodes hang off of 'ssm' (scalable shared memory) nodes which group snooping-coherency domains together instead of directly from the nexus. - Add support for UltraSPARC IV and IV+ BSPs. Due to the fact that these are multi-core each CPU has two Fireplane config registers and thus the module/target ID has to be determined differently so the one specific to a certain core is used. Similarly, starting with UltraSPARC IV the individual cores use a different property in the OFW device tree to indicate the CPU/core ID as it no longer is in coincidence with the shared slot/socket ID. While at it additionally distinguish between CPUs with Fireplane and JBus interconnects as these also use slightly different sizes for the JBus/agent/module/target IDs. - Check the return value of init_heap(). This requires moving it after cons_probe() so we can panic when appropriate. This should be fine as the PowerPC OFW loader uses that order for quite some time now.
* Add the options DEADLKRES (introducing the deadlock resolver thread) inattilio2010-02-101-0/+1
| | | | | | | | | | the 'debugging' section of any HEAD kernel and enable for the mainstream ones, excluding the embedded architectures. It may, of course, enabled on a case-by-case basis. Sponsored by: Sandvine Incorporated Requested by: emaste Discussed with: kib
* Implement handling of the third argument of cpu_switch(). This unbreaksmarius2010-01-302-40/+50
| | | | | | | sparc64 after r202889. PR: 143215 MFC after: 1 week
* - Zero the MSI/MSI-X queue argument, otherwise mtx_init(9) can panicmarius2010-01-271-3/+3
| | | | | | | | | | indicating an already initialized lock. - Check for an empty MSI/MSI-X queue entry before asserting that we have received a MSI/MSI-X message in order to not panic in case of stray MSI/ MSI-X queue interrupts which may happen in case of using an interrupt handler rather than a filter. MFC after: 3 days
* Merge r202882 from amd64/i386:marius2010-01-231-69/+104
| | | | | | | | | | | | | | | | | | | | For PT_TO_SCE stop that stops the ptraced process upon syscall entry, syscall arguments are collected before ptracestop() is called. As a consequence, debugger cannot modify syscall or its arguments. In syscall(), reread syscall number and arguments after ptracestop(), if debugger modified anything in the process environment. Since procfs stopevent requires number of syscall arguments in p_xstat, this cannot be solved by moving stop/trace point before argument fetching. Move the code to read arguments into separate function fetch_syscall_args() to avoid code duplication. Note that ktrace point for modified syscall is intentionally recorded twice, once with original arguments, and second time with the arguments set by debugger. PT_TO_SCX stop is executed after cpu_syscall_set_retval() already. Reviewed by: kib
* Move the examples for the 'hints' and 'env' keywords from various GENERICjhb2010-01-191-9/+0
| | | | | | kernel configs into NOTES. Reviewed by: imp
* Add epic(4) also here.marius2010-01-181-0/+1
| | | | MFC after: 3 days
* When setting up MSIs with a filter ensure that the event queue interruptmarius2010-01-101-2/+10
| | | | | is cleared as it might have triggered before and given we supply NULL as ic_clear, inthand_add() won't do this for us in this case.
* Add INCLUDE_CONFIG_FILE in GENERIC on all non-embedded platforms.imp2010-01-101-0/+1
| | | | | | # This is the resolution of removing it from DEFAULTS... MFC after: 5 days
* Add epic(4), a driver for the front panel LEDs in Sun Fire V215/V245.marius2010-01-102-0/+217
| | | | It's named after the driver doing the same job in OpenSolaris.
* - According to OpenSolaris it's sufficient to align the MSIs of amarius2010-01-101-52/+95
| | | | | | | | | | | | | | | | | device in the table based on the count rather than the maxcount. Also the previous code didn't work properly as it would have been necessary to reserve the entire maxcount range in order keep later requests from filling the spare MSIs between count and maxcount, which would be complicated to unreserve in fire_release_msi(). - For MSIs with filters rather than handlers only don't clear the event queue interrupt via fire_intr_clear() since given that these are executed directly would clear it while we're still processing the event queue, which in turn would lead to lost MSIs. - Save one level of indentation in fire_setup_intr(). - Correct a bug in fire_teardown_intr() which prevented it from correctly restoring the MSI in the resource, causing allocation of a resource representing an MSI to fail after the first pass when repeatedly loading and unloading a driver module.
* In sys/<arch>/conf/Makefile set TARGET to <arch>. That allowsbz2010-01-081-0/+2
| | | | | | | | | | | | | | | | sys/conf/makeLINT.mk to only do certain things for certain architectures. Note that neither arm nor mips have the Makefile there, thus essentially not (yet) supporting LINT. This would enable them do add special treatment to sys/conf/makeLINT.mk as well chosing one of the many configurations as LINT. This is a hack of doing this and keeping it in a separate commit will allow us to more easily identify and back it out. Discussed on/with: arch, jhb (as part of the LINT-VIMAGE thread) MFC after: 1 month
* Enable ste(4). ste(4) should work on all architectures.yongari2010-01-081-1/+1
|
* Revert 200594. This file isn't intended for these sorts of things.imp2010-01-041-7/+0
|
* Add vlan(4) to all GENERIC kernels.brooks2010-01-031-0/+1
| | | | MFC after: 1 week
* Exclude options COMPAT_FREEBSD4 now that the MD freebsd4_sigreturn()marius2010-01-031-0/+1
| | | | | is gone since r201396 and which is also in line with the fact that FreeBSD 4 didn't supported sparc64.
* - Demapping unused kernel TLB slots has proven to work reliably so movemarius2010-01-021-11/+3
| | | | | | | | the associated debugging under bootverbose. - Remove freebsd4_sigreturn(); given that FreeBSD 4 didn't supported sparc64 this only ever served as a transition aid prior to FreeBSD 5.0 and is unused by default since COMPAT_FREEBSD4 was removed from GENERIC in r143072 nearly 5 years ago.
* - Preserve the PROM IOMMU in order to allow OFW drivers to continue tomarius2010-01-024-4/+25
| | | | | | | | work. - Sanity check the parameters passed to the implementations of the pcib_{read,write}_config() methods. Using illegal values can cause no real harm but it doesn't hurt to avoid unnecessary data error traps requiring to flush and re-enable the level 1 caches.
* Fix botches in r201005:marius2010-01-011-4/+4
| | | | | - Actually use the newly introduced sc_res in the front-end. - Remove a whitespace glitch in mk48txx_gettime().
* - Remove a redundant variable and an unnecessary cast.marius2009-12-291-6/+5
| | | | - Fix whitespace.
* - Prefer i and j over i and n for temporary integer variables.marius2009-12-292-111/+120
| | | | | - Wrap/shorten too long lines. - Remove a redundant variable and an unnecessary cast in schizo(4).
* Account for firmware versions which include the CDMA interrupts inmarius2009-12-281-19/+32
| | | | | | the OFW device tree. MFC after: 3 days
* Add a driver for the `Fire' JBus to PCIe bridges found in at leastmarius2009-12-273-0/+3224
| | | | | | | | | | | | | | | | | | | | | | | | | the Sun Fire V215/V245 and Sun Ultra 25/45 machines. This driver also already includes all the code to support the `Oberon' Uranus to PCIe bridges found in the Fujitsu-Siemens based Mx000 machines but due to lack of access to such a system for testing, probing of these bridges is currently disabled. Unfortunately, the event queue mechanism of these bridges for MSIs/ MSI-Xs matches our current MD and MI interrupt frameworks like square pegs fit into round holes so for now we are generous and use one event queue per MSI, which limits us to 35 MSIs/MSI-Xs per Host-PCIe-bridge (we use one event queue for the PCIe error messages). This seems tolerable as long as most devices just use one MSI/MSI-X anyway. Adding knowledge about MSIs/MSI-Xs to the MD interrupt code should allow us to decouple the 1:1 mapping at the cost of no longer being able to bind MSIs/MSI-Xs to specific CPUs as we currently have no reliable way to quiesce a device during the transition of its MSIs/ MSI-Xs to another event queue. This would still require the problem of interrupt storms generated by devices which have no one-shot behavior or can't/don't mask interrupts while the filter/handler is executed (like the older PCIe NICs supported by bge(4)) to be solved though. Committed from: 26C3
* Style changesmarius2009-12-251-3/+3
| | | | Obtained from: NetBSD (mc146818reg.h)
* - Take advantage of bus_{read,write}_*(9).marius2009-12-251-3/+1
| | | | | - Set dow = -1 in mk48txx_gettime() because some drivers (for example the NetBSD and OpenBSD mk48txx(4)) don't set it correctly.
* - Hook up the default implementations of the MSI/MSI-X pcib_if methodsmarius2009-12-251-2/+39
| | | | | | | | | | | | | | | | | so requests may bubble up to a host-PCI bridge driver. - Distinguish between PCI and PCIe bridges in the device description so it's a bit easier to follow what hangs off of what in the dmesg. Unfortunately we can't also tell PCI and PCI-X apart based on the information provided in the OFW device tree. - Add quirk handling for the ALi M5249 found in Fire-based machines which are used as a PCIe-PCIe bridge there. These are obviously subtractive decoding as as they have a PCI-ISA bridge on their secondary side (and likewise don't include the ISA I/O range in their bridge decode) but don't indicate this via the class code. Given that this quirk isn't likely to apply to all ALi M5249 and I have no datasheet for these chips so I could implement a check using the chip specific bits enabling subtractive decoding this quirk handling is added to the MD code rather than the MI one.
* Merge from amd64/i386:marius2009-12-245-3/+67
| | | | Implement support for interrupt descriptions.
* Add missing locking in intr_bind().marius2009-12-241-2/+8
|
* - Don't check for a valid interrupt controller on every interruptmarius2009-12-241-2/+3
| | | | | | | | | | | in intr_execute_handlers(). If we managed to get here without an associated interrupt controller we have way bigger problems. While at it predict stray vector interrupts as false as they are rather unlikely. - Don't blindly call the clear function of an interrupt controller when adding a handler in inthand_add() as interrupt controllers like the one driven by upa(4) are auto-clearing and thus provide NULL instead.
* - By re-arranging the code in OF_decode_addr() somewhat and acceptingmarius2009-12-231-33/+33
| | | | | | | a bit of a detour we can just iterate through the banks array instead of having to calculate every offset. This change is inspired by the powerpc version of this function. - Add support for the JBus to EBus bridges which hang off of nexus(4).
* Style changes.marius2009-12-231-14/+12
|
* - Add support for the IOMMUs of Fire JBus to PCIe and Oberon Uranusmarius2009-12-233-43/+166
| | | | | | | | | to PCIe bridges. - Add support for talking the PROM mappings over to the kernel IOTSB just like we do with the kernel TSB in order to allow OFW drivers to continue to work. - Change some members, parameters and variables to unsigned where more appropriate.
* Fix whitespace according to style(9).marius2009-12-231-29/+29
|
* - Add quirk handling for ALi M5229, mainly setting the magic "forcemarius2009-12-231-3/+24
| | | | | | | | enable IDE I/O" bit which prevents data access traps with revision 0xc8 in Fire-based machines when pci(4) enables PCIM_CMD_PORTEN. - Like for sun4v also don't add the PCI side of host-PCIe bridges to the bus on sun4u as they don't have configuration space implement there either.
* - Sort the prototypes.marius2009-12-231-24/+23
| | | | | - Add macros to ease the access of device configuration space in ofw_pcibus_setup_device().
* Add structures for OFW MSI/MSI-X support. These are identical formarius2009-12-231-0/+25
| | | | both sun4u and sun4v.
* Don't probe the bq4802 variant found in Ultra 25 and 45 for now asmarius2009-12-231-4/+9
| | | | | this chip isn't MC146818 compatible and requires different handlers (but which I can't test due to lack of such hardware).
* Don't use an out register to hold the vector number across the callmarius2009-12-231-11/+11
| | | | | | of the interrupt handler in intr_fast() as the handler might clobber it (no in-tree handler currently does but an upcoming one will). While at it, tidy the register usage in the interrupt counting code.
* Calculate the average CPU clock frequency and export that throughmarcel2009-12-231-0/+14
| | | | | the hw.freq.cpu sysctl variable. This can be used by ports that need to know "the" CPU frequency.
* - Correct an off-by-one error when calculating the end of a childmarius2009-12-221-2/+2
| | | | | range. - Spell the PCI TLA in uppercase.
OpenPOWER on IntegriCloud