summaryrefslogtreecommitdiffstats
path: root/sys/powerpc
Commit message (Collapse)AuthorAgeFilesLines
* Unbreak the KSE code. Keep track of zobie threads using the Per-CPU storagejulian2002-12-102-2/+2
| | | | | | | | during the context switch. Rearrange thread cleanups to avoid problems with Giant. Clean threads when freed or when recycled. Approved by: re (jhb)
* Under certain circumstances, we were calling kmem_free() frommux2002-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
* Add getcontext, setcontext, and swapcontext as system calls.deischen2002-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
* Move pmap_collect() out of the machine-dependent code, rename italc2002-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.
* Print real / avail memory in megabytes rather than kilobytes.des2002-11-092-8/+8
|
* Move the definitions of the hw.physmem, hw.usermem and hw.availpagestmm2002-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.
* Remove what was a temporary bogus assignment of bits of siginfo_t, as it doesjmallett2002-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.
* Split 4.x and 5.x signal handling so that we can keep 4.x signalpeter2002-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
* Add the USER_SR segment register to pcb state. Initialize correctly,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
* Add two hooks to signal module load and module unload to MD code.marcel2002-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
* Permits UFS ACLs to be used with the GENERIC kernel. Due to recentrwatson2002-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
* The a.out md_coredump stuff isn't referenced anywhere anymore, andpeter2002-10-151-5/+0
| | | | hasn't been filled in for ages.. Nuked.
* Remove the P1003_1B kernel option; it is no longer used.mike2002-10-131-2/+1
|
* Add standards visibility conditionals. Change any uses of sigset_t tomike2002-10-131-5/+14
| | | | struct __sigset to avoid depending on objects from <sys/signal.h>.
* Add conditionals to allow va_list to be defined in other headers.mike2002-10-061-0/+4
|
* o Add conditionals to allow va_list to be defined in other headers.mike2002-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.
* Roll back to previous version, no need for NO_GEOM when GEOM isgrehan2002-10-061-2/+0
| | | | standard.
* NB: This commit does *NOT* make GEOM the default in FreeBSDphk2002-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.
* Fix namespace issues by using visibility conditionals frommike2002-10-051-1/+3
| | | | <sys/cdefs.h>.
* Define _MACHINE.jmallett2002-10-051-1/+1
|
* style(9) <machine/setjmp.h> headers so they look mostly the same.mike2002-10-041-7/+9
|
* Clean up ddb warnings/errors and enable in GENERICgrehan2002-10-048-57/+59
| | | | | Approved by: benno Motivated by: gallatin
* - fix zero-sized stack alloc from previous commit. a default is nowgrehan2002-10-043-30/+294
| | | | | | | selected ala sparc64 - KSEIII routines implemented (taken from i386/sparc64) Approved by: Benno
* Some kernel threads try to do significant work, and the default KSTACK_PAGESscottl2002-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
* PIC_GOTOFF is OBE.peter2002-09-231-3/+0
|
* Be careful not to define GCC-specific optimizations in the non-GCCmike2002-09-231-2/+11
| | | | case.
* It's Apple GMAC, not HMAC.benno2002-09-221-1/+1
| | | | Approved by: jake (for sparc64)
* Implement db_print_backtrace() if DDB is compiled into the kernel. Thisjhb2002-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
* Updated to somewhat match sparc64/conf/GENERICgrehan2002-09-191-18/+94
| | | | Approved by: benno
* Support files and a h/w tree description for the PSIM ppc simulatorgrehan2002-09-196-0/+1018
| | | | Approved by: benno
* Driver for the macio south bridge, and ATA cell contained within.grehan2002-09-193-0/+817
| | | | Approved by: benno
* softc and register defs for the UniNorth chipgrehan2002-09-191-1/+19
| | | | Approved by: benno
* - probe the UniNorth chip in addition to the PCI bridgesgrehan2002-09-191-3/+114
| | | | | | | - enable GEM ethernet cell if present - allow sparse address mapping for devices Approved by: benno
* Removed osigframe. No need for COMPAT_43 signal bin-compat in PPC.grehan2002-09-191-6/+0
| | | | Approved by: benno
* psim device supportgrehan2002-09-191-0/+1
| | | | Approved by: benno
* <machine/types.> -> <sys/types.h>grehan2002-09-191-1/+1
| | | | Approved by: benno
* Fix clearing of recoverable exception MSR bit when disablinggrehan2002-09-191-1/+1
| | | | | | interrupts Approved by: benno
* Additional machdep sysctl constants needed for userland utilsgrehan2002-09-191-2/+6
| | | | Approved by: benno
* Added sparse address support, required by the macio ATA devicegrehan2002-09-191-4/+9
| | | | Approved by: benno
* Fixed branch labelsgrehan2002-09-191-5/+5
| | | | Approved by: benno
* - bring vm_mapbuf/unmapbuf in line with other archsgrehan2002-09-192-84/+50
| | | | | | - update for recent KSE changes Approved by: benno
* - make sure recoverable interrupts are re-enabled in the trap handlergrehan2002-09-192-14/+6
| | | | | | - turn on ast() loop to enable signal delivery Approved by: benno
* - worked around 32-bit big-endian syscall return value problemgrehan2002-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
* Add sync before isync for G4 cpusgrehan2002-09-191-1/+1
| | | | | Obtained from: NetBSD Approved by: benno
* - use symbol for user-context offsetgrehan2002-09-191-2/+7
| | | | | | - fix szsigcode size declaration Approved by: benno
* - use BAT registers to map device space and physical memorygrehan2002-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
* - psim device supportgrehan2002-09-191-17/+38
| | | | | | - comment out re-enabling of interrupts until problems are sorted Approved by: benno
* Clear on-demand BAT entries to properly restore OpenFirmware'sgrehan2002-09-192-0/+12
| | | | | | address space Approved by: benno
* psim device supportgrehan2002-09-192-0/+10
| | | | Approved by: benno
* - implemented sendsig/sigreturngrehan2002-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
OpenPOWER on IntegriCloud