summaryrefslogtreecommitdiffstats
path: root/sys/powerpc
Commit message (Collapse)AuthorAgeFilesLines
...
* Mark invalid page table entries correctly for PMAP as well as for thenwhitehorn2015-02-091-2/+4
| | | | | | | | | | | hypervisor. This prevents an infinite loop where processes with evicted pages would page fault forever when PMAP decided the evicted pages on which the process was faulting was actually present and did not need to be restored. Found while building LLVM with make -j32. Sponsored by: FreeBSD Foundation
* Properly hide a variable under #ifdef as it is only used inside thebz2015-02-091-1/+1
| | | | | specific #ifdef block otherwise leaving an unused variable and breaking other kernel builds.
* Fix typo in PTE insertion overflow handling: use the page we're actuallynwhitehorn2015-02-091-1/+4
| | | | returning, not the one we just looked at.
* Fix an extremely subtle concurrency bug triggered by running on 32-threadnwhitehorn2015-02-091-6/+11
| | | | | | | | | | | | | | | POWER8 systems. During thread switch, there was a very small window when the stack pointer was set to the stack pointer of the outgoing thread, but after the lock on that thread had already been released. If, during that window, the outgoing thread were rescheduled on another CPU and begin execution and an exception were taken on the original CPU, the trap handler and the outgoing thread would simultaneously execute on the same stack, causing memory corruption. Fix this by making sure to release the old thread only after cpu_switch() is done with its stack. MFC after: 2 weeks Sponsored by: FreeBSD Foundation
* Technically speaking, using one virtal processor area for all CPUs is anwhitehorn2015-02-091-12/+20
| | | | violation of the spec. Make duplicate entries for each CPU.
* Simplify trapcode setup by placing a copy of the generic trap handler atnwhitehorn2015-02-091-35/+32
| | | | | | every possible trap address by default. This also makes sure the kernel notices (and panics at) traps from newer CPUs that the kernel was not expecting rather than executing gibberish memory.
* Add some error checking on the supplied page size list. This makes surenwhitehorn2015-02-081-7/+16
| | | | | | | | that we (a) get the correct large page size to provide to pmap and (b) we can alert the user if running under incorrectly-configured PowerKVM on POWER7 and POWER8 systems. MFC after: 1 week
* Do not qualify the mcontext_t *mcp argument for set_mcontext(9) askib2015-01-311-2/+2
| | | | | | | | | | | | | | | | const. On x86, even after the machine context is supposedly read into the struct ucontext, lazy FPU state save code might only mark the FPU data as hardware-owned. Later, set_fpcontext() needs to fetch the state from hardware, modifying the *mcp. The set_mcontext(9) is called from sigreturn(2) and setcontext(2) implementations and old create_thread(2) interface, which throw the *mcp out after the set_mcontext() call. Reported by: dim Discussed with: jhb Sponsored by: The FreeBSD Foundation MFC after: 1 week
* Correctness improvements for removing FDT excluded memory areas.nwhitehorn2015-01-311-5/+5
|
* Fix bug in mapppings of multiple pages exposed by updates to the VSCSInwhitehorn2015-01-271-7/+7
| | | | | | | support in QEMU. Each page of a many page mapping was getting mapped to the same physical address, which is not the desired behavior. MFC after: 1 week
* Fix typo in r277561.nwhitehorn2015-01-241-1/+1
|
* Use relocation-safe methods to determine the sizes of the exception handlers.nwhitehorn2015-01-233-52/+61
| | | | | | A "size" symbol with its address set to the length of handler would be shifted forward with all other addresses when relocations are processed. Instead, just note the end and do the subtraction at runtime.
* Allow use of a pre-instantiated RTAS as well as a self-instantiated one. Thisnwhitehorn2015-01-221-17/+28
| | | | lets the kernel boot on RTAS-based systems by being kexec'ed from Linux.
* Add POWER7+ and POWER8 to the list of CPUs with 32 SLB slots. This isnwhitehorn2015-01-211-0/+3
| | | | | | mostly a no-op since all currently-supported instances of these CPUs give the number of SLB slots in the device tree, but keep it here as well just in case.
* Make sure to relocate tmpstk with everything else and avoid processingnwhitehorn2015-01-212-2/+8
| | | | non-relative relocations that the UART code makes for absent modules.
* Make 64-bit AIM trap handlers relocatable by changing all absolute branchnwhitehorn2015-01-213-17/+71
| | | | | | | | | | | instructions to call through pointers instead. In general, these are set implicitly through relocation processing. One has to be set explicitly in machdep.c, however, to fit one handler in the tiny (8 instruction) space available. Reviewed by: andreast Differential revision: D1554 Tested on: UP and SMP G5, Cell, POWER5+
* On 64-bit PowerPC, use more native forms of the PPC 970 HID restorenwhitehorn2015-01-211-6/+23
| | | | | | | | sequences, like are used to read the HIDs. This is both easier to read and avoids a miscompilation by GCC in certain circumstances. Also avoid double restoration of HID4 and HID5. MFC after: 2 weeks
* There does not seem to be any reason to acquire GIANT here. Follow amd64nwhitehorn2015-01-201-2/+0
| | | | | | in removing it. MFC after: 1 month
* Remove space in the FDT reservation map from the available memory regionsnwhitehorn2015-01-201-4/+87
| | | | | | in ofw_mem_regions(). This function is actually MI and should move to dev/ofw at some point in the near future so that ARM and MIPS can use the same code.
* Zero BSS explicitly if not started by loader(8). Add a check for the magicnwhitehorn2015-01-201-3/+14
| | | | | values that ePAPR-compliant loaders (like skiboot) put in the register loader uses for the metadata pointer to avoid confusing them.
* Add some initial infrastructure for relocating the kernel in place.nwhitehorn2015-01-192-3/+56
| | | | | MFC after: 2 months Differential revision: D1554
* Provide a tunable (machdep.moea64_bpvo_pool_size) to set the bootstrapnwhitehorn2015-01-191-6/+7
| | | | | | | | PVO pool size. The default errs on the exceedingly large side, so absent any intelligent automatic tuning, at least let the user set it to save RAM on memory-constrained systems. MFC after: 2 weeks
* Use TOC to look up all kernel globals on powerpc64 instead of doing thenwhitehorn2015-01-185-22/+44
| | | | | | non-relocatable lis @ha, ori @l dance and hoping they are below 4 GB. MFC after: 2 months
* Refactor PowerPC (especially AIM) init sequence to be less baroque.nwhitehorn2015-01-189-177/+89
| | | | MFC after: 2 months
* Make netbooting work again by disabling BOOTP_NFSV3. Investigate why thisnwhitehorn2015-01-161-1/+1
| | | | causes bad RPC errors later.
* Plug cxgbe(4) back into !powerpc && !arm builds, instead of building itnp2015-01-161-0/+1
| | | | on amd64 only.
* Add Altivec/VMX register support to ptrace.jhibbits2015-01-143-2/+101
| | | | | MFC after: 2 weeks Relnotes: yes
* Do not remap Open Firmware mappings covered by the direct map. It'snwhitehorn2015-01-141-0/+7
| | | | | | pointless and wastes resources. MFC after: 1 week
* Increase default MAXTSIZ to allow execution of larger binaries.jhibbits2015-01-101-1/+1
| | | | | | | | | This allows executing static clang built with -O0. The value is configurable by a sysctl, so if one needs to clamp it down, they still can. Discussed with: nwhitehorn,emaste
* Factor out duplicated code from dumpsys() on each architecture into genericmarkj2015-01-078-625/+329
| | | | | | | | | | | | | | code in sys/kern/kern_dump.c. Most dumpsys() implementations are nearly identical and simply redefine a number of constants and helper subroutines; a generic implementation will make it easier to implement features around kernel core dumps. This change does not alter any minidump code and should have no functional impact. PR: 193873 Differential Revision: https://reviews.freebsd.org/D904 Submitted by: Conrad Meyer <conrad.meyer@isilon.com> Reviewed by: jhibbits (earlier version) Sponsored by: EMC / Isilon Storage Division
* Remove "New" label from NFSCL/NFSD now that they are the only NFSjhb2015-01-063-6/+6
| | | | | | client/server. While here, remove duplicate NFSCL from sys/conf/NOTES. Approved by: rmacklem
* Restore use of ofw_bus_intr_to_rl() in the pseries vdevice driver after fixingnwhitehorn2015-01-051-21/+5
| | | | | ofw_bus_intr_to_rl() to match the spec for unspecified interrupt-parent properties.
* Add 64-bit DMA support in the XHCI controller driver.hselasky2015-01-052-0/+4
| | | | | | | - Fix some comments and whitespace while at it. MFC after: 1 month Submitted by: marius@
* Revert r272109 locally, which is not quite equivalent in how it deals withnwhitehorn2015-01-051-1/+21
| | | | | missing interrupt-parent properties. A better solution will come later, but this restores pseries in QEMU for the time being.
* Use FDT properties to identify a PS3 if present.nwhitehorn2015-01-052-10/+18
|
* Make PS3 work with the userspace kboot loader. loader.ps3 will disappearnwhitehorn2015-01-051-2/+5
| | | | | | from the tree in the near future. Done at: Hackathon
* Truncate DB_SMALL_VALUE_MAX to a much lower value.jhibbits2015-01-041-1/+1
| | | | | | | Unlike the other architectures, the PowerPC kernel is loaded under the 2GB boundary. MFC after: 2 weeks
* Resort and resize the altivec registers in the pcb. vrsave and vscr are bothjhibbits2015-01-031-3/+3
| | | | | | | 32-bit registers via the PowerPC spec. X-MFC-with: r276634 MFC after: 2 weeks
* Dump VMX registers into the userland coredump.jhibbits2015-01-034-35/+95
| | | | | Reviewed by: nwhitehorn MFC after: 2 weeks
* Remove last vestige of Apple-specific memory parsing removed in r258807.nwhitehorn2015-01-021-2/+0
|
* Allow booting with both a real Open Firmware tree and a flattened version ofnwhitehorn2015-01-014-19/+25
| | | | | | | | the Open Firmware, as provided by petitboot, for example. Note that this is not quite complete, since RTAS instantiation still depends on callable firmware. MFC after: 2 weeks
* Restore the trap type argument to the DTrace trap hook, removed in r268600.markj2014-12-231-1/+1
| | | | | | It's redundant at the moment since it can be obtained from the trapframe on the architectures where DTrace is supported, but this won't be the case with ARM.
* Move ofw_cpu.c to sys/dev/ofw so that it can be used by otherrpaulo2014-12-141-214/+0
| | | | | | | architectures. Differential Revision: https://reviews.freebsd.org/D1307 Reviewed by: jhibbits
* Fix kernel build for booke.andreast2014-12-101-0/+1
|
* Fix build for powerpc(32|64) kernels.andreast2014-12-101-0/+1
|
* This configuration file removes several debugging options, includinggnn2014-12-021-0/+38
| | | | | | | | WITNESS and INVARIANTS checking, which are known to have significant performance impact on running systems. When benchmarking new features this kernel should be used instead of the standard GENERIC. This kernel configuration should never appear outside of the HEAD of the FreeBSD tree.
* Add support for dtrace:fbt on modules for PowerPCjhibbits2014-11-295-32/+14
| | | | | | | | | | | | | | | | | Summary: Revert the initial FBT-with-KDB changes for trap_subr*.S, and instead use the db_trap filter function to handle dtrace trap filtering. With this, the MMU is enabled by the support code, simplifying the codepath altogether. Test Plan: Tested on my G4 PowerBook Reviewers: #powerpc, nwhitehorn Reviewed By: nwhitehorn Differential Revision: https://reviews.freebsd.org/D1207 MFC after: 3 weeks
* Revert r274772: it is not valid on MIPSemaste2014-11-252-2/+2
| | | | Reported by: sbruno
* Fix the powerpc64 build.jhibbits2014-11-211-1/+1
| | | | | Pointy-hat to: me X-MFC-with: r274735
* Use canonical __PIC__ flagemaste2014-11-212-2/+2
| | | | | | | | It is automatically set when -fPIC is passed to the compiler. Reviewed by: dim, kib Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D1179
OpenPOWER on IntegriCloud