summaryrefslogtreecommitdiffstats
path: root/sys/sparc64
Commit message (Collapse)AuthorAgeFilesLines
* - Divorce the IOTSBs, which so far where handled via a global listmarius2007-08-057-143/+95
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | instead of per IOMMU, so we no longer need to program all of them identically in systems having multiple IOMMUs. This continues the rototilling of the nexus(4) done about 5 months ago, which amongst others changed nexus(4) and the drivers for host-to-foo bridges to provide bus_get_dma_tag methods, allowing to handle DMA tags in a hierarchical way and to link them with devices. This still doesn't move the silicon bug workarounds for Sabre (and in the uncommitted schizo(4) for Tomatillo) bridges into special bus_dma_tag_create() and bus_dmamap_sync() methods though, as w/o fully newbus'ified bus_dma_tag_create() and bus_dma_tag_destroy() this still requires too much hackery, i.e. per-child parent DMA tags in the parent driver. - Let the host-to-foo drivers supply the maximum physical address of the IOMMU accompanying the bridges. Previously iommu(4) hard- coded an upper limit of 16GB, which actually only applies to the IOMMUs of the Hummingbird and Sabre bridges. The Psycho variants as well as the U2S in fact can can translate to up to 2TB, i.e. translate to 41-bit physical addresses. According to the recently available Tomatillo documentation these bridges even translate to 43-bit physical addresses and hints at the Schizo bridges doing 43 bits as well. This fixes the issue the FreeBSD 6.0 todo list item "Max RAM on sparc64" was refering to and pretty much obsoletes the lack of support for bounce buffers on sparc64. Thanks to Nathan Whitehorn for pointing me at the Tomatillo manual. Approved by: re (kensmith)
* If clock_ct_to_ts fails to convert time time from the real time clock,dwmalone2007-07-232-6/+10
| | | | | | | | | print a one line error message. Add some comments on not being able to trust the day of week field (I'll act on these comments in a follow up commit). Approved by: re MFC after: 3 weeks
* - Remove the global definition of sched_lock in mutex.h to breakjeff2007-07-181-0/+7
| | | | | | | | | | | new code and third party modules which try to depend on it. - Initialize sched_lock in sched_4bsd.c. - Declare sched_lock in sparc64 pmap.c and assert that we're compiling with SCHED_4BSD to prevent accidental crashes from running ULE. This is the sole remaining file outside of the scheduler that uses the global sched_lock. Approved by: re
* - Move ofw_pci_alloc_busno() to the ofw_pci KOBJ interface,marius2007-06-185-97/+55
| | | | | | | | | | | | | | | | | | | | | | | | | | allowing the driver for the host-PCI-bridge to indicate that reenumeration of the PCI busses isn't supported by returning -1 instead of a valid PCI bus number. This is needed in order support both Tomatillo, which don't support reenumeration and thus are apparently intended to be used for independently numbered PCI domains only, and Psycho bridges, whose busses need to be reenumerated on at least some E450, without the #ifndef currently used for sun4v in order to support multiple independently PCI domains. The actual allocation/incrementation of the PCI bus numbers is now done in psycho(4), though it no longer establish a mapping between bus numbers and device nodes like ofw_pci_alloc_busno() did as that functionality wasn't used (but can easily brought back if really needed). The now no longer used sys/sparc64/pci/ofw_pci.c is also removed from sys/conf/files.sun4v as ofw_pci_alloc_busno() wasn't used there in the first place. - In ofw_pci_default_{adjust_busrange,intr_pending}() sanity check that the device has a parent before passing it on. - Make psycho_softcs static to sys/sparc64/pci/psycho.c as it's not used outside of that module. - In sys/sparc64/pci/ofw_pcib_subr.c remove the superfluous inclusion of opt_global.h and correct the debug output for adjusting the subordinate bus number.
* For sun4u also add PCI busses with a device unit number of -1marius2007-06-181-8/+1
| | | | | | | | | | | instead of using the PCI bus number, like it's already done for sun4v in order to deal properly with independently numbered PCI domains which can't be reenumerated (in the case of sun4u f.e. Tomatillo bridges). For machines where we need to reenumerate all PCI busses this change obviously introduces the theoretical cosmetic problem that the device number of the PCI bus no longer equals to its PCI bus number. In practice this doesn't happen as both are assigned linearly and in parallel.
* Remove unused softc.marius2007-06-171-6/+2
|
* - Don't register the over-temperature and power-fail interruptmarius2007-06-161-20/+14
| | | | | | | | handlers as filter/"fast" handlers so shutdown_nice() can acquire the process lock. - Use bus_{read,write}_8() instead of bus_space_{read,write}_8() in order to get rid of sc_bushandle and sc_bustag in the softc. - Remove the banal and outdated comment above sbus_filter_stub().
* - Use the newly introduced pcib_mtx spin lock to lock psycho_ce(),marius2007-06-162-60/+54
| | | | | | | | | | | | | | | | | allowing it to be a filter/"fast" handler. Locking the interrupt handlers with a spin lock is mainly a requirement in schizo(4) but as we ought to register the spin lock anyway it should not hurt to take advantage of it in psycho(4). - Pass both a driver_filter_t and a driver_intr_t argument to psycho_set_intr(), allowing to get rid of the FAST interrupt flag hack. - Don't register the over-temperature interrupt handler as filter/ "fast" handler so shutdown_nice() can acquire the process lock. - Use bus_{read,write}_8() instead of bus_space_{read,write}_8() in order to get rid of sc_bushandle and sc_bustag in the softc. - Correct the debug output for adjusting the subordinate bus number. - Remove the banal and outdated above psycho_filter_stub(). - Fix some white space nits.
* - Add support for sending IPIs with USIII and greater sun4u CPUs.marius2007-06-163-42/+132
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | These CPUs use an enhanced layout of the interrupt vector dispatch and dispatch status registers in order to allow sending IPIs to multiple targets simultaneously. Thus support for these CPUs was put in a newly added cheetah_ipi_selected(). This is intended to be pointed to by cpu_ipi_selected, which now is a function pointer, in order to avoid cpu_impl checks once booted. Alternatively it can point to spitfire_ipi_selected(), which was renamed from cpu_ipi_selected(). Consequently cpu_ipi_send() was also renamed to spitfire_ipi_send() (there's no need for a cheetah equivalent of this so far). Initialization of the cpu_ipi_selected pointer and other requirements is done in mp_init(), which was renamed from mp_tramp_alloc(), as cpu_mp_start() isn't called on UP systems while cpu_ipi_selected() is. As a side-effect this allows to make mp_tramp static to sys/sparc64/sparc64/mp_machdep.c. For the sake of avoiding #ifdef SMP and for keeping the history in place cheetah_ipi_selected() and spitfire_ipi_{selected,send}() where not put into/moved to sys/sparc64/sparc64/{cheetah,spitfire}.c - Add some CTASSERTs and KASSERTs ensuring that MAXCPU doesn't exceed the data types we use to store the CPU bit fields or the number of USIII and greater CPUs supported by the current cheetah_ipi_selected() implementation (which for JBus-CPUs is only 4; that should be fine though as according to OpenSolaris there are no sun4u machines with more than 4 JBus-CPUs). - In cpu_mp_start() don't enumerate and start more than MAXCPU CPUs as we can't handle more than that. - In cpu_mp_start() check for upa-portid vs. portid depending on cpu_impl for consistency with nexus(4). - In spitfire_ipi_selected() add KASSERTs ensuring that a CPU isn't told to IPI itself as sun4u CPUs just can't do that. - In spitfire_ipi_send() do a MEMBAR #Sync after writing the interrupt vector data as we want to make sure the payload was actually written before we trigger the dispatch. - In spitfire_ipi_send() also verify IDR_BUSY when checking whether the dispatch was successful as it has to be cleared for this to be the case. - Remove some redundant variables.
* - Flesh out the support for the EBus variant which actually is themarius2007-06-161-21/+75
| | | | | | | | | | | | RTC function of a National Semiconductor PC87317/PC97317. This consists of using the century register the same way Solaris does for compatibility reasons. Once there is a MD power(4) we'd also want to interface the APC (Advanced Power Control) functionality of the same chip function with it. - Use a macro for the device description and take advantage of ISA_PNP_PROBE() setting the device description. - Use the generated typedefs for the prototypes of the device interface functions.
* Remove the code for displaying the OFW hostid during boot for themarius2007-06-161-25/+1
| | | | | | reasons outlined in the comment removed along with it, because the OFW hostid has no real meaning for FreeBSD and mainly so the OFW hostid is not confused with the FreeBSD hostid.
* Enable SCTP by default for GENERIC kernels in order to give itdelphij2007-06-141-0/+1
| | | | | | | | | more exposure. The current state of SCTP implementation is considered to be ready for 32-bit platforms, but still need some work/testing on 64-bit platforms. Approved by: re (kensmith) Discussed with: rrs
* Add wlan_scan_ap and wlan_scan_sta to platforms that include wlan.thompsa2007-06-111-0/+2
|
* Use default options for default partitioning schemes, rather thanmarcel2007-06-111-0/+5
| | | | | | | | making the relevant files standard. This avoids duplication and makes it easier to override/disable unwanted schemes. Since ARM doesn't have a DEFAULTS configuration file, leave the source files for the BSD and MBR partitioning schemes in files.arm for now.
* Add kdb_cpu_sync_icache(), intended to synchronize instructionmarcel2007-06-091-0/+5
| | | | | | caches with data caches after writing to memory. This typically is required to make breakpoints work on ia64 and powerpc. For those architectures the function is implemented.
* Enable AUDIT by default in the GENERIC kernel, allowing security eventrwatson2007-06-081-0/+1
| | | | | | | | auditing to be turned on without a kernel recompile, just an rc.conf option. Approved by: re (kensmith) Obtained from: TrustedBSD Project
* Teach the bridge wrapper how to handle the filter+ithread case.piso2007-06-063-36/+77
| | | | Reviewed by: marius
* - Change comments and asserts to reflect the removal of the globaljeff2007-06-041-2/+2
| | | | | | | | scheduler lock. Tested by: kris, current@ Tested on: i386, amd64, ULE, 4BSD, libthr, libkse, PREEMPTION, etc. Discussed with: kris, attilio, kmacy, jhb, julian, bde (small parts each)
* Commit 10/14 of sched_lock decomposition.jeff2007-06-041-6/+2
| | | | | | | | | | | | - Use sched_throw() rather than replicating the same cpu_throw() code for each architecture. This also allows the scheduler to use any locking it may want to. - Use the thread_lock() rather than sched_lock when preempting. - The scheduler lock is not required to synchronize release_aps. Tested by: kris, current@ Tested on: i386, amd64, ULE, 4BSD, libthr, libkse, PREEMPTION, etc. Discussed with: kris, attilio, kmacy, jhb, julian, bde (small parts each)
* Rework the PCPU_* (MD) interface:attilio2007-06-042-3/+4
| | | | | | | | | | | | - Rename PCPU_LAZY_INC into PCPU_INC - Add the PCPU_ADD interface which just does an add on the pcpu member given a specific value. Note that for most architectures PCPU_INC and PCPU_ADD are not safe. This is a point that needs some discussions/work in the next days. Reviewed by: alc, bde Approved by: jeff (mentor)
* Add the machine-specific definitions for configuring the new physicalalc2007-06-041-0/+38
| | | | | | memory allocator. Approved by: re
* Prepare for the new physical memory allocator: Change the way that thealc2007-06-032-2/+2
| | | | | | physical page's color is obtained. Approved by: re
* Revert VMCNT_* operations introduction.attilio2007-05-312-3/+3
| | | | | | | | Probabilly, a general approach is not the better solution here, so we should solve the sched_lock protection problems separately. Requested by: alc Approved by: jeff (mentor)
* In some particular cases (like in pccard and pccbb), the real devicepiso2007-05-311-2/+11
| | | | | | | | | | | handler is wrapped in a couple of functions - a filter wrapper and an ithread wrapper. In this case (and just in this case), the filter wrapper could ask the system to schedule the ithread and mask the interrupt source if the wrapped handler is composed of just an ithread handler: modify the "old" interrupt code to make it support this situation, while the "new" interrupt code is already ok. Discussed with: jhb
* Honor maxsegsz of less than a page size in a DMA tag. Previously ityongari2007-05-291-0/+2
| | | | | | | | used to return PAGE_SIZE without respect to restrictions of a DMA tag. This affected all of the busdma load functions that use _bus_dmamap_loader_buffer() as their back-end. Reviewed by: scottl
* Enable fwip and dcons in GENERIC. They seem fairly stable.simokawa2007-05-281-0/+3
| | | | | | | | | | | | | Note on dcons: To enable dcons in kernel, put the following lines in /boot/loader.conf. You may also want to enable dcons in /etc/ttys. boot_multicons="YES" #Force dcons to be the high-level console if a firewire bus presents. #hw.firewire.dcons_crom.force_console=1 FireWire/dcons support in loader will come shortly. (i386/amd64 only)
* Allow FreeBSD's native ELF image activators to execute shared libraries thekan2007-05-221-2/+2
| | | | | | | same way it was enabled for Linux binares in linuxulator. This allows binaries built with -pie. Many ports auto-detect -fPIE support in GCC 4.2 and build binaries FreeBSD was unable to run.
* - rename VMCNT_DEC to VMCNT_SUB to reflect the count argument.jeff2007-05-201-1/+1
| | | | | Suggested by: julian@ Contributed by: attilio@
* - Staticize cpu_ipi_send() and cpu_mp_unleash() as these aren'tmarius2007-05-202-42/+58
| | | | | | | | | | | | | | | | referenced outside of mp_machdep.c - Replace a magic 14 with the newly added IDC_ITID_SHIFT macro. - Remove the global mp_boot_mid variable as it's not really necessary and just replacing it with PCPU_GET(mid) doesn't have any impact on performance once booted. - Replace PCPU_GET(cpuid) with the curcpu shortcut. - Replace hardcoded function names in panic strings etc with __func__ so they don't need to be updated when renaming the function. - Use register_t instead of u_long for variables used to hold the return value of intr_disable() so we don't need to apply any knowledge about the actual width of that value here. - Improve the wording of some comments. - Fix several style(9) bugs.
* - Also identify USIIIi+, USIV and USIV+ CPUs.marius2007-05-202-12/+24
| | | | | | | | | | - Use __FBSDID in identcpu.c. - Remove #ifndef SUN4V around global cpu_impl variable; it doesn't hurt on sun4v for now and once setPQL2() is gone sun4v can stop sharing identcpu.c with sparc64, making the reminder of this file also sparc64-only again. [1] Submitted by: kmacy [1]
* Delete the unused/not really used sparc64 (as in sun4u) cache.h,marius2007-05-202-11/+18
| | | | | | iommureg.h (which already began to bitrot) and iommuvar.h from the sun4v source and adjust some of the source which is shared between sparc64 and sun4v as appropriate.
* Include machine/pcb.hto turn extern struct pcb stoppcbs[]; constructkan2007-05-191-0/+1
| | | | into the valid C.
* - define and use VMCNT_{GET,SET,ADD,SUB,PTR} macros for manipulatingjeff2007-05-182-3/+3
| | | | | | | | vmcnts. This can be used to abstract away pcpu details but also changes to use atomics for all counters now. This means sched lock is no longer responsible for protecting counts in the switch routines. Contributed by: Attilio Rao <attilio@FreeBSD.org>
* - Add bits for userland profiling. For sun4u this is compile-tested only.marius2007-05-111-4/+36
| | | | - Replace magic 14 with PIL_TICK.
* Define every architecture as either VM_PHYSSEG_DENSE oralc2007-05-051-0/+5
| | | | | | | | | | | | | | | | | | | | VM_PHYSSEG_SPARSE depending on whether the physical address space is densely or sparsely populated with memory. The effect of this definition is to determine which of two implementations of vm_page_array and PHYS_TO_VM_PAGE() is used. The legacy implementation is obtained by defining VM_PHYSSEG_DENSE, and a new implementation that trades off time for space is obtained by defining VM_PHYSSEG_SPARSE. For now, all architectures except for ia64 and sparc64 define VM_PHYSSEG_DENSE. Defining VM_PHYSSEG_SPARSE on ia64 allows the entirety of my Itanium 2's memory to be used. Previously, only the first 1 GB could be used. Defining VM_PHYSSEG_SPARSE on sparc64 allows USIIIi-based systems to boot without crashing. This change is a combination of Nathan Whitehorn's patch and my own work in perforce. Discussed with: kmacy, marius, Nathan Whitehorn PR: 112194
* Use the VIS-based Spitfire version of the page copying and zeroingmarius2007-05-011-5/+12
| | | | | | functions with CPUs they apply to only, otherwise default to the plain C functions. This is modeled in a way so that f.e. a Cheetah version of these functions can be inserted easily.
* Make the rman(9) workaround actually work. The main problem was thatmarius2007-05-011-26/+31
| | | | | | the UPA_IMR2 resource is also shared with/a subset of the Schizo PCI bus B CSR bank. I'm not entirely sure how this previously managed to escape testing...
* Add support for specifying a minimal size for vm.kmem_size in the loader viasepotvin2007-04-211-1/+2
| | | | | | | | vm.kmem_size_min. Useful when using ZFS to make sure that vm.kmem size will be at least 256mb (for example) without forcing a particular value via vm.kmem_size. Approved by: njl (mentor) Reviewed by: alc
* Remove trailing '.' for consistency!pjd2007-04-101-1/+1
|
* Add UFS_GJOURNAL options to the GENERIC kernel.pjd2007-04-101-0/+1
| | | | Approved by: re (kensmith)
* Push down the implementation of PCPU_LAZY_INC() into the machine-dependentalc2007-03-111-0/+6
| | | | | | | header file. Reimplement PCPU_LAZY_INC() on amd64 and i386 making it atomic with respect to interrupts. Reviewed by: bde, jhb
* Over NFS, an open() call could result in multiple over-the-wiremohans2007-03-091-0/+3
| | | | | | | | | | | | GETATTRs being generated - one from lookup()/namei() and the other from nfs_open() (for cto consistency). This change eliminates the GETATTR in nfs_open() if an otw GETATTR was done from the namei() path. Instead of extending the vop interface, we timestamp each attr load, and use this to detect whether a GETATTR was done from namei() for this syscall. Introduces a thread-local variable that counts the syscalls made by the thread and uses <pid, tid, thread syscalls> as the attrload timestamp. Thanks to jhb@ and peter@ for a discussion on thread state that could be used as the timestamp with minimal overhead.
* Rototill the sparc64 nexus(4) (actually this brings in the code themarius2007-03-0717-808/+538
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | sun4v nexus(4) in turn is based on): o Change nexus(4) to manage the resources of its children so the respective device drivers don't need to figure them out of OFW themselves. o Change nexus(4) to provide the ofw_bus KOBJ interface instead of using IVARs for supplying the OFW node and the subset of standard properties of its children. Together with the previous change this also allows to fully take advantage of newbus in that drivers like fhc(4), which attach on multiple parent busses, no longer require different bus front-ends as obtaining the OFW node and properties as well as resource allocation works the same for all supported busses. As such this change also is part 4/4 of allowing creator(4) to work in USIII-based machines as it allows this driver to attach on both nexus(4) and upa(4). On the other hand removing these IVARs breaks API compatibility with the powerpc nexus(4) but which isn't that bad as a) sparc64 currently doesn't share any device driver hanging off of nexus(4) with powerpc and b) they were no longer compatible regarding OFW-related extensions at the pci(4) level since quite some time. o Provide bus_get_dma_tag methods in nexus(4) and its children in order to handle DMA tags in a hierarchical way and get rid of the sparc64_root_dma_tag kludge. Together with the previous two items this changes also allows to completely get rid of the nexus(4) IVAR interface. It also includes: - pushing the constraints previously specified by the nexus_dmatag down into the DMA tags of psycho(4) and sbus(4) as it's their IOMMUs which induce these restrictions (and nothing at the nexus(4) or anything that would warrant specifying them there), - fixing some obviously wrong constraints of the psycho(4) and sbus(4) DMA tags, which happened to not actually be used with the sparc64_root_dma_tag kludge in place and therefore didn't cause problems so far, - replacing magic constants for constraints with macros as far as it is obvious as to where they come from. This doesn't include taking advantage of the newbus way to get the parent DMA tags implemented by this change in order to divorce the IOTSBs of the PCI and SBus IOMMUs or for implementing the workaround for the DMA sync bug in Sabre (and Tomatillo) bridges, yet, though. o Get rid of the notion that nexus(4) (mostly) reflects an UPA bus by replacing ofw_upa.h and with ofw_nexus.h (which was repo-copied from ofw_upa.h) and renaming its content, which actually applies to all of Fireplane/Safari, JBus and UPA (in the host bus case), as appropriate. o Just use M_DEVBUF instead of a separate M_NEXUS malloc type for allocating the device info for the children of nexus(4). This is done in order to not need to export M_NEXUS when deriving drivers for subordinate busses from the nexus(4) class. o Use the DEFINE_CLASS_0() macro to declare the nexus(4) driver so we can derive subclasses from it. o Const'ify the nexus_excl_name and nexus_excl_type arrays as well as add 'associations' and 'rsc', which are pseudo-devices without resources and therefore of no real interest for nexus(4), to the former. o Let the nexus(4) device memory rman manage the entire 64-bit address space instead of just the UPA_MEMSTART to UPA_MEMEND subregion as Fireplane/Safari- and JBus-based machines use multiple ranges, which can't be as easily divided as in the case of UPA (limiting the address space only served for sanity checking anyway). o Use M_WAITOK instead of M_NOWAIT when allocating the device info for children of nexus(4) in order to give one less opportunity for adding devices to nexus(4) to fail. o While adapting the drivers affected by the above nexus(4) changes, change them to take advantage of rman_get_rid() instead of caching the RIDs assigned to allocated resources, now that the RIDs of resources are correctly set. o In iommu(4) and nexus(4) replace hard-coded functions names, which actually became outdated in several places, in panic strings and status massages with __func__. [1] o Use driver_filter_t in prototypes where appropriate. o Add my copyright to creator(4), fhc(4), nexus(4), psycho(4) and sbus(4) as I changed considerable amounts of these drivers as well as added a bunch of new features, workarounds for silicon bugs etc. o Fix some white space nits. Due to lack of access to Exx00 hardware, these changes, i.e. central(4) and fhc(4), couldn't be runtime tested on such a machine. Exx00 are currently reported to panic before trying to attach nexus(4) anyway though. PR: 76052 [1] Approved by: re (kensmith)
* Wrap at 80 bus_setup_intr() in upa_setup_intr().piso2007-03-061-2/+2
|
* Use uma_set_align().marius2007-02-251-0/+1
|
* o break newbus api: add a new argument of type driver_filter_t topiso2007-02-238-69/+116
| | | | | | | | | | | | | bus_setup_intr() o add an int return code to all fast handlers o retire INTR_FAST/IH_FAST For more info: http://docs.freebsd.org/cgi/getmsg.cgi?fetch=465712+0+current/freebsd-current Reviewed by: many Approved by: re@
* Include GEOM_LABEL in GENERIC. It's very useful and not well publicizedbrooks2007-02-091-0/+1
| | | | | | enough. Approved by: pjd
* Evolve the ctlreq interface added to geom_gpt into a genericmarcel2007-02-071-1/+1
| | | | | | | | | | | partitioning class that supports multiple schemes. Current schemes supported are APM (Apple Partition Map) and GPT. Change all GEOM_APPLE anf GEOM_GPT options into GEOM_PART_APM and GEOM_PART_GPT (resp). The ctlreq interface supports verbs to create and destroy partitioning schemes on a disk; to add, delete and modify partitions; and to commit or undo changes made.
* Quiet GCC4 warnings regarding the width of printf()-arguments notmarius2007-01-201-2/+3
| | | | | matching the format. While at it limit the format to unsigned int as we're only interested in the 11 least significant bits anyway.
* - Use bus_get_dma_tag() to obtain the parent DMA tag so dma(4) willmarius2007-01-201-6/+6
| | | | | | | | | work when we start requiring this. - Don't specify an alignment when creating our own parent DMA tag; the supported DMA engines require no alignment constraint (f.e. the LANCE child does though) and it's no inherited by the child DMA tags anyway (which probably is a bug though). - Fix whitespace nits.
OpenPOWER on IntegriCloud