summaryrefslogtreecommitdiff
path: root/sys/arch/powerpc
AgeCommit message (Collapse)Author
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.
2011-09-08Provide namespace-safe alignment macros in <machine/_types.h>, withPhilip Guenthe
compat names kept in <machine/param.h>. In <sys/socket.h>, pull in <sys/_types.h> instead of the namespace polluting <machine/param.h> and completely eliminate __CMSG_ALIGN, replaced by _ALIGN ok deraadt@
2011-09-08Make the INT_FAST*_{MIN,MAX} macros match the types they're defined to.Philip Guenthe
Since the underlying types of the int_fast types are set by machine/_types.h, put internal macros in that same file and define the exposed INT_FAST*_{MIN,MAX} macros from those. ok millert@, kettenis@
2011-08-29Return of the long missing powerpc interrupt rewrite. Was working forDale Rahn
several weeks before release on macppc, socppc bugs just fixed.
2011-08-29Only provide FLT_EVAL_METHOD for C99. Add missing DECIMAL_DIG for C99.Mark Kettenis
ok guenther@
2011-08-22move powerpc to non-__STRICT_ALIGNMENT, as it always was. EssentiallyTheo de Raadt
__STRICT_ALIGNMENT is talking about accessing of integer types; it does not cover doubles or floats or other things ok miod kettenis
2011-08-22mark setfault() with __returns_twiceTheo de Raadt
ok kettenis drahn
2011-07-30Send SIGBUS instead of SIGSEGV for unaligned access which is not emulatedTheo de Raadt
ok kettenis
2011-07-11Revert art@'s moving around of the KERNEL_LOCK()/KERNEL_UNLOCK() calls,Philip Guenthe
as it causes hangs in some ports, including libsigsegv's configure script confirmed by krw@, landry@
2011-07-07There is a bunch of places in the kernel entry points where we don'tArtur Grabowski
hold the kernel lock, but still need call one function that needs it. Instead of grabbing the lock all over the place, move the locks into the affected functions: trapsignal, scdebug*, ktrsyscall, ktrsysret, systrace_redirect and ADDUPROF. In the cases we already hold the biglock we'll just recurse. kettenis@, beck@ ok
2011-07-07Return retcode in correct register. 'better commit that' kettenis@Dale Rahn
2011-07-06Clean up after P_BIGLOCK removal.Artur Grabowski
KERNEL_PROC_LOCK -> KERNEL_LOCK KERNEL_PROC_UNLOCK -> KERNEL_UNLOCK oga@ ok
2011-05-30Remove the freelist member from vm_physsegOwain Ainsworth
The new world order of pmemrange makes this data completely redundant (being dealt with by the pmemrange constraints instead). Remove all code that messes with the freelist. While touching every caller of uvm_page_physload() anyway, add the flags argument to all callers (all but one is 0 and that one already used PHYSLOAD_DEVICE) and remove the macro magic to allow callers to continue without it. Should shrink the code a bit, as well. matthew@ pointed out some mistakes i'd made. ``freelist death, I like. Ok.' ariane@ `I agree with the general direction, go ahead and i'll fix any fallout shortly'' miod@ (68k 88k and vax i could not check would build)
2011-05-25Also enclose variable names with external linkage in __BEGIN_DECLS.Martynas Venckus
Doesn't matter much since C++ ABI used by GCC doesn't mangle variable names; however technically is required by Section 7.5 of the C++ spec. Discussed with/OK guenther@, matthew@.
2011-05-21It's better to have the pci_intr_map_msi() stub return -1.Mark Kettenis
2011-05-21Add pci_intr_map_msi() stub.Mark Kettenis
2011-04-28fenv improvements and cleanupsMartynas Venckus
2011-04-25fenv for powerpcMartynas Venckus
2011-04-07Make sure the ALIGN() macro uses u_long on all platforms for consistency, andMiod Vallat
update the comment block accordingly.
2011-04-03Move PPWAIT flag from struct proc to process, so that rthreads inPhilip Guenthe
a vforked child behave correctly. Have the parent in a vfork() wait on a (different) flag in *its* process instead of the child to prevent a possible use-after-free. When ktracing the child return from a fork, call it rfork if an rthread was created. ok blambert@
2011-03-23Normalize sentinel. Use _MACHINE_*_H_ and _<ARCH>_*_H_ properly and consitently.Paul Irofti
Discussed and okay drahn@. Okay deraadt@.
2011-03-11Use _MACHINE_ENDIAN_H_ for this is The Right Thing To Do.Paul Irofti
Okay guenther@, millert@.
2011-01-08rename imask[] to cpu_imask[] to because imask is too loud as far asTheo de Raadt
kernel namespace ok miod
2010-12-26Kill pmap_phys_address(), and force every driver's mmap() routine to returnMiod Vallat
a physical address [more precisely, something suitable to pass to pmap_enter()'sphysical address argument]. This allows MI drivers to implement mmap() routines without having to know about the pmap_phys_address() implementation and #ifdef obfuscation.
2010-12-21Convert netisr to a normal soft interrupt instead of hanving MD codeClaudio Jeker
for it. This makes the netisr a real C function which will help further development. No noticable performance change on i386 and amd64. With input from kettenis@ and miod@ additional OKs mikeb@ and henning@
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@
2010-11-27Remove ddb single-step load and store counters. Most platforms do notMiod Vallat
implement them, and they are of questionable usefulness.
2010-11-18Declare pmap_proc_iflush() in <uvm/uvm_pmap.h> unless <machine/pmap.h>Miod Vallat
provides an inline version of it.
2010-10-01Provide a WEAK_ALIAS macro in <machine/asm.h> for the few platformsPhilip Guenthe
that didn't already have one, and then immediately use it in libc's SYS.h ok miod@
2010-09-28Implement a per-cpu held mutex counter if DIAGNOSTIC on all non-x86 platforms,Miod Vallat
to complete matthew@'s commit of a few days ago, and drop __HAVE_CPU_MUTEX_LEVEL define. With help from, and ok deraadt@.