summaryrefslogtreecommitdiffstats
path: root/sys/powerpc/aim/trap_subr64.S
Commit message (Collapse)AuthorAgeFilesLines
* Implement DTrace for PowerPC. This includes both 32-bit and 64-bit.jhibbits2012-11-071-0/+20
| | | | | | | | | | | There is one known issue: Some probes will display an error message along the lines of: "Invalid address (0)" I tested this with both a simple dtrace probe and dtruss on a few different binaries on 32-bit. I only compiled 64-bit, did not run it, but I don't expect problems without the modules loaded. Volunteers are welcome. MFC after: 1 month
* This commit adds profiling support for powerpc64. Now we can do applicationandreast2012-01-201-1/+1
| | | | | | | | | | | | | profiling and kernel profiling. To enable kernel profiling one has to build kgmon(8). I will enable the build once I managed to build and test powerpc (32-bit) kernels with profiling support. - add a powerpc64 PROF_PROLOGUE for _mcount. - add macros to avoid adding the PROF_PROLOGUE in certain assembly entries. - apply these macros where needed. - add size information to the MCOUNT function. MFC after: 3 weeks, together with r230291
* Rework SLB trap handling so that double-faults into an SLB trap handler arenwhitehorn2012-01-151-16/+163
| | | | | | | | | | | | | | possible, and double faults within an SLB trap handler are not. The result is that it possible to take an SLB fault at any time, on any address, for any reason, at any point in the kernel. This lets us do two important things. First, it removes the (soft) 16 GB RAM ceiling on PPC64 as well as any architectural limitations on KVA space. Second, it lets the kernel tolerate poorly designed hypervisors that have a tendency to fail to restore the SLB properly after a hypervisor context switch. MFC after: 6 weeks
* Fix a bug where the pmap_cpu_bootstrap() ap argument could be clobbered.nwhitehorn2011-11-091-0/+1
| | | | | | | | Luckily, it mostly wasn't important, so this didn't cause major problems. Also improve register reuse when setting up trap frames very slightly. Submitted by: Justin Hibbits <chmeeedalf at gmail dot com> MFC after: 5 days
* Revert r223479. It is unnecessary and served only to slightly amelioratenwhitehorn2011-06-261-2/+0
| | | | some manifestations of the bug actually fixed in r223485.
* Use the ABI-mandated thread pointer register (r2 for ppc32, r13 for ppc64)nwhitehorn2011-06-231-4/+9
| | | | | | | | | | | | | | | instead of a PCPU field for curthread. This averts a race on SMP systems with a high interrupt rate where the thread looking up the value of curthread could be preempted and migrated between obtaining the PCPU pointer and reading the value of pc_curthread, resulting in curthread being observed to be the current thread on the thread's original CPU. This played merry havoc with the system, in particular with mutexes. Many thanks to jhb for helping me work this one out. Note that Book-E is in principle susceptible to the same problem, but has not been modified yet due to lack of Book-E hardware. MFC after: 2 weeks
* Clear any outstanding atomic reservations when traps are taken. This fixesnwhitehorn2011-06-231-0/+2
| | | | | | some interesting bugs (mostly on SMP systems) with atomic operations silently failing in interrupt heavy situations, especially when using overflow pages.
* The POWER7 has only 32 SLB slots instead of 64, like other supportednwhitehorn2011-06-021-24/+22
| | | | | | 64-bit PowerPC CPUs. Add infrastructure to support variable numbers of SLB slots and move the user slot from 63 to 0, so that it is always available.
* Add a missing isync.nwhitehorn2011-05-261-0/+1
|
* Turn off default generation of userland dot symbols on powerpc64 now thatnwhitehorn2011-02-181-7/+7
| | | | | we have a binutils that supports it. Kernel dot symbols remain on to assist DDB.
* Restructure the way the copyin/copyout segment is stored to prevent anwhitehorn2010-10-301-1/+1
| | | | | | | | | | | | | | | | | concurrency bug. Since all SLB/SR entries were invalidated during an exception, a decrementer exception could cause the user segment to be invalidated during a copyin()/copyout() without a thread switch that would cause it to be restored from the PCB, potentially causing the operation to continue on invalid memory. This is now handled by explicit restoration of segment 12 from the PCB on 32-bit systems and a check in the Data Segment Exception handler on 64-bit. While here, cause copyin()/copyout() to check whether the requested user segment is already installed, saving some pipeline flushes, and fix the synchronization primitives around the mtsr and slbmte instructions to prevent accessing stale segments. MFC after: 2 weeks
* Split the SLB mirror cache into two kinds of object, one for kernel mapsnwhitehorn2010-09-161-27/+41
| | | | | | | which are similar to the previous ones, and one for user maps, which are arrays of pointers into the SLB tree. This changes makes user SLB updates atomic, closing a window for memory corruption. While here, rearrange the allocation functions to make context switches faster.
* MFppc64:nwhitehorn2010-07-131-0/+634
Kernel sources for 64-bit PowerPC, along with build-system changes to keep 32-bit kernels compiling (build system changes for 64-bit kernels are coming later). Existing 32-bit PowerPC kernel configurations must be updated after this change to specify their architecture.
OpenPOWER on IntegriCloud