summaryrefslogtreecommitdiffstats
path: root/sys/powerpc/include
Commit message (Collapse)AuthorAgeFilesLines
* Move the "- 1" into the RQB_FFS(mask) macro itself so thatpeter2002-06-201-1/+1
| | | | | | | | | | | | | | implementations can provide a base zero ffs function if they wish. This changes #define RQB_FFS(mask) (ffs64(mask)) foo = RQB_FFS(mask) - 1; to #define RQB_FFS(mask) (ffs64(mask) - 1) foo = RQB_FFS(mask); On some platforms we can get the "- 1" for free, eg: those that use the C code for ffs64(). Reviewed by: jake (in principle)
* Move the definition of ElfN_Hashelt to common headers. The only platformdfr2002-05-301-11/+0
| | | | which has a different definition for this is alpha.
* - Move macros that represent where syscall args are kept in a trapframe frombenno2002-05-281-0/+5
| | | | | | trap.c to frame.h - Use the macros in vm_machdep.c:cpu_fork() to set up the trap frame of the new thread.
* Move the kcopy() function from trap.c to machdep.c. Add a prototype.benno2002-05-281-0/+1
|
* Get the correct memory regions from OpenFirmware. We were getting thebenno2002-05-271-3/+3
| | | | | | | "available" ranges, not the "physical" ranges. Clean up some of the bootstrap code in the process. Submitted by: Peter Grehan <peterg@ptree32.com.au>
* Make the run queue parameters machine dependent. Optimize 64 bitjake2002-05-251-0/+46
| | | | | | | architectures by using a 64 bit word for the bit array which keeps track of non-empty queues. Reviewed by: peter
* Add the PSL_VEC flag for AltiVec (no, it's not here yet =))benno2002-05-191-2/+3
|
* - Rename the _C_LABEL macro to CNAME.benno2002-05-171-5/+6
| | | | | - Rename the _ASM_LABEL macro to ASMNAME. - Add the HIDENAME macro which is used in libc's syscall stuff.
* An exact copy of i386/include/float.h will work here.obrien2002-05-151-0/+73
|
* Move MI stuff out of MD param.h files.phk2002-05-141-48/+0
| | | | It can all still be overridden in the MD files should need suddenly arise.
* Remove the unused definitions of ctod() and dotc().phk2002-05-141-4/+0
|
* FPU support.benno2002-05-134-1/+40
| | | | Obtained from: NetBSD (portions)
* Increase the size of the kstack.benno2002-05-101-1/+1
|
* Gcc 3.1 varargs support.obrien2002-05-103-1/+35
|
* Update to newer trap code from NetBSD.benno2002-05-091-17/+31
| | | | Obtained from: NetBSD
* 1. Better track the executable status of mappings.benno2002-05-091-0/+2
| | | | | | | 2. Set a pcpu variable to the real address of the active pmap (used when exiting from traps. Obtained from: NetBSD (1)
* Rename the constants for the contents of the PVR register so as not tobenno2002-05-091-17/+17
| | | | conflict with cpu names used in config files..
* Commit of stuff that's been sitting in my tree for a while.benno2002-04-293-1/+410
| | | | | | | | | | | Highlights include: - New low-level trap code from NetBSD. The high level code still needs a lot of work. - Fixes for some pmap handling in thread switching. - The kernel will now get to attempting to jump into init in user mode. There are some pmap/trap issues which prevent it from actually getting there though. Obtained from: NetBSD (parts)
* Tidy up some loose ends.peter2002-04-291-1/+0
| | | | | | | | | | | | i386/ia64/alpha - catch up to sparc64/ppc: - replace pmap_kernel() with refs to kernel_pmap - change kernel_pmap pointer to (&kernel_pmap_store) (this is a speedup since ld can set these at compile/link time) all platforms (as suggested by jake): - gc unused pmap_reference - gc unused pmap_destroy - gc unused struct pmap.pm_count (we never used pm_count - we track address space sharing at the vmspace)
* Add inlines for mtsrin and mfsrin.benno2002-04-161-0/+17
|
* Add a nexus device.benno2002-04-151-0/+51
| | | | Copied from: sparc64
* GC an extraneous prototype of delay().benno2002-04-151-1/+0
|
* Include <sys/cdefs.h> for definition of __BSD_VISIBLE.mike2002-04-121-0/+1
| | | | Pointy hat to: mike
* Remove the hack for segsz_t from <sys/types.h>; use the normalmike2002-04-101-0/+1
| | | | _BSD_FOO_T_ method for defining segsz_t.
* Add manifest constants: _LITTLE_ENDIAN, _BIG_ENDIAN, _PDP_ENDIAN, andmike2002-04-101-6/+15
| | | | | | _BYTE_ORDER. These are far more useful than their non-underscored equivalents as these can be used in restricted namespace environments. Mark the non-underscored variants as deprecated.
* Stage-2 commit of the critical*() code. This re-inlines cpu_critical_enter()dillon2002-04-012-6/+76
| | | | | | | | | | | | | | | | | | | | | and cpu_critical_exit() and moves associated critical prototypes into their own header file, <arch>/<arch>/critical.h, which is only included by the three MI source files that need it. Backout and re-apply improperly comitted syntactical cleanups made to files that were still under active development. Backout improperly comitted program structure changes that moved localized declarations to the top of two procedures. Partially re-apply one of the program structure changes to move 'mask' into an intermediate block rather then in three separate sub-blocks to make the code more readable. Re-integrate bug fixes that Jake made to the sparc64 code. Note: In general, developers should not gratuitously move declarations out of sub-blocks. They are where they are for reasons of structure, grouping, readability, compiler-localizability, and to avoid developer-introduced bugs similar to several found in recent years in the VFS and VM code. Reviewed by: jake
* Compromise for critical*()/cpu_critical*() recommit. Cleanup the interruptdillon2002-03-272-22/+8
| | | | | | | | | | | | | | | | | | | disablement assumptions in kern_fork.c by adding another API call, cpu_critical_fork_exit(). Cleanup the td_savecrit field by moving it from MI to MD. Temporarily move cpu_critical*() from <arch>/include/cpufunc.h to <arch>/<arch>/critical.c (stage-2 will clean this up). Implement interrupt deferral for i386 that allows interrupts to remain enabled inside critical sections. This also fixes an IPI interlock bug, and requires uses of icu_lock to be enclosed in a true interrupt disablement. This is the stage-1 commit. Stage-2 will occur after stage-1 has stabilized, and will move cpu_critical*() into its own header file(s) + other things. This commit may break non-i386 architectures in trivial ways. This should be temporary. Reviewed by: core Approved by: core
* Guard against redefining __gnuc_va_list.obrien2002-03-241-1/+2
|
* ASM versions of __FBSDID.obrien2002-03-231-0/+6
|
* - Make all inlines for manipulating supervisor-level registers accept/returnbenno2002-03-211-6/+13
| | | | | register_t values. - Implement an inline for isync.
* GC some unused, bogus interrupt functions and replace them with properbenno2002-03-211-20/+6
| | | | implementations of intr_disable and intr_restore.
* Remove __P.alfred2002-03-2010-100/+96
| | | | Reveiwed by: benno
* Move the definition of PT_[GS]ET{,DB,FP}REGS from the MD ptrace.h to thedes2002-03-161-10/+0
| | | | | MI ptrace.h, since all platforms define them. Keep the MD ptrace.h around for FIX_SSTEP (which is currently only needed on Alpha).
* o Don't require long long support in bswap64() functions.mike2002-03-091-3/+33
| | | | | | | | | | | | | | | | | | | | | | | | | | o In i386's <machine/endian.h>, macros have some advantages over inlines, so change some inlines to macros. o In i386's <machine/endian.h>, ungarbage collect word_swap_int() (previously __uint16_swap_uint32), it has some uses on i386's with PDP endianness. Submitted by: bde o Move a comment up in <machine/endian.h> that was accidentially moved down a few revisions ago. o Reenable userland's use of optimized inline-asm versions of byteorder(3) functions. o Fix ordering of prototypes vs. redefinition of byteorder(3) functions, so that the non-GCC (libc asm) case has proper prototypes. o Add proper prototypes for byteorder(3) functions in <sys/param.h>. o Prevent redundant duplicate prototypes by making use of the _BYTEORDER_PROTOTYPED define. o Move the bswap16(), bswap32(), bswap64() C functions into MD space for platforms in which asm versions don't exist. This significantly reduces the complexity of some things at the cost of duplicate code. Reviewed by: bde
* - Modify pmap_activate so it only marks the pmap as active.benno2002-02-281-0/+1
| | | | - Add a pmap_deactivate function.
* Make fork work, at least for kthreads. Switching still has some issues.benno2002-02-282-17/+17
|
* - When enabling/disabling interrupts, set/clear both PSL_EE and PSL_RI, notbenno2002-02-281-5/+12
| | | | | just PSL_EE. - Make cpu_critical_enter/exit independant of save_intr/restore_intr.
* Add a missing (.benno2002-02-281-1/+1
|
* Add the following functions/macros to support byte order conversions andtmm2002-02-271-12/+0
| | | | | | | | | | | | | | | | | | | | | | | | device drivers for bus system with other endinesses than the CPU (using interfaces compatible to NetBSD): - bwap16() and bswap32(). These have optimized implementations on some architectures; for those that don't, there exist generic implementations. - macros to convert from a certain byte order to host byte order and vice versa, using a naming scheme like le16toh(), htole16(). These are implemented using the bswap functions. - stream bus space access functions, which do not perform a byte order conversion (while the normal access functions would if the bus endianess differs from the CPU endianess). htons(), htonl(), ntohs() and ntohl() are implemented using the new functions above for kernel usage. None of the above interfaces is currently exported to user land. Make use of the new functions in a few places where local implementations of the same functionality existed. Reviewed by: mike, bde Tested on alpha by: mike
* Make atomic_cmpset_32 correctly return 0 on failure.benno2002-02-241-0/+3
|
* o Move NTOHL() and associated macros into <sys/param.h>. These aremike2002-02-181-36/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | deprecated in favor of the POSIX-defined lowercase variants. o Change all occurrences of NTOHL() and associated marcros in the source tree to use the lowercase function variants. o Add missing license bits to sparc64's <machine/endian.h>. Approved by: jake o Clean up <machine/endian.h> files. o Remove unused __uint16_swap_uint32() from i386's <machine/endian.h>. o Remove prototypes for non-existent bswapXX() functions. o Include <machine/endian.h> in <arpa/inet.h> to define the POSIX-required ntohl() family of functions. o Do similar things to expose the ntohl() family in libstand, <netinet/in.h>, and <sys/param.h>. o Prepend underscores to the ntohl() family to help deal with complexities associated with having MD (asm and inline) versions, and having to prevent exposure of these functions in other headers that happen to make use of endian-specific defines. o Create weak aliases to the canonical function name to help deal with third-party software forgetting to include an appropriate header. o Remove some now unneeded pollution from <sys/types.h>. o Add missing <arpa/inet.h> includes in userland. Tested on: alpha, i386 Reviewed by: bde, jake, tmm
* style(9)obrien2002-02-181-2/+2
|
* Resurrect one of the easiest changes from my big include files roll-upwollman2002-02-151-0/+1
| | | | | | patch from a year ago: give file flags their own type. This does not (yet) change the type used by system calls or library functions. The underlying type was chosen to match what is returned by stat().
* Complete rework of the PowerPC pmap and a number of other bits in the earlybenno2002-02-145-87/+96
| | | | | | | | | | | | | | boot sequence. The new pmap.c is based on NetBSD's newer pmap.c (for the mpc6xx processors) which is 70% faster than the older code that the original pmap.c was based on. It has also been based on the framework established by jake's initial sparc64 pmap.c. There is no change to how far the kernel gets (it makes it to the mountroot prompt in psim) but the new pmap code is a lot cleaner. Obtained from: NetBSD (pmap code)
* Simple fixes to get the powerpc kernel compiling again.gallatin2002-01-282-2/+2
| | | | Reviewed by: mp
* Modify the critical section API as follows:jhb2001-12-182-18/+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-116-163/+16
| | | | | | | | | | | | | | | | | | | | | | | | | - 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
|
* Add multiple inclusion protection.jhb2001-12-061-0/+5
|
OpenPOWER on IntegriCloud