aboutsummaryrefslogtreecommitdiff
path: root/sys/powerpc
Commit message (Collapse)AuthorAgeFilesLines
* Migrate the thread stack management functions from the machine-dependentAlan Cox2003-06-144-460/+1
| | | | | | | | | | | | | | | | | | | to the machine-independent parts of the VM. At the same time, this introduces vm object locking for the non-i386 platforms. Two details: 1. KSTACK_GUARD has been removed in favor of KSTACK_GUARD_PAGES. The different machine-dependent implementations used various combinations of KSTACK_GUARD and KSTACK_GUARD_PAGES. To disable guard page, set KSTACK_GUARD_PAGES to 0. 2. Remove the (unnecessary) clearing of PG_ZERO in vm_thread_new. In 5.x, (but not 4.x,) PG_ZERO can only be set if VM_ALLOC_ZERO is passed to vm_page_alloc() or vm_page_grab(). Notes: svn path=/head/; revision=116355
* Move the *_new_altkstack() and *_dispose_altkstack() functions out of theAlan Cox2003-06-143-75/+0
| | | | | | | | various pmap implementations into the machine-independent vm. They were all identical. Notes: svn path=/head/; revision=116328
* GC unused cpu_wait() functionPeter Wemm2003-06-112-12/+0
| | | | Notes: svn path=/head/; revision=116188
* Note that scbus is required for SCSI, not just "required" in general.Juli Mallett2003-06-081-1/+1
| | | | | | | | Submitted by: Edward Kaplan (tmbg37 on IRC) Reviewed by: rwatson (in principle) Notes: svn path=/head/; revision=115999
* Change the second (and last) argument of cpu_set_upcall(). PreviouslyMarcel Moolenaar2003-06-042-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | we were passing in a void* representing the PCB of the parent thread. Now we pass a pointer to the parent thread itself. The prime reason for this change is to allow cpu_set_upcall() to copy (parts of) the trapframe instead of having it done in MI code in each caller of cpu_set_upcall(). Copying the trapframe cannot always be done with a simply bcopy() or may not always be optimal that way. On ia64 specifically the trapframe contains information that is specific to an entry into the kernel and can only be used by the corresponding exit from the kernel. A trapframe copied verbatim from another frame is in most cases useless without some additional normalization. Note that this change removes the assignment to td->td_frame in some implementations of cpu_set_upcall(). The assignment is redundant. A previous call to cpu_thread_setup() already did the exact same assignment. An added benefit of removing the redundant assignment is that we can now change td_pcb without nasty side-effects. This change officially marks the ability on ia64 for 1:1 threading. Not tested on: amd64, powerpc Compile & boot tested on: alpha, sparc64 Functionally tested on: i386, ia64 Notes: svn path=/head/; revision=115858
* Remove #include <sys/disklabel.h>Poul-Henning Kamp2003-06-012-2/+0
| | | | Notes: svn path=/head/; revision=115614
* Bring back bus_dmasync_op_t. It is now a typedef to an int, though theScott Long2003-05-272-2/+3
| | | | | | | | | | | BUS_DMASYNC_ definitions remain as before. The does not change the ABI, and reverts the API to be a bit more compatible and flexible. This has survived a full 'make universe'. Approved by: re (bmah) Notes: svn path=/head/; revision=115343
* sys/sys/limits.h:Alexander Kabaev2003-05-192-3/+3
| | | | | | | | | | | | | | | | | | - Fix visibilty test for LONG_BIT and WORD_BIT. `#if defined(__FOO_VISIBLE)' is alays wrong because __FOO_VISIBLE is always defined (to 0 for invisibility). sys/<arch>/include/limits.h sys/<arch>/include/_limits.h: - Style fixes. Submitted by: bde Reviewed by: bsdmike Approved by: re (scottl) Notes: svn path=/head/; revision=115164
* - Merge struct procsig with struct sigacts.John Baldwin2003-05-132-8/+10
| | | | | | | | | | | | | | | | | | | | - Move struct sigacts out of the u-area and malloc() it using the M_SUBPROC malloc bucket. - Add a small sigacts_*() API for managing sigacts structures: sigacts_alloc(), sigacts_free(), sigacts_copy(), sigacts_share(), and sigacts_shared(). - Remove the p_sigignore, p_sigacts, and p_sigcatch macros. - Add a mutex to struct sigacts that protects all the members of the struct. - Add sigacts locking. - Remove Giant from nosys(), kill(), killpg(), and kern_sigaction() now that sigacts is locked. - Several in-kernel functions such as psignal(), tdsignal(), trapsignal(), and thread_stopped() are now MP safe. Reviewed by: arch@ Approved by: re (rwatson) Notes: svn path=/head/; revision=114983
* Things run thru the C preprocessor must use C-style comments.David E. O'Brien2003-05-052-22/+22
| | | | Notes: svn path=/head/; revision=114727
* Style fixes.Alexander Kabaev2003-05-041-8/+11
| | | | | | | | | | | | Remove DBL_DIG, DBL_MIN, DBL_MAX and their FLT_ counterparts, they were marked for deprecation ever since SUSv1 at least. Only define ULLONG_MIN/MAX and LLONG_MAX if long long type is supported. Restore a lost comment in MI _limits.h file and remove it from sys/limits.h where it does not belong. Notes: svn path=/head/; revision=114678
* Back out last commits. The elf64/elf32 kernel name thing was more painPeter Wemm2003-05-012-6/+2
| | | | | | | than it was worth. Notes: svn path=/head/; revision=114374
* Slight reorg and added AMD64 support. A couple of the MODINFOMD_* valuesPeter Wemm2003-05-011-6/+0
| | | | | | | | | | | | that were added to sparc64 and later powerpc, really should have been in the MI area. But changing that now with insufficient preperation will just cause too much pain. Move MD_FETCH() to the MI sys/linker.h file to avoid another two copies of it. Notes: svn path=/head/; revision=114373
* Fix transcription error. Use == NULL, not != NULL. Fortunately thisPeter Wemm2003-04-302-2/+2
| | | | | | | was harmless. Notes: svn path=/head/; revision=114342
* Look for an elf32 kernel (powerpc) and elf64 kernel (sparc64) as wellPeter Wemm2003-04-302-2/+6
| | | | | | | as a plain "elf kernel". Notes: svn path=/head/; revision=114340
* Range check the syscall number before looking it up in the syscallnames[]John Baldwin2003-04-302-2/+2
| | | | | | | | | array. Submitted by: pho Notes: svn path=/head/; revision=114305
* Deprecate machine/limits.h in favor of new sys/limits.h.Alexander Kabaev2003-04-291-66/+4
| | | | | | | | | | Change all in-tree consumers to include <sys/limits.h> Discussed on: standards@ Partially submitted by: Craig Rodrigues <rodrigc@attbi.com> Notes: svn path=/head/; revision=114216
* - Push down Giant into the sysarch() calls that still need Giant.John Baldwin2003-04-251-1/+1
| | | | | | | | - Standardize on EINVAL rather than EOPNOTSUPP if the sysarch op value is invalid. Notes: svn path=/head/; revision=114029
* Add an argument to get_mcontext() which specified whether theDaniel Eischen2003-04-252-2/+2
| | | | | | | | | | | | | | | | | | | | | | | syscall return values should be cleared. The system calls getcontext() and swapcontext() want to return 0 on success but these contexts can be switched to at a later time so the return values need to be cleared in the saved register sets. Other callers of get_mcontext() would normally want the context without clearing the return values. Remove the i386-specific context saving from the KSE code. get_mcontext() is not i386-specific any more. Fix a bad pointer in the alpha get_mcontext() code. The context was being bcopy()'d from &td->tf_frame, but tf_frame is itself a pointer, so the thread was being copied instead. Spotted by jake. Glanced at by: jake Reviewed by: bde (months ago) Notes: svn path=/head/; revision=113998
* Add a new sys/limits.h file which in turn depends on machine/_limits.hAlexander Kabaev2003-04-231-53/+42
| | | | | | | | | | | | to get actual constant values. This is in preparation for machine/limits.h retirement. Discussed on: standards@ Submitted by: Craig Rodrigues <rodrigc@attbi.com> (*) Modified by: kan Notes: svn path=/head/; revision=113941
* add scbus for FireWire.Hidetoshi Shimokawa2003-04-221-0/+7
| | | | Notes: svn path=/head/; revision=113837
* Add FireWire drivers to GENERIC.Hidetoshi Shimokawa2003-04-211-0/+5
| | | | Notes: svn path=/head/; revision=113803
* Fix compile warning - proc should have been thread.Peter Grehan2003-04-191-1/+1
| | | | Notes: svn path=/head/; revision=113703
* Remove reference to ata resource in print_child.Peter Grehan2003-04-181-1/+0
| | | | Notes: svn path=/head/; revision=113650
* Remove sparse address hack.Peter Grehan2003-04-181-2/+0
| | | | Notes: svn path=/head/; revision=113649
* Vastly simplify the macio ATA attachment, now that the register filePeter Grehan2003-04-181-225/+42
| | | | | | | indirection is handled in the ATA common code. Notes: svn path=/head/; revision=113648
* Remove sparse addressing hack. The macio ATA driver no longer requiresPeter Grehan2003-04-182-5/+0
| | | | | | | this. Notes: svn path=/head/; revision=113647
* - Convert NetBSD-derived macros to inline functions for betterPeter Grehan2003-04-181-65/+176
| | | | | | | | | type-checking and future debug code. - Remove sparse addressing hack, since the only consumer, the macio ATA driver, doesn't require it anymore. Notes: svn path=/head/; revision=113646
* I deserve a big pointy hat for having missed all those referencesMaxime Henrion2003-04-101-9/+5
| | | | | | | to bus_dmasync_op_t in my last commit. Notes: svn path=/head/; revision=113350
* Change the operation parameter of bus_dmamap_sync() from anMaxime Henrion2003-04-101-1/+1
| | | | | | | | | enum to an int and redefine the BUS_DMASYNC_* constants as flags. This allows us to specify several operations in one call to bus_dmamap_sync() as in NetBSD. Notes: svn path=/head/; revision=113347
* Introduce an M_ASSERTPKTHDR() macro which performs the very common taskDag-Erling Smørgrav2003-04-081-2/+1
| | | | | | | | | | of asserting that an mbuf has a packet header. Use it instead of hand- rolled versions wherever applicable. Submitted by: Hiten Pandya <hiten@unixdaemons.com> Notes: svn path=/head/; revision=113255
* Define ovbcopy() as a macro which expands to the equivalent bcopy() call,Dag-Erling Smørgrav2003-04-041-6/+0
| | | | | | | | | | | | | | | | | to take care of the KAME IPv6 code which needs ovbcopy() because NetBSD's bcopy() doesn't handle overlap like ours. Remove all implementations of ovbcopy(). Previously, bzero was a function pointer on i386, to save a jmp to bzero_vector. Get rid of this microoptimization as it only confuses things, adds machine-dependent code to an MD header, and doesn't really save all that much. This commit does not add my pagezero() / pagecopy() code. Notes: svn path=/head/; revision=113090
* Use __FBSDID rather than rcsid[].David E. O'Brien2003-04-0323-92/+46
| | | | Notes: svn path=/head/; revision=113038
* - Define a new md function 'casuptr'. This atomically compares and setsJeff Roberson2003-04-012-0/+16
| | | | | | | | | | | | | a pointer that is in user space. It will be used as the basic primitive for a kernel supported user space lock implementation. - Implement this function in x86's support.s - Provide stubs that return -1 in all other architectures. Implementations will follow along shortly. Reviewed by: jake Notes: svn path=/head/; revision=112898
* - Move p->p_sigmask to td->td_sigmask. Signal masks will be per thread withJeff Roberson2003-03-312-6/+6
| | | | | | | | | | a follow on commit to kern_sig.c - signotify() now operates on a thread since unmasked pending signals are stored in the thread. - PS_NEEDSIGCHK moves to TDF_NEEDSIGCHK. Notes: svn path=/head/; revision=112888
* - Change trapsignal() to accept a thread and not a proc.Jeff Roberson2003-03-312-2/+2
| | | | | | | | | | - Change all consumers to pass in a thread. Right now this does not cause any functional changes but it will be important later when signals can be delivered to specific threads. Notes: svn path=/head/; revision=112883
* - Add vm_paddr_t, a physical address type. This is required for systemsJake Burkholder2003-03-251-0/+1
| | | | | | | | | | | | | | | | | | where physical addresses larger than virtual addresses, such as i386s with PAE. - Use this to represent physical addresses in the MI vm system and in the i386 pmap code. This also changes the paddr parameter to d_mmap_t. - Fix printf formats to handle physical addresses >4G in the i386 memory detection code, and due to kvtop returning vm_paddr_t instead of u_long. Note that this is a name change only; vm_paddr_t is still the same as vm_offset_t on all currently supported platforms. Sponsored by: DARPA, Network Associates Laboratories Discussed with: re, phk (cdevsw change) Notes: svn path=/head/; revision=112569
* Remove bitrot associated with `maxusers'.Ruslan Ermilov2003-03-221-1/+0
| | | | | | | Submitted by: bde Notes: svn path=/head/; revision=112498
* Use atomic operations to increment and decrement the refcountMaxime Henrion2003-03-201-4/+4
| | | | | | | | | | in busdma tags. There are currently no tags shared accross different drivers so this isn't needed at the moment, but it will be required when we'll have a proper newbus method to get the parent busdma tag. Notes: svn path=/head/; revision=112436
* Enable the FPU on first use per-thread and save state across contextPeter Grehan2003-03-206-117/+101
| | | | | | | | | | | | | | switches. Not as lazy as it could be. Changing FPU state with sigcontext still TODO. fpu.c - convert some asm to inline C, and macroize fpu loads/stores swtch.S - call out to save/restore fpu routines trap.c - always call enable_fpu, since this shouldn't be called once the FPU has been enabled for a thread genassym.c - define for pcb fpu flag Notes: svn path=/head/; revision=112429
* - Add PCI ID for Paddington i/o controller, used in old G3'sPeter Grehan2003-03-201-2/+4
| | | | | | | | - Add ID for the Intrepid i/o controller, used in new 12"/17" PowerBooks - put IDs in chronological order Notes: svn path=/head/; revision=112428
* Add machine check handler. While generally useful, it's required whenPeter Grehan2003-03-192-2/+2
| | | | | | | | issuing PCI config cycles on MPC106-based PowerMacs, which cause machine checks when accessing non-existent/empty slots. Notes: svn path=/head/; revision=112402
* Made the prototypes for pmap_kenter and pmap_kremove MD. These functionsJake Burkholder2003-03-161-0/+2
| | | | | | | | | | | | are machine dependent because they are not required to update the tlb when mappings are added or removed, and doing so is machine dependent. In addition, an implementation may require that pages mapped with pmap_kenter have a backing vm_page_t, which is not necessarily true of all physical pages, and so may choose to pass the vm_page_t to pmap_kenter instead of the physical address in order to make this requirement clear. Notes: svn path=/head/; revision=112312
* Grab Giant around calls to contigmalloc() and contigfree() soMaxime Henrion2003-03-131-1/+6
| | | | | | | that drivers converted to be MP safe don't have to deal with it. Notes: svn path=/head/; revision=112196
* Replace calls to WITNESS_SLEEP() and witness_list() with equivalent callsJohn Baldwin2003-03-042-12/+4
| | | | | | | to WITNESS_WARN(). Notes: svn path=/head/; revision=111883
* Simplify ofw_pci_fixup(). It doesn't need to be recursive, since thePeter Grehan2003-03-031-19/+3
| | | | | | | | | bridge code already handles IRQ adjustment on the far side of a bridge. Reviewed by: benno Notes: svn path=/head/; revision=111814
* These files are no longer used. They have been replaced with similarly namedBenno Rice2003-02-284-597/+0
| | | | | | | .S files. Notes: svn path=/head/; revision=111655
* Register typo and incorrect 32-bit constant load in previous commit.Peter Grehan2003-02-262-4/+4
| | | | | | | Resulted in AST delivery not working. Notes: svn path=/head/; revision=111551
* Correctly set BUS_SPACE_MAXSIZE in all the busdma backends.Maxime Henrion2003-02-261-1/+1
| | | | | | | | It was bogusly set to 64 * 1024 or 128 * 1024 because it was bogusly reused in the BUS_DMAMAP_NSEGS definition. Notes: svn path=/head/; revision=111524
* Cleanup of the d_mmap_t interface.Maxime Henrion2003-02-253-21/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | - Get rid of the useless atop() / pmap_phys_address() detour. The device mmap handlers must now give back the physical address without atop()'ing it. - Don't borrow the physical address of the mapping in the returned int. Now we properly pass a vm_offset_t * and expect it to be filled by the mmap handler when the mapping was successful. The mmap handler must now return 0 when successful, any other value is considered as an error. Previously, returning -1 was the only way to fail. This change thus accidentally fixes some devices which were bogusly returning errno constants which would have been considered as addresses by the device pager. - Garbage collect the poorly named pmap_phys_address() now that it's no longer used. - Convert all the d_mmap_t consumers to the new API. I'm still not sure wheter we need a __FreeBSD_version bump for this, since and we didn't guarantee API/ABI stability until 5.1-RELEASE. Discussed with: alc, phk, jake Reviewed by: peter Compile-tested on: LINT (i386), GENERIC (alpha and sparc64) Runtime-tested on: i386 Notes: svn path=/head/; revision=111462