summaryrefslogtreecommitdiff
path: root/sys/arch/powerpc
AgeCommit message (Collapse)Author
2014-01-22To prevent lock ordering problems with the kernel lock, we need to make sureMark Kettenis
we block all interrupts that can grab the kernel lock. The simplest way to achieve this is to make sure mutexes always raise the ipl to the highest level that has interrupts that grab the kernel lock. This will allow us to have "mpsafe" interrupt handlers at lower priority levels. No change for non-MULTIPROCESSOR kernels. tested by mpi@, landry@ ok mpi@, dlg@
2013-12-29Remove excessive parentheses.Brad Smith
pmap.c:1061:13: error: equality comparison with extraneous parentheses [-Werror,-Wparentheses-equality] ok mpi@
2013-12-18Provide MI symbol _STACKALIGNBYTESTheo de Raadt
2013-10-31Add a header for various hardware implementation dependent registerMartin Pieuchot
(HID) definitions, from FreeBSD with tweaks, instead of defining them in different places. ok kettenis@
2013-10-17remove capability to do a.outTheo de Raadt
2013-08-19Mark all the C functions called in real mode as non instrumented andMartin Pieuchot
remove the check for address relocation from MCOUNT_ENTER. This fix kernel profiling on powerpc architectures, broken since the buffers are per cpu. ok miod@
2013-08-07We uniformly define size_t to be unsigned long and ssize_t to be long. MakeMark Kettenis
sure that SIZE_MAX and SSIZE_MAX are defined as constants with a matching type on all are architectures. ok millert@, matthew@
2013-08-07Managed device mappings should be uncached by default.Mark Kettenis
ok mpi@
2013-08-07Mimic what's done on sparc64 and parse the OpenFirmware device tree toMartin Pieuchot
enumerate the pci devices. This allow us to not store the interrupt vector in the interrupt line register and to not try to attach pci devices disabled by firmware. With inputs from and ok kettenis@
2013-08-06The atomic_setbits_int() and atomic_clearbits_int() functions touch theMark Kettenis
condition code register so mark it s clobbered. Fixes uvm_page_physload() and who knows what else. ok jsg@, mpi@
2013-07-13unify register_t to long on all platformsTheo de Raadt
ok miod kettenis
2013-07-05Take II, this time without flubbing off_t: : move several internalPhilip Guenther
type definitions that are the same across all archs from <machine/_types.h> to <sys/_types.h> ok deraadt@ kettenis@ otto@
2013-07-04backout previous; off_t must be signed and there might be other C++ APIOtto Moerbeek
breakage lurking; ok kettenis@
2013-07-04To ease future changes, move several internal type definitions that arePhilip Guenther
the same across all archs from <machine/_types.h> to <sys/_types.h> ok deraadt@
2013-06-13ovbcopy begoneTheo de Raadt
2013-06-13don't use a ridiculous private copy of bcopy which is just like libc.Theo de Raadt
At least try to do a better job in libkern (not yet, but one day soon)
2013-06-01cleanup and consolidate the spinlock_lock (what a name!) code.Ted Unangst
it's now atomic_lock to better reflect its usage, and librthread now features a new spinlock that's really a ticket lock. thrlseep can handle both types of lock via a flag in the clock arg. (temp back compat hack) remove some old stuff that's accumulated along the way and no longer used. some feedback from dlg, who is concerned with all things ticket lock. (you need to boot a new kernel before installing librthread)
2013-05-21remove unused cpu_lock code (where it is truly unused). it is notTed Unangst
part of the future we have planned. middling ok from a few
2013-05-17Add a dummy IPL_MPSAFE definition.Mark Kettenis
ok miod@, mikeb@
2013-03-28Add STRONG_ALIAS macros to be used from assembly code in libc andMartynas Venckus
libm. While at it, remove now unused workarounds for lint. Agreed by kettenis@, guenther@, matthew@.
2013-03-28Add __strong_alias macros for all architectures to be able to aliasMartynas Venckus
another symbol without weak attribute. To be used in libc and libm soon. Agreed by kettenis@, guenther@, matthew@.
2013-03-26PGSHIFT and PGOFSET are now contained inside the kernel namespace.Theo de Raadt
2013-03-25ALIGNBYTES/ALIGN/ALIGNED_POINTER can move to the MI file.Theo de Raadt
2013-03-23refactor sys/param.h and machine/param.h. A lot of #ifdef _KERNEL is addedTheo de Raadt
to keep definitions our of user space. The MD files now follow a consistant order -- all namespace intrusion is at the tail can be cleaned up independently. locore, bootblocks, and libkvm still see enough visibility to build. Checked on 90% of platforms...
2013-03-12Fix kernel profiling on MP systems by using per-CPU buffers and teachMartin Pieuchot
kgmon(8) to deal with them, this time without public header changes. Previously various CPUs were iterating over the same global buffer at the same time to modify it and never ended. This diff includes some ideas submited by Thor Simon to NetBSD via miod@. ok deraadt@, mikeb@, haesbaert@
2013-02-12Back out per-CPU kernel profiling, it shouldn't modify a public headerMartin Pieuchot
at this moment.
2013-02-11Fix kernel profiling on MP systems by using per-CPU buffer. PreviouslyMartin Pieuchot
various CPUs were iterating over the same global buffer at the same time to modify it and never ended. This diff includes some ideas submited by Thor Simon to NetBSD via miod@. ok mikeb@, haesbaert@
2013-02-09No longer define EXEC_SCRIPT (probably coming from old PefoBSD). Also,Miod Vallat
DB_ELFSIZE ought to be defined in <machine/db_machdep.h>, not <machine/exec.h>
2013-01-16cpu_coredump() also needs to invoke vn_rdwr() without IO_NODELOCKED; onlyMiod Vallat
affects a.out binaries' core dumps.
2012-12-31Remove emulation errno mapping code from platforms that no longer havePhilip Guenther
non-native emulations. ok miod@
2012-12-08Recognize PowerPC 970 CPUs present in early PowerMac G5 from 2003 (7,2 andMartin Pieuchot
7,3) and let OpenBSD boot on these machines, yay! The 970 are similar to the 970FX except that they are manufactured in 130nm. Fix an issue reported by Andrew Fresh and kirby@ on misc@
2012-12-05Remove excessive sys/cdefs.h inclusionTheo de Raadt
ok guenther millert kettenis
2012-12-02Determine whether we're currently on the alternative signal stackPhilip Guenthe
dynamically, by comparing the stack pointer against the altstack base and size, so that you get the correct answer if you longjmp out of the signal handler, as tested by regress/sys/kern/stackjmp/. Also, fix alt stack handling on vax, where it was completely broken. Testing and corrections by miod@, krw@, tobiasu@, pirofti@
2012-11-05unifdef -D __HAVE_TIMECOUNTERMiod Vallat
2012-10-25Some LIBC_SCCS found lurking in the shadowsTheo de Raadt
2012-09-11Remove the 'OLF method' used for the transition from a.out to ELF andTheo de Raadt
for all the compat layers which are now gone. Linux compat still works because it always used another method in any case, and nothing looks at p_os anymore. ok jsing
2012-08-30Add the possibility to map DMA memory non-cached, based on the i386/amd64Martin Pieuchot
implementation. For the moment only the BUS_DMA_NOCACHE macro is required to build drm on macppc but it will be used soon. ok kettenis@
2012-08-28Implement pci_min_powerstate().Mark Kettenis
2012-08-22Convert cpp | as rules in bsd.lib.mk and lib/libc/sys/Makefile.inc to pure ccPascal Stumpf
invocations. This allows us to use the compiler builtin define __PIC__ to check for PIC/PIEness rather than passing -DPIC. Simplifies PIE work a lot. ok matthew@, conceptually ok kurt@
2012-08-21For interrupts that get established before we attach the interrupt controller,Mark Kettenis
store the type of the interrupt (level, edge). ok miod@, mpi@
2012-08-08Make this compile again.Miod Vallat
2012-08-07<sys/ktrace.h> is now pulled in via <sys/syscall_mi.h>, so drop it from herePhilip Guenthe
2012-08-07Move the common bits of syscall invocation and return handling intoPhilip Guenthe
an MI file, <sys/syscall_mi.h>, correcting inconsistencies and the handling when copyin() of arguments fails. Tested on i386, amd64, sparc64, and alpha (thanks naddy@) Any issues with other platforms will be fixed in tree. header name from millert@; ok miod@
2012-06-26create new machine/_float.h which is namespace clean. create a newTheo de Raadt
MI float.h which pulls in and defines the values that are needed from there, and repair sys/limits.h so that it defines the values it needs as well (depending on POSIX version, XPG version, etc). guenther has a more exact selection of that coming for limits.h. this also fixes a few mistakes for the vax. reviewed by kettenis and guenther.
2012-04-11The first ktrace record for a newly spawned thread is a returnMike Belopuhov
from a fork syscall done by the parent. Use __tfork, not rfork here to match the ktrace records for the parent (CALL __tfork, RET __tfork). ok guenther
2011-11-16Make userret() MI. On architectures which jammed stuff into it in theTheo de Raadt
past, pull that code out seperately. ok guenther miod
2011-11-15label_t is the kernel setjmp buffer. It should simply be an array ofTheo de Raadt
the right type, noone will ever fiddle with the internals. discussed with jsing
2011-11-09Add magic to use %r2 as the userland thread register.Mark Kettenis
ok guenther@
2011-10-27Specify the TLS variant for each platform.Philip Guenthe
2011-10-10Introduce pci_probe_device_hook(pci_chipset_tag_t, struct pci_attach_args *).Miod Vallat
This mandatory function will get invoked in pci_probe_device(), and allows a pci host driver to alter the pci_attach_args passed to a device when attaching. This function will also, if returning non-zero, cause the device to be skipped completely during all the phases of the PCI device discovery (i.e. ressource enumeration, ressource assignment, and actual attachment). This particular feature is experimental and might be reverted in the future (or the scope narrowed to device attachment only). A dummy #define pci_probe_device_hook() 0 is added to all platforms except sgi, where real functions (currently only returning 0) are added; real meat will be added shortly. Discussed at s2k11, no objection from the usual suspects.