summaryrefslogtreecommitdiffstats
path: root/sys/powerpc
Commit message (Collapse)AuthorAgeFilesLines
* Place interrupt handling in a critical section and remove doublenwhitehorn2010-03-092-6/+8
| | | | | | | | | | | counting in incrementing the interrupt nesting level. This fixes a number of bugs in which the interrupt thread could be preempted by an IPI, indefinitely delaying acknowledgement of the interrupt to the PIC, causing interrupt starvation and hangs. Reported by: linimon Reviewed by: marcel, jhb MFC after: 1 week
* Fix an obvious lock escape and fix a typo in a comment.nwhitehorn2010-03-041-2/+4
|
* Patch some more concurrency issues here. This expands the page tablenwhitehorn2010-03-041-23/+43
| | | | | lock to cover the PVOs, and removes the scratchpage PTEs from the PVOs entirely to avoid the system trying to be helpful and rewriting them.
* Rework smu(4) to be asynchronous. It turns out that the combination ofnwhitehorn2010-03-041-73/+181
| | | | | | the automatic fan management and the polling in smu_run_cmd() was putting my system interrupt load at 20%. This change reduces that to 0.4%.
* The NetBSD Foundation has granted permission to remove clause 3 and 4 fromjoel2010-03-031-7/+0
| | | | | | the software. Obtained from: NetBSD
* The NetBSD Foundation has granted permission to remove clause 3 and 4 fromjoel2010-03-034-28/+0
| | | | | | their software. Obtained from: NetBSD
* Fix another bug involving /dev/mem and the OEA64 scratchpage. Whennwhitehorn2010-02-251-4/+2
| | | | | | | | the scratchpage is updated, the PVO's physical address is updated as well. This makes pmap_extract() begin returning non-zero values again, causing the panic partially fixed in r204297. Fix this by excluding addresses beyond virtual_end from consideration as KVA addresses, instead of allowing addresses up to VM_MAX_KERNEL_ADDRESS.
* Move the OEA64 scratchpage to the end of KVA from the beginning, and setnwhitehorn2010-02-251-9/+14
| | | | | | | | | | | its PVO to map physical address 0 instead of kernelstart. This fixes a situation in which a user process could attempt to return this address via KVM, have it fault while being modified, and then panic the kernel because (a) it is supposed to map a valid address and (b) it lies in the no-fault region between VM_MIN_KERNEL_ADDRESS and virtual_avail. While here, move msgbuf and dpcpu make into regular KVA space for consistency with other implementations.
* Provide an implementation of pmap_dev_direct_mapped() on OEA64. This isnwhitehorn2010-02-251-1/+16
| | | | | required in order to be able to mmap the running kernel, which is turn required to avoid fstat returning gibberish.
* Add the ability to set SMU-based machines to restart automatically afternwhitehorn2010-02-241-0/+58
| | | | power loss.
* Use dcbz instead of word stores for page zeroing, providing a factor ofnwhitehorn2010-02-241-9/+21
| | | | 3-4 speedup.
* Close a race involving the OEA64 scratchpage. When the scratch page'snwhitehorn2010-02-242-10/+15
| | | | | | | | | | | | | | | physical address is changed, there is a brief window during which its PTE is invalid. Since moea64_set_scratchpage_pa() does not and cannot hold the page table lock, it was possible for another CPU to insert a new PTE into the scratch page's PTEG slot during this interval, corrupting both mappings. Solve this by creating a new flag, LPTE_LOCKED, such that moea64_pte_insert will avoid claiming locked PTEG slots even if they are invalid. This change also incorporates some additional paranoia added to solve things I thought might be this bug. Reported by: linimon
* Provide a new useless feature: an led(4) interface for the system's sleepnwhitehorn2010-02-221-0/+24
| | | | LED.
* Allow user programs to execute mfpvr instructions. Linux allows this, andnwhitehorn2010-02-221-1/+22
| | | | | | | some math-related software like GMP expects to be able to use it to pick a target appropriately. MFC after: 1 week
* Add a simple fan management callout to the SMU driver. This is designednwhitehorn2010-02-211-4/+112
| | | | | | such that a fancier thermal management algorithm can be run from user space, but the kernel will at least ensure your machine does not either sound like a wind tunnel or catch fire.
* Fix several mistakes in this file, in order to allow individual fan speedsnwhitehorn2010-02-211-19/+48
| | | | to be read and set correctly.
* Reduce KVA pressure on OEA64 systems running in bridge mode by mappingnwhitehorn2010-02-206-71/+46
| | | | | | | | | | | | | UMA segments at their physical addresses instead of into KVA. This emulates the direct mapping behavior of OEA32 in an ad-hoc way. To make this work properly required sharing the entire kernel PMAP with Open Firmware, so ofw_pmap is transformed into a stub on 64-bit CPUs. Also implement some more tweaks to get more mileage out of our limited amount of KVA, principally by extending KVA into segment 16 until the beginning of the first OFW mapping. Reported by: linimon
* Turn on experimental support for DEEPNAP on the 970MP.nwhitehorn2010-02-201-2/+10
|
* Merge r198724 to Book-E. casuword() non-atomically read the current valuenwhitehorn2010-02-201-2/+13
| | | | | | of its argument before atomically replacing it, which could occasionally return the wrong value on an SMP system. This resulted in user mutex operations hanging when using threaded applications.
* Allow the SMU driver to read a variety of hardware sensors (possiblenwhitehorn2010-02-191-9/+439
| | | | | | | | questions on the thermal calibration), and to read and set fan RPMs from software. While here, fix a number of bugs. Calibration code from: OpenBSD MFC after: 2 weeks
* Fix a bug where pages being removed from memory entirely no longer havenwhitehorn2010-02-182-55/+39
| | | | | | | | | | | PVOs, and so the modified state of the page can no longer be communicated to the VM layer, causing pages not to be flushed to swap when needed, in turn causing memory corruption. Also make several correctness adjustments to I-Cache synchronization and TLB invalidation for 64-bit Book-S CPUs. Obtained from: projects/ppc64 Discussed with: grehan MFC after: 2 weeks
* Adjust style (following the already existing rules) for the newlyattilio2010-02-152-2/+2
| | | | | | introduced option DEADLKRES. Reported by: danfe, julian, avg
* Call the proper linkup routine in PowerPC Book-E machdep.raj2010-02-151-1/+1
| | | | | Submitted by: attilio MFC after: 1 week
* Add the options DEADLKRES (introducing the deadlock resolver thread) inattilio2010-02-102-0/+2
| | | | | | | | | | 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
* Make PCI Express host controllers functional, by:marcel2010-02-011-0/+26
| | | | | | | | 1. checking whether there's a link before initializing devices on the bus. When there's no link any access onto the bus will wedge the CPU. 2. synthesizing the class & subclass so that the host controller appears as a standard PCI bridge, rather than a PowerPC CPU.
* Use the capability pointer to indicate whether the host controller ismarcel2010-02-011-12/+13
| | | | | | PCI Express, rather than a bit-field (boolean). Saving the capability pointer this way makes access to capability-specific configuration registers easy and efficient.
* Don't check the device ID. Instead, check the class, subclass andmarcel2010-01-291-28/+13
| | | | | | | | | | | | | programming I/F. New SoC designs have different device IDs, but don't need special treatment. Consequently, we fail to probe and attach for no other reason than not having added the device ID to the code. Bank on Freescale's sense of backward compatibility and assume that if we find a host controller, we know how work with it. This fixes detection of the PCI Express host controllers on Freescale's QorIQ family of processors (P1, P2 and P4).
* Move the examples for the 'hints' and 'env' keywords from various GENERICjhb2010-01-191-3/+0
| | | | | | kernel configs into NOTES. Reviewed by: imp
* 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
* 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
* Remove extraneous semicolons, no functional changes.mbr2010-01-073-8/+8
| | | | | Submitted by: Marc Balmer <marc@msys.ch> MFC after: 1 week
* 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
* Update d_mmap() to accept vm_ooffset_t and vm_memattr_t.rnoland2009-12-292-3/+4
| | | | | | | | | | | | | This replaces d_mmap() with the d_mmap2() implementation and also changes the type of offset to vm_ooffset_t. Purge d_mmap2(). All driver modules will need to be rebuilt since D_VERSION is also bumped. Reviewed by: jhb@ MFC after: Not in this lifetime...
* Remove a warning in DELAY about large delays. In kern_shutdown.cmarcel2009-12-191-8/+1
| | | | we use excessive delays quite habitually.
* Add INCLUDE_CONFIG_FILE, and a note in comments about how to alsodougb2009-12-161-0/+7
| | | | include the comments with CONFIGARGS
* Unbreak build.nwhitehorn2009-12-061-1/+1
| | | | Pointy hat to: me
* MFp4:mav2009-12-064-57/+37
| | | | | | | | | | | | | | | | | | Introduce ATA_CAM kernel option, turning ata(4) controller drivers into cam(4) interface modules. When enabled, this options deprecates all ata(4) peripheral drivers (ad, acd, ...) and interfaces and allows cam(4) drivers (ada, cd, ...) and interfaces to be natively used instead. As side effect of this, ata(4) mode setting code was completely rewritten to make controller API more strict and permit above change. While doing this, SATA revision was separated from PATA mode. It allows DMA-incapable SATA devices to operate and makes hw.ata.atapi_dma tunable work again. Also allow ata(4) controller drivers (except some specific or broken ones) to handle larger data transfers. Previous constraint of 64K was artificial and is not really required by PCI ATA BM specification or hardware. Submitted by: nwitehorn (powerpc part)
* The first argument of dcbz interprets r0 as a literal zero, not the second.nwhitehorn2009-12-031-1/+1
| | | | | | This worked before by accident. MFC after: 1 week
* Bump limits on PowerPC. This allows large executables like parts of LLVMnwhitehorn2009-12-021-5/+5
| | | | | | | | to function. Reviewed by: grehan Obtained from: NetBSD MFC after: 2 weeks
* Add atp(4) to powerpc GENERIC. Most late-generation Apple PowerPC laptopsnwhitehorn2009-11-291-0/+1
| | | | have trackpads that do not work at all without this driver.
* Add a CPU features framework on PowerPC and simplify CPU setup a littlenwhitehorn2009-11-286-99/+131
| | | | | | | | | | more. This provides three new sysctls to user space: hw.cpu_features - A bitmask of available CPU features hw.floatingpoint - Whether or not there is hardware FP support hw.altivec - Whether or not Altivec is available PR: powerpc/139154 MFC after: 10 days
* Simplify the invocation of vm_fault(). Specifically, eliminate the flagalc2009-11-272-5/+2
| | | | | | | VM_FAULT_DIRTY. The information provided by this flag can be trivially inferred by vm_fault(). Discussed with: kib
* Garbage collect some code that was never compiled in to handle Altivecnwhitehorn2009-11-221-6/+0
| | | | during traps. It predates actual Altivec support and was never used.
* Always allocate PCI/ISA interrupts as shareable so that sharedmarcel2009-11-201-0/+1
| | | | interrupts don't cause driver attach failures.
* Fix cpuid output on E500 core.raj2009-11-191-0/+2
|
* Provide a real fix to the too-many-translations problem when bootingnwhitehorn2009-11-121-56/+62
| | | | | | | | | | | | from CD on 64-bit hardware to replace existing band-aids. This occurred when the preloaded mdroot required too many mappings for the static buffer. Since we only use the translations buffer once, allocate a dynamic buffer on the stack. This early in the boot process, the call chain is quite short and we can be assured of having sufficient stack space. Reviewed by: grehan
* Extract the code that records syscall results in the frame into MDkib2009-11-104-73/+113
| | | | | | | | | | | function cpu_set_syscall_retval(). Suggested by: marcel Reviewed by: marcel, davidxu PowerPC, ARM, ia64 changes: marcel Sparc64 tested and reviewed by: marius, also sunv reviewed MIPS tested by: gonzo MFC after: 1 month
* Spell sz correctly.nwhitehorn2009-11-091-1/+1
| | | | Pointed out by: jmallett
* Increase the size of the OFW translations buffer to handle G5 systemsnwhitehorn2009-11-091-1/+4
| | | | | | | | that use many translation regions in firmware, and add bounds checking to prevent buffer overflows in case even the new value is exceeded. Reported by: Jacob Lambert MFC after: 3 days
OpenPOWER on IntegriCloud