summaryrefslogtreecommitdiffstats
path: root/sys/powerpc
Commit message (Collapse)AuthorAgeFilesLines
* Compile osigreturn() unconditionally since it will always be needed onbde2002-02-012-8/+12
| | | | | | | | | | | | | | | | | | some arches and the syscall table is machine-independent. It was (bogusly) conditional on COMPAT_43, so this usually makes no difference. ia64: in addition: - replace the bogus cloned comment before osigreturn() by a correct one. osigreturn() is just a stub fo ia64's. - fix the formatting of cloned comment before sigreturn(). - fix the return code. use nosys() instead of returning ENOSYS to get the same semantics as if the syscall is not in the syscall table. Generating SIGSYS is actually correct here. - fix style bugs. powerpc: copy the cleaned up ia64 stub. This mainly fixes a bogus comment. sparc64: copy the cleaned up the ia64 stub, since there was no stub before.
* Simple fixes to get the powerpc kernel compiling again.gallatin2002-01-284-4/+4
| | | | Reviewed by: mp
* Modify the critical section API as follows:jhb2001-12-183-19/+5
| | | | | | | | | | | | | | | | | | | - The MD functions critical_enter/exit are renamed to start with a cpu_ prefix. - MI wrapper functions critical_enter/exit maintain a per-thread nesting count and a per-thread critical section saved state set when entering a critical section while at nesting level 0 and restored when exiting to nesting level 0. This moves the saved state out of spin mutexes so that interlocking spin mutexes works properly. - Most low-level MD code that used critical_enter/exit now use cpu_critical_enter/exit. MI code such as device drivers and spin mutexes use the MI wrappers. Note that since the MI wrappers store the state in the current thread, they do not have any return values or arguments. - mtx_intr_enable() is replaced with a constant CRITICAL_FORK which is assigned to curthread->td_savecrit during fork_exit(). Tested on: i386, alpha
* Overhaul the per-CPU support a bit:jhb2001-12-1115-226/+67
| | | | | | | | | | | | | | | | | | | | | | | | | - The MI portions of struct globaldata have been consolidated into a MI struct pcpu. The MD per-CPU data are specified via a macro defined in machine/pcpu.h. A macro was chosen over a struct mdpcpu so that the interface would be cleaner (PCPU_GET(my_md_field) vs. PCPU_GET(md.md_my_md_field)). - All references to globaldata are changed to pcpu instead. In a UP kernel, this data was stored as global variables which is where the original name came from. In an SMP world this data is per-CPU and ideally private to each CPU outside of the context of debuggers. This also included combining machine/globaldata.h and machine/globals.h into machine/pcpu.h. - The pointer to the thread using the FPU on i386 was renamed from npxthread to fpcurthread to be identical with other architectures. - Make the show pcpu ddb command MI with a MD callout to display MD fields. - The globaldata_register() function was renamed to pcpu_init() and now init's MI fields of a struct pcpu in addition to registering it with the internal array and list. - A pcpu_destroy() function was added to remove a struct pcpu from the internal array and list. Tested on: alpha, i386 Reviewed by: peter, jake
* Update to C99, s/__FUNCTION__/__func__/,obrien2001-12-102-2/+2
| | | | also don't use ANSI string concatenation.
* style(9)obrien2001-12-091-13/+14
|
* Allow maxusers to be specified as 0 in the kernel config, which willdillon2001-12-093-3/+5
| | | | | | | cause the system to auto-size to between 32 and 512 depending on the amount of memory. MFC after: 1 week
* Add multiple inclusion protection.jhb2001-12-061-0/+5
|
* o Stop abusing MD headers with non-MD types.mike2001-12-011-2/+0
| | | | | | | | | | | | | | | o Hide nonstandard functions and types in <netinet/in.h> when _POSIX_SOURCE is defined. o Add some missing types (required by POSIX.1-200x) to <netinet/in.h>. o Restore vendor ID from Rev 1.1 in <netinet/in.h> and make use of new __FBSDID() macro. o Fix some miscellaneous issues in <arpa/inet.h>. o Correct final argument for the inet_ntop() function (POSIX.1-200x). o Get rid of the namespace pollution from <sys/types.h> in <arpa/inet.h>. Reviewed by: fenner Partially submitted by: bde
* The interrupt nesting level is per-thread not per-CPU on FreeBSD.jhb2001-11-142-2/+0
|
* Don't enable FP in the kernel. It is not needed when -msoft-float is used.mp2001-11-132-2/+0
| | | | Reminded by: benno
* Clean up the trap handling code and make it consistent with the other platforms.mp2001-11-057-613/+895
| | | | Submitted by: jhb
* Add enable_fpu/save_fpu for handling the floating point registers in the PCB.mp2001-11-056-0/+235
| | | | Obtained from: NetBSD
* o Add new header <sys/stdint.h>.mike2001-11-024-0/+470
| | | | | | | | | | | | | | | | | | | | | o Make <stdint.h> a symbolic link to <sys/stdint.h>. o Move most of <sys/inttypes.h> into <sys/stdint.h>, as per C99. o Remove <sys/inttypes.h>. o Adjust includes in sys/types.h and boot/efi/include/ia64/efibind.h to reflect new location of integer types in <sys/stdint.h>. o Remove previously symbolicly linked <inttypes.h>, instead create a new file. o Add MD headers <machine/_inttypes.h> from NetBSD. o Include <sys/stdint.h> in <inttypes.h>, as required by C99; and include <machine/_inttypes.h> in <inttypes.h>, to fill in the remaining requirements for <inttypes.h>. o Add additional integer types in <machine/ansi.h> and <machine/limits.h> which are included via <sys/stdint.h>. Partially obtain from: NetBSD Tested on: alpha, i386 Discussed on: freebsd-standards@bostonradio.org Reviewed by: bde, fenner, obrien, wollman
* Remove funky right justification.mike2001-10-231-8/+8
| | | | Pointed out by: bde
* Move procfs_* from procfs_machdep.c into sys_process.c, and rename them todes2001-10-211-156/+0
| | | | | | proc_* in the process; procfs_machdep.c is no longer needed. Run-tested on i386, build-tested on Alpha, untested on other platforms.
* [partially forced commit due to pilot error in earlier commit attempt]des2001-10-214-15/+48
| | | | | | | | | | | | | | | | | {set,fill}_{,fp,db}regs() fixup: - Add dummy {set,fill}_dbregs() on architectures that don't have them. - KSEfy the powerpc versions (struct proc -> struct thread). - Some architectures had the prototypes in md_var.h, some in reg.h, and some in both; for consistency, move them to reg.h on all platforms. These functions aren't really MD (the implementation is MD, but the interface is MI), so they should move to an MI header, but I haven't figured out which one yet. Run-tested on i386, build-tested on Alpha, untested on other platforms.
* Fix includes based on recent changes to lock.h, mutex.h and ktr.h.mp2001-10-198-7/+10
|
* Try two on the preprocessing logic.obrien2001-10-191-1/+1
| | | | Reviewed by: ru
* Cleanup of the stdarg code.mp2001-10-192-54/+11
| | | | Submitted by: ru
* Add support for the gcc-2.95 stdarg implementation.mp2001-10-182-0/+40
|
* My attempts at minimizing the number of #def's got me in trouble.obrien2001-10-181-5/+5
|
* Add support for "__gnuc_va_list". Some overly "smart" libraries assumeobrien2001-10-181-2/+5
| | | | | | | the existence of the __gnuc_va_list type[*] because our compiler is GCC. [*] __gnuc_va_list is defined in the GCC ginclude/stdarg.h replacement headerwhich we don't use.
* Flesh out cpu_fork() and cpu_set_fork_handler(). This is a work in progress.benno2001-10-152-26/+122
|
* - Correct the type of the argument to delay() so as to not conflict withbenno2001-10-153-3/+4
| | | | | sys/boot/common/bootstrap.h. - Add a prototype for fork_trampoline().
* Fix typo.mp2001-10-153-3/+3
|
* Save WIP. Partial rewrite of cpu_switch() and savectx(). This makes it closermp2001-10-155-483/+76
| | | | | | to working but still needs some work to properly switch the full context (such as saving the fpu registers, switch stacks, etc.). Also, remove some dead code that was mixed in.
* Implement pmap_mapdev.benno2001-10-144-0/+82
|
* Add memory disk support to allow the boot process to proceed a bit further.mp2001-10-121-0/+4
|
* Modify a virtual address check to allow use of the openfirmware callbackmp2001-10-122-2/+2
| | | | used by the PowerPC simulator (PSIM).
* Add standard calls to device_add_child() and root_bus_configure().mp2001-10-121-0/+4
|
* Make MAXTSIZ, DFLDSIZ, MAXDSIZ, DFLSSIZ, MAXSSIZ, SGROWSIZ loaderps2001-10-101-1/+1
| | | | | | | tunable. Reviewed by: peter MFC after: 2 weeks
* Add a call to init_param() to initialize some necessary variables.mp2001-10-082-0/+6
|
* Dissociate ptrace from procfs.des2001-10-071-1/+0
| | | | | | | | | | | | | | | | | Until now, the ptrace syscall was implemented as a wrapper that called various functions in procfs depending on which ptrace operation was requested. Most of these functions were themselves wrappers around procfs_{read,write}_{,db,fp}regs(), with only some extra error checks, which weren't necessary in the ptrace case anyway. This commit moves procfs_rwmem() from procfs_mem.c into sys_process.c (renaming it to proc_rwmem() in the process), and implements ptrace() directly in terms of procfs_{read,write}_{,db,fp}regs() instead of having it fake up a struct uio and then call procfs_do{,db,fp}regs(). It also moves the prototypes for procfs_{read,write}_{,db,fp}regs() and proc_rwmem() from proc.h to ptrace.h, and marks all procfs files except procfs_machdep.c as "optional procfs" instead of "standard".
* Fix problem where a user buffer outside of the area being testedmjacob2001-10-022-2/+2
| | | | | | | | will be corrupted. PR: 29194 Obtained from: Tor.Egge@fast.no MFC after: 2 weeks
* Catch up to recent removal of curpcb from globals.h.mp2001-09-244-24/+32
|
* Add missing include file.mp2001-09-203-0/+3
|
* Don't include NFS headers.mp2001-09-201-4/+0
| | | | Reported by: dfr
* Replicate a change from alpha/genassym.c to other arches. This shouldpeter2001-09-201-3/+3
| | | | fix nfs-related build breakage.
* Use BATL/BATU macros instead of hardcoded hex constants.mp2001-09-203-27/+12
|
* Update PowerPC MD code to compile and do initial bootstrap based onmp2001-09-2022-193/+519
| | | | | | recent changes (KSE and VM requiring physmem to be setup). Reviewed by: benno, jhb, julian
* Cleanup and split of nfs client and server code.peter2001-09-181-2/+0
| | | | This builds on the top of several repo-copies.
* GC obsolete cruft from this file.jhb2001-09-181-14/+0
|
* Whitespace fixes.jhb2001-09-181-2/+2
|
* - If we ever do the per-cpu KTR stuff, the index won't be volatile as itjhb2001-09-182-20/+20
| | | | | | will be private to each CPU. - Re-style(9) the globaldata structures. There really needs to be a MI struct pcpu that has a MD struct mdpcpu member at some point.
* - Fix a missed idleproc -> idlethread conversion.jhb2001-09-182-4/+2
| | | | - Remove redundany fpucurproc (fpucurthread already existed)
* KSE Milestone 2julian2001-09-1211-51/+60
| | | | | | | | | | | | | | Note ALL MODULES MUST BE RECOMPILED make the kernel aware that there are smaller units of scheduling than the process. (but only allow one thread per process at this time). This is functionally equivalent to teh previousl -current except that there is a thread associated with each process. Sorry john! (your next MFC will be a doosie!) Reviewed by: peter@freebsd.org, dillon@freebsd.org X-MFC after: ha ha ha ha
* Rip some well duplicated code out of cpu_wait() and cpu_exit() and movepeter2001-09-102-50/+16
| | | | | | | | | | | | it to the MI area. KSE touched cpu_wait() which had the same change replicated five ways for each platform. Now it can just do it once. The only MD parts seemed to be dealing with fpu state cleanup and things like vm86 cleanup on x86. The rest was identical. XXX: ia64 and powerpc did not have cpu_throw(), so I've put a functional stub in place. Reviewed by: jake, tmm, dillon
* Missing part of dillon's coredump commit. cpu_coredump() was stillpeter2001-09-082-4/+2
| | | | | passing IO_NODELOCKED to vn_rdwr(), this would cause operations on the unlocked core vnode and softupdates nastiness if an a.out binary cored.
* style(9) the structure definitions.obrien2001-09-051-1/+1
|
OpenPOWER on IntegriCloud