aboutsummaryrefslogtreecommitdiff
path: root/sys/powerpc
Commit message (Collapse)AuthorAgeFilesLines
* Under certain circumstances, we were calling kmem_free() fromMaxime Henrion2002-11-222-0/+10
| | | | | | | | | | | | | i386 cpu_thread_exit(). This resulted in a panic with WITNESS since we need to hold Giant to call kmem_free(), and we weren't helding it anymore in cpu_thread_exit(). We now do this from a new MD function, cpu_thread_dtor(), called by thread_dtor(). Approved by: re@ Suggested by: jhb Notes: svn path=/head/; revision=107180
* Add getcontext, setcontext, and swapcontext as system calls.Daniel Eischen2002-11-162-0/+28
| | | | | | | | | | | | | | Previously these were libc functions but were requested to be made into system calls for atomicity and to coalesce what might be two entrances into the kernel (signal mask setting and floating point trap) into one. A few style nits and comments from bde are also included. Tested on alpha by: gallatin Notes: svn path=/head/; revision=106977
* Move pmap_collect() out of the machine-dependent code, rename itAlan Cox2002-11-133-18/+0
| | | | | | | | | | | to reflect its new location, and add page queue and flag locking. Notes: (1) alpha, i386, and ia64 had identical implementations of pmap_collect() in terms of machine-independent interfaces; (2) sparc64 doesn't require it; (3) powerpc had it as a TODO. Notes: svn path=/head/; revision=106838
* Print real / avail memory in megabytes rather than kilobytes.Dag-Erling Smørgrav2002-11-092-8/+8
| | | | Notes: svn path=/head/; revision=106697
* Move the definitions of the hw.physmem, hw.usermem and hw.availpagesThomas Moestl2002-11-072-26/+0
| | | | | | | | | | | | | | sysctls to MI code; this reduces code duplication and makes all of them available on sparc64, and the latter two on powerpc. The semantics by the i386 and pc98 hw.availpages is slightly changed: previously, holes between ranges of available pages would be included, while they are excluded now. The new behaviour should be more correct and brings i386 in line with the other architectures. Move physmem to vm/vm_init.c, where this variable is used in MI code. Notes: svn path=/head/; revision=106605
* Remove what was a temporary bogus assignment of bits of siginfo_t, as it doesJuli Mallett2002-11-062-4/+0
| | | | | | | | | not look like the prerequisites to fill it in properly will be in the tree for the upcoming release, but it's mostly done, so there is no need for these to stay around to remind us. Notes: svn path=/head/; revision=106503
* Split 4.x and 5.x signal handling so that we can keep 4.x signalPeter Wemm2002-10-253-45/+18
| | | | | | | | | | | | | | | | | | | handling clean and functional as 5.x evolves. This allows some of the nasty bandaids in the 5.x codepaths to be unwound. Encapsulate 4.x signal handling under COMPAT_FREEBSD4 (there is an anti-foot-shooting measure in place, 5.x folks need this for a while) and finish encapsulating the older stuff under COMPAT_43. Since the ancient stuff is required on alpha (longjmp(3) passes a 'struct osigcontext *' to the current sigreturn(2), instead of the 'ucontext_t *' that sigreturn is supposed to take), add a compile time check to prevent foot shooting there too. Add uniform COMPAT_43 stubs for ia64/sparc64/powerpc. Tested on: i386, alpha, ia64. Compiled on sparc64 (a few days ago). Approved by: re Notes: svn path=/head/; revision=105950
* Add the USER_SR segment register to pcb state. Initialize correctly,Peter Grehan2002-10-217-0/+22
| | | | | | | | | | | | and save/restore during a context switch. The USER_SR could be overwritten when the current thread was switched out with a faulting copyin/copyout. Approved by: Benno Notes: svn path=/head/; revision=105611
* Add two hooks to signal module load and module unload to MD code.Marcel Moolenaar2002-10-191-0/+14
| | | | | | | | | | | | | | | The primary reason for this is to allow MD code to process machine specific attributes, segments or sections in the ELF file and update machine specific state accordingly. An immediate use of this is in the ia64 port where unwind information is updated to allow debugging and tracing in/across modules. Note that this commit does not add the functionality to the ia64 port. See revision 1.9 of ia64/ia64/elf_machdep.c. Validated on: alpha, i386, ia64 Notes: svn path=/head/; revision=105469
* Permits UFS ACLs to be used with the GENERIC kernel. Due to recentRobert Watson2002-10-191-0/+1
| | | | | | | | | | | | | | | | ACL configuration changes, this shouldn't result in different code paths for file systems not explicitly configured for ACLs by the system administrator. For UFS1, administrators must still recompile their kernel to add support for extended attributes; for UFS2, it's sufficient to enable ACLs using tunefs or at mount-time (tunefs preferred for reliability reasons). UFS2, for a variety of reasons, including performance and reliability, is the preferred file system for use with ACLs. Approved by: re Notes: svn path=/head/; revision=105463
* The a.out md_coredump stuff isn't referenced anywhere anymore, andPeter Wemm2002-10-151-5/+0
| | | | | | | hasn't been filled in for ages.. Nuked. Notes: svn path=/head/; revision=105138
* Remove the P1003_1B kernel option; it is no longer used.Mike Barcroft2002-10-131-2/+1
| | | | Notes: svn path=/head/; revision=105054
* Add standards visibility conditionals. Change any uses of sigset_t toMike Barcroft2002-10-131-5/+14
| | | | | | | struct __sigset to avoid depending on objects from <sys/signal.h>. Notes: svn path=/head/; revision=105014
* Add conditionals to allow va_list to be defined in other headers.Mike Barcroft2002-10-061-0/+4
| | | | Notes: svn path=/head/; revision=104584
* o Add conditionals to allow va_list to be defined in other headers.Mike Barcroft2002-10-061-3/+11
| | | | | | | | o Standardize on _MACHINE_STDARG_H_ to allow multiple header includes. o Restrict the definition of va_copy() to C99 environments. Notes: svn path=/head/; revision=104583
* Roll back to previous version, no need for NO_GEOM when GEOM isPeter Grehan2002-10-061-2/+0
| | | | | | | standard. Notes: svn path=/head/; revision=104567
* NB: This commit does *NOT* make GEOM the default in FreeBSDPoul-Henning Kamp2002-10-051-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | NB: But it will enable it in all kernels not having options "NO_GEOM" Put the GEOM related options into the intended order. Add "options NO_GEOM" to all kernel configs apart from NOTES. In some order of controlled fashion, the NO_GEOM options will be removed, architecture by architecture in the coming days. There are currently three known issues which may force people to need the NO_GEOM option: boot0cfg/fdisk: Tries to update the MBR while it is being used to control slices. GEOM does not allow this as a direct operation. SCSI floppy drives: Appearantly the scsi-da driver return "EBUSY" if no media is inserted. This is wrong, it should return ENXIO. PC98: It is unclear if GEOM correctly recognizes all variants of PC98 disklabels. (Help Wanted! I have neither docs nor HW) These issues are all being worked. Sponsored by: DARPA & NAI Labs. Notes: svn path=/head/; revision=104519
* Fix namespace issues by using visibility conditionals fromMike Barcroft2002-10-051-1/+3
| | | | | | | <sys/cdefs.h>. Notes: svn path=/head/; revision=104505
* Define _MACHINE.Juli Mallett2002-10-051-1/+1
| | | | Notes: svn path=/head/; revision=104498
* style(9) <machine/setjmp.h> headers so they look mostly the same.Mike Barcroft2002-10-041-7/+9
| | | | Notes: svn path=/head/; revision=104493
* Clean up ddb warnings/errors and enable in GENERICPeter Grehan2002-10-048-57/+59
| | | | | | | | Approved by: benno Motivated by: gallatin Notes: svn path=/head/; revision=104435
* - fix zero-sized stack alloc from previous commit. a default is nowPeter Grehan2002-10-043-30/+294
| | | | | | | | | | selected ala sparc64 - KSEIII routines implemented (taken from i386/sparc64) Approved by: Benno Notes: svn path=/head/; revision=104434
* Some kernel threads try to do significant work, and the default KSTACK_PAGESScott Long2002-10-023-12/+78
| | | | | | | | | | | | | | | | doesn't give them enough stack to do much before blowing away the pcb. This adds MI and MD code to allow the allocation of an alternate kstack who's size can be speficied when calling kthread_create. Passing the value 0 prevents the alternate kstack from being created. Note that the ia64 MD code is missing for now, and PowerPC was only partially written due to the pmap.c being incomplete there. Though this patch does not modify anything to make use of the alternate kstack, acpi and usb are good candidates. Reviewed by: jake, peter, jhb Notes: svn path=/head/; revision=104354
* PIC_GOTOFF is OBE.Peter Wemm2002-09-231-3/+0
| | | | Notes: svn path=/head/; revision=103850
* Be careful not to define GCC-specific optimizations in the non-GCCMike Barcroft2002-09-231-2/+11
| | | | | | | case. Notes: svn path=/head/; revision=103814
* It's Apple GMAC, not HMAC.Benno Rice2002-09-221-1/+1
| | | | | | | Approved by: jake (for sparc64) Notes: svn path=/head/; revision=103771
* Implement db_print_backtrace() if DDB is compiled into the kernel. ThisJohn Baldwin2002-09-191-0/+4
| | | | | | | | | | | | | | | | | | | | | | | MD function is just a wrapper around db_stack_trace_cmd() that prints out a backtrace of curthread. Currently, this function is only implemented on i386 and alpha (and the alpha version isn't quite tested yet, will do that in a bit). Other changes: - For i386, fix a bug in the raw frame address case. The eip we extract from the passed in frame address does not match the frame we received. Thus, instead of printing a bogus frame with the wrong eip, go ahead and advance frame down to the same frame as the eip we are using. - For alpha, attempt to add a way of doing a raw trace for alpha. Instead of passing a frame address in 'addr', pass in a pointer to a structure containing PC and KSP and use those to start the backtrace. The alpha db_print_backtrace() uses asm to read in the current PC and KSP values into such a request. Tested on: i386 Requested by: many Notes: svn path=/head/; revision=103646
* Updated to somewhat match sparc64/conf/GENERICPeter Grehan2002-09-191-17/+93
| | | | | | | Approved by: benno Notes: svn path=/head/; revision=103629
* Support files and a h/w tree description for the PSIM ppc simulatorPeter Grehan2002-09-196-0/+1018
| | | | | | | Approved by: benno Notes: svn path=/head/; revision=103620
* Driver for the macio south bridge, and ATA cell contained within.Peter Grehan2002-09-193-0/+817
| | | | | | | Approved by: benno Notes: svn path=/head/; revision=103619
* softc and register defs for the UniNorth chipPeter Grehan2002-09-191-1/+19
| | | | | | | Approved by: benno Notes: svn path=/head/; revision=103618
* - probe the UniNorth chip in addition to the PCI bridgesPeter Grehan2002-09-191-3/+114
| | | | | | | | | | - enable GEM ethernet cell if present - allow sparse address mapping for devices Approved by: benno Notes: svn path=/head/; revision=103617
* Removed osigframe. No need for COMPAT_43 signal bin-compat in PPC.Peter Grehan2002-09-191-6/+0
| | | | | | | Approved by: benno Notes: svn path=/head/; revision=103616
* psim device supportPeter Grehan2002-09-191-0/+1
| | | | | | | Approved by: benno Notes: svn path=/head/; revision=103615
* <machine/types.> -> <sys/types.h>Peter Grehan2002-09-191-1/+1
| | | | | | | Approved by: benno Notes: svn path=/head/; revision=103614
* Fix clearing of recoverable exception MSR bit when disablingPeter Grehan2002-09-191-1/+1
| | | | | | | | | interrupts Approved by: benno Notes: svn path=/head/; revision=103613
* Additional machdep sysctl constants needed for userland utilsPeter Grehan2002-09-191-2/+6
| | | | | | | Approved by: benno Notes: svn path=/head/; revision=103612
* Added sparse address support, required by the macio ATA devicePeter Grehan2002-09-191-4/+9
| | | | | | | Approved by: benno Notes: svn path=/head/; revision=103611
* Fixed branch labelsPeter Grehan2002-09-191-5/+5
| | | | | | | Approved by: benno Notes: svn path=/head/; revision=103610
* - bring vm_mapbuf/unmapbuf in line with other archsPeter Grehan2002-09-192-84/+50
| | | | | | | | | - update for recent KSE changes Approved by: benno Notes: svn path=/head/; revision=103609
* - make sure recoverable interrupts are re-enabled in the trap handlerPeter Grehan2002-09-192-14/+6
| | | | | | | | | - turn on ast() loop to enable signal delivery Approved by: benno Notes: svn path=/head/; revision=103608
* - worked around 32-bit big-endian syscall return value problemPeter Grehan2002-09-192-18/+40
| | | | | | | | | | - syscall register spills weren't copied in correctly - removed VM_PROT_READ from the fault type on write protect faults Approved by: benno Notes: svn path=/head/; revision=103607
* Add sync before isync for G4 cpusPeter Grehan2002-09-191-1/+1
| | | | | | | | Obtained from: NetBSD Approved by: benno Notes: svn path=/head/; revision=103606
* - use symbol for user-context offsetPeter Grehan2002-09-191-2/+7
| | | | | | | | | - fix szsigcode size declaration Approved by: benno Notes: svn path=/head/; revision=103605
* - use BAT registers to map device space and physical memoryPeter Grehan2002-09-193-84/+402
| | | | | | | | | | | | | - remove test in pmap_activate that prevented vmspace sharing (v/rfork) - always sync icache in pmap_enter until problems are sorted - fix incorrect use of regions in pmap_kenter - bring in pmap_release from NetBSD - fix overwrite of bootstrap flag in pmap_pvo_enter Approved by: benno Notes: svn path=/head/; revision=103604
* - psim device supportPeter Grehan2002-09-191-16/+37
| | | | | | | | | - comment out re-enabling of interrupts until problems are sorted Approved by: benno Notes: svn path=/head/; revision=103603
* Clear on-demand BAT entries to properly restore OpenFirmware'sPeter Grehan2002-09-192-0/+12
| | | | | | | | | address space Approved by: benno Notes: svn path=/head/; revision=103602
* psim device supportPeter Grehan2002-09-192-0/+10
| | | | | | | Approved by: benno Notes: svn path=/head/; revision=103601
* - implemented sendsig/sigreturnPeter Grehan2002-09-192-676/+338
| | | | | | | | | | | | - sysctl for cacheline size, required by libc/rtld - init'd more exception vectors - fixed problem with register overwrite in exec_setregs - removed redundant NetBSD code Approved by: benno Notes: svn path=/head/; revision=103600
* - moved intrcnt/intrnames to locore.s to fix sysctl -a panicPeter Grehan2002-09-195-12/+36
| | | | | | | Approved by: benno Notes: svn path=/head/; revision=103599