summaryrefslogtreecommitdiff
path: root/sys/arch/sparc64/dev/psycho.c
AgeCommit message (Collapse)Author
2014-07-12reboot(9), panic(9): Call panic(9) for unrecoverable MD H/W errors (NMIs)Masao Uebayashi
Some architectures have ability to detect hardware sanity and notify system (NMI, firmware callback, etc.). Handle these hardware severe errors, same as software errors, with panic(9). According to miod@, SGI IP27 NMI is triggered by pushing some "hidden" button, which "usual" users/admins don't know. Pushing such a button is "RB_USERREQ" (human-triggered) in that the button is pushed by a human, but not "RB_USERREQ" in that no user intervention in system (== no command input) is done. miod@ agreed that changing these from RB_USERREQ to !RB_USERREQ (== panic(9)) is not a big problem. OK miod@ kettenis@
2014-07-12add a size argument to free. will be used soon, but for now default to 0.Ted Unangst
after discussions with beck deraadt kettenis.
2014-07-12boot(9), reboot(9): Migrate MD callers of boot(9) to reboot(9)Masao Uebayashi
I have found that some ports call boot(9) from machine-dependent code to reboot system. These should be changed to either: - Sending signal to init(8) to trigger it to shutdown system cleanly, like acpi(4) does, in cases where found problems don't prevent system from working immediately, or - Just doing panic(9) if the situation is severely broken. For now, just rewrite boot() to reboot(). Actual fixes follow. Discussed with & OK from kettenis@
2014-01-24Add support for BUS_INTR_ESTABLISH_MPSAFE.Mark Kettenis
2011-07-06Handle pci_conf_read() faults on reading non-existent registers that resultMark Kettenis
in master aborts. Return 0xffffffff to emulate what happens on non-perfect architectures in that case. ok deraadt@
2011-06-26Fix some inconsistencies in how we build 64-bit addresses from OF properties.Mark Kettenis
2010-12-04Introduce a new pci routine, pci_conf_size(), which returns the size of aMiod Vallat
given pcitag_t configuration address space. Currently, all pci controllers will return the usual 0x100 bytes of PCI configuration space, but this will eventually change on PCIe-capable controlers. ok kettenis@
2009-03-29bzero pci attach argsMark Kettenis
ok deraadt@, miod@
2009-03-29make various strings ("can't map mem space" and similar) more consistentStuart Henderson
between instances, saving space in the kernel. feedback from many (some incorporated, some left for future work). ok deraadt, kettenis, "why not" miod.
2009-01-02Make IOMMU code use the generic _bus_dmamem_map() and _bus_dmamem_unmap().Mark Kettenis
2008-11-25Fix dmesg ugliness caused by not printing iotdb stuff.Mark Kettenis
2008-07-23Clear correctable errors after handling them. From Bjorn Andersson.Mark Kettenis
2008-07-20Provide a timecounter based on the UltraSPARC IIe STICK logic.Mark Kettenis
2008-07-12Don't install interrupt handlers for non-exitsing interrupts on CMU-CH.Mark Kettenis
2008-06-02No need to enable the interrupt in psycho_set_intr(); intr_establish() alreadyMark Kettenis
does that for us.
2008-05-24Found some documentation that suggests that CMU-CH doesn't have an IOMMU andMark Kettenis
streaming cache, so don't try to initialize it.
2008-05-24Add Psycho variants found on the SPARC Enterprise M4000/M5000/M8000/M9000.Mark Kettenis
2008-03-16Set up interrupt translation for e10k.Mark Kettenis
2008-01-19Make host bridges provide their own implementation of pci_conf_read() andMark Kettenis
pci_conf_write() and give pyro(4) an implementation suitable for PCIe. For psycho(4) and schizo(4), go back to the origional implementation. This gets rid of the 'tagshift' member of pci_chipset_tag_t, and clears the way for sun4v.
2007-10-08A few trailing bzero/memset -> M_ZERO occurrences, cast removal andKenneth R Westerback
size(*p) usage. This should be the last of the simple malloc() changes.
2007-09-08use M_ZERO.Martin Reindl
input from kettenis@
2007-08-04Add sparc_bus_addr member to struct sparc_bus_space_tag. This function mapsMark Kettenis
a bus_space_handle_t back to a bus_addr_t. Needed for rbus. Only implemented for mainbus(4) and psycho(4) for now; schizo(4) and pyro(4) will follow soon. ok deraadt@
2007-04-10``it's'' -> ``its'' when the grammar gods require this change.Miod Vallat
2007-01-26Deal with zero wraparound in DVMA range checks;Marc Aurele La France
Fix default DVMA range for Schizo's with no "virtual-dma" property; Add TSB size indicator to Schizo & Psycho debugging messages. ok jason@
2006-12-24change schizo/psycho interrupts to be xname:what instead of ugly namesTheo de Raadt
seen previously; discussed with kettenis
2006-12-14Make pci subsystem aware of domains. Each host bridge gets assigned a uniqueMark Kettenis
domain number such that we can distinguish between busses with the same bus number that are behind different host bridges. Domains can be accessed by using different device nodes. ok deraadt@
2006-07-01clean dmesg output for iommu more; tested miod dlgTheo de Raadt
2006-07-01Make sure we don't accidentally match one of the unused PCI error interruptsMark Kettenis
instead the interrupt for PCI slot 0. ok dlg@
2006-06-28cleanup dmesg logging for iommu goo, make it follow the standard formTheo de Raadt
2006-06-27Fix interrupt mapping. This now seems to work on all machines, even withMark Kettenis
pci cards that have a pci-pci bridge and lack fcode. tested by many, ok jason@, dlg@
2006-03-19rev 1.86Brad Smith
make the "generic" PCI bus enumeration code the standard case which gets used if nothing else is defined in MD headers, introduce a "PCI_MACHDEP_ENUMERATE_BUS" CPP definition which can be used by MD headers (just 1 port atm) to plug in special code rev 1.62 * Implement a machine-dependent pci_enumerate_bus() for sparc64 which uses OFW device nodes to enumerate the bus. When a PCI bus that is behind a bridge is attached, pci_attach_hook() allocates a new PCI chipset tag for the new bus and sets it's "curnode" to the OFW node of the bridge. This is used as a starting point when enumerating that bus. Root busses get the OFW node of the host bridge (psycho). rev 1.59 Split the code that enumerates the PCI bus and that actually probes for a device into two functions: * pci_probe_device() actually probes/attaches the device specified by the provide pcitag_t. * pci_enumerate_bus() enumerates the bus, and calls pci_probe_device() for each device on the bus. A pci_enumerate_bus_generic() is provided which implements the old method of doing this: If something found at dev0/func0, determine number of functions and probe each one. From NetBSD ok kettenis@ Tested on a good number of amd64/i386/macppc/sparc64 systems
2006-03-13* Add "pcitag_t *pba_bridgetag" to pci_attach_args. This is set toBrad Smith
NULL for root PCI busses. For busses behind a bridge, it points to a persistent copy of the bridge's pcitag_t. This can be very useful for machine-dependent PCI bus enumeration code. From NetBSD ok grange@ kettenis@
2005-06-06-no need to hang onto virtual-dma parameter from prom, free itJason Wright
-formatting nits
2005-01-27Fill all fields of intrhand structures not created by bus_intr_allocate().Miod Vallat
2004-12-18Print error codes in panic message.Brad Smith
From NetBSD ok miod@
2003-12-20Pass -WformatMiod Vallat
2003-06-24Add a "where" argument to the sparc64 interrupt code. This lets usHenric Jungheim
associate a name with each interrupt handler. This is not visible outside the kernel (yet). ok jason@
2003-06-11Much of the sbus, psycho, and schizo bus_dma code is the same, so let'sHenric Jungheim
call the real implementation functions directly instead of duplicating lots of code that only calls the real stuff anyway. tested by miod@ henning@ ok jason@
2003-06-04The IIi/e chips have a DMA sync register that we have been ignoring. ThisHenric Jungheim
could lead to nasty races between PIO and DMA. tested by krw@ ok jason@
2003-06-02Do not map psycho-only interrupts on sabres. Reading from undefinedHenric Jungheim
registers and mapping strange INRs is not a good idea. ok jason@
2003-05-30Fix interrupt mapping for psycho's PBM B. This should make interruptsHenric Jungheim
happy for all psycho based boxes. tested by beck@ ok jason@
2003-05-16move the interrupt idle stuff to the generic intr_establish functionJason Wright
2003-05-16The sparc64 proms do not map all interrupt vectors. Instead ofHenric Jungheim
trying to use the interrupt pin (or is it that the PCI function?) as the interrupt vector, this computes the vector from the PCI bus, slot, and pin. This will only change mappings on psycho-based machines (*not* sabre, i.e., IIi/e) and only for those vectors reported as nonsense INRs (INO 0-3). This should fix the mapping of non-bridge expansion cards on U60 and E450, and other psycho boxen. U30 seems to do its own thing.
2003-03-25Clear interrupts (set to IDLE) as they are established.Jason Wright
ok deraadt
2003-03-06The existing IOMMU code had a rounding problem that was most noticeableHenric Jungheim
on faster systems under heavy network load. This replaces some of the unreadable iommu functions with something a little less dense and a lot less crash prone. The bus_dma function pointer/cookie handling was broken. Change them to work like the stacked bus_space drivers (where "work" is the key word). Tested my many (thanks). ok jason@ deraadt@
2003-03-05Some typos prevented STCs from being detected and the size of theHenric Jungheim
PCI configuration space is actually one "0" larger. Noticed on an E450 with all 10 PCI slots populated. ok jason@
2003-02-17Add support for the Sun Enterprise 450Henric Jungheim
Reduce the size of a GENERIC kernel by ~190k Remove the nasty pointer/bus_space_handle_t casts Adds debug bus_space code including the ability to trace bus operations (it actually works now). The following rules are now followed (and verfified by the debug code): 1. A "bus_space_handle_t" may only be used with the "bus_space_tag_t" that created it. 2. Only "bus_space_map()" may create "bus_space_handle_t"s. 3. A "bus_space_handle_t" may not be modified after it has been created (other than being destroyed by "bus_space_unmap()"). Thanks to help from mcbride, marc, jason, drahn, to anyone that might have slipped my mind at the moment. ok jason@, deraadt@
2003-02-11be consistant on Hz vs hzMichael Shalayeff
2003-01-13Don't use a global variable to determine which pci_conf* function to call,Jason Wright
store function pointers in the pci_chipset_tag_t (ie. fix an ugly hack I did during the hackathon last year).
2002-12-02Skip the ffb0, ffb1, pcia/slot2 (for psycho), and pcia/slot3 (for psycho)Jason Wright
interrupt map matches; from FreeBSD.