aboutsummaryrefslogtreecommitdiff
path: root/sys/powerpc
Commit message (Collapse)AuthorAgeFilesLines
* Standardize idempotentcy ifdefs. Consistently use _MACHINE_VARARGS_H_Alexander Kabaev2003-09-011-3/+3
| | | | | | | symbol. Notes: svn path=/head/; revision=119628
* Migrate the sf_buf allocator that is used by sendfile(2) and zero-copyAlan Cox2003-08-292-0/+202
| | | | | | | | | | | | | | sockets into machine-dependent files. The rationale for this migration is illustrated by the modified amd64 allocator. It uses the amd64's direct map to avoid emphemeral mappings in the kernel's address space. On an SMP, the emphemeral mappings result in an IPI for TLB shootdown for each transmitted page. Yuck. Maintainers of other 64-bit platforms with direct maps should be able to use the amd64 allocator as a reference implementation. Notes: svn path=/head/; revision=119563
* Prefer new location of pci include files (which have only been in theWarner Losh2003-08-221-3/+3
| | | | | | | | tree for two or more years now), except in a few places where there's code to be compatible with older versions of FreeBSD. Notes: svn path=/head/; revision=119291
* Fixup the ELF branding information to point to the new home of rtld.Gordon Tetlow2003-08-171-1/+1
| | | | Notes: svn path=/head/; revision=119015
* In vm_thread_swap{in|out}(), remove the alpha specific conditionalMarcel Moolenaar2003-08-162-14/+18
| | | | | | | | | compilation and replace it with a call to cpu_thread_swap{in|out}(). This allows us to add similar code on ia64 without cluttering the code even more. Notes: svn path=/head/; revision=119004
* Further cleanup <machine/cpu.h> and <machine/md_var.h>: move the MIMarcel Moolenaar2003-08-162-4/+6
| | | | | | | | | | | | | | | | | | | | | | prototypes of cpu_halt(), cpu_reset() and swi_vm() from md_var.h to cpu.h. This affects db_command.c and kern_shutdown.c. ia64: move all MD prototypes from cpu.h to md_var.h. This affects madt.c, interrupt.c and mp_machdep.c. Remove is_physical_memory(). It's not used (vm_machdep.c). alpha: the MD prototypes have been left in cpu.h with a comment that they should be there. Moving them is left for later. It was expected that the impact would be significant enough to be done in a seperate commit. powerpc: MD prototypes left in cpu.h. Comment added. Suggested by: bde Tested with: make universe (pc98 incomplete) Notes: svn path=/head/; revision=118990
* Update powerpc to use the (old thread,new thread) calling conventionPeter Grehan2003-08-144-74/+60
| | | | | | | for cpu_throw() and cpu_switch(). Notes: svn path=/head/; revision=118893
* Expand inline the relevant parts of src/COPYRIGHT for Matt Dillon'sWarner Losh2003-08-122-4/+48
| | | | | | | | | copyrighted files. Approved by: Matt Dillon Notes: svn path=/head/; revision=118848
* - Since td_critnest is now initialized in MI code, it doesn't have to beJohn Baldwin2003-08-042-13/+0
| | | | | | | | | set in cpu_critical_fork_exit() anymore. - As far as I can tell, cpu_thread_link() has never been used, not even when it was originally added, so remove it. Notes: svn path=/head/; revision=118443
* Deal with GCC annoyingly defining _BIG_ENDIAN.David E. O'Brien2003-08-031-0/+1
| | | | Notes: svn path=/head/; revision=118383
* Use kmem_alloc_nofault() rather than kmem_alloc_pageable() in pmap_mapdev().Alan Cox2003-08-023-3/+3
| | | | | | | | | See revision 1.140 of kern/sys_pipe.c for a detailed rationale. Submitted by: tegge Notes: svn path=/head/; revision=118365
* Make sure that when the PV ENTRY zone is created in pmap, that it'sBosko Milekic2003-07-313-6/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | created not only with UMA_ZONE_VM but also with UMA_ZONE_NOFREE. In the i386 case in particular, the pmap code would hook a special page allocation routine that allocated from kernel_map and not kmem_map, and so when/if the pageout daemon drained the zones, it could actually push out slabs from the PV ENTRY zone but call UMA's default page_free, which resulted in pages allocated from kernel_map being freed to kmem_map; bad. kmem_free() ignores the return value of the vm_map_delete and just returns. I'm not sure what the exact repercussions could be, but it doesn't look good. In the PAE case on i386, we also set-up a zone in pmap, so be conservative for now and make that zone also ZONE_NOFREE and ZONE_VM. Do this for the pmap zones for the other archs too, although in some cases it may not be entirely necessarily. We'd rather be safe than sorry at this point. Perhaps all UMA_ZONE_VM zones should by default be also UMA_ZONE_NOFREE? May fix some of silby's crashes on the PV ENTRY zone. Notes: svn path=/head/; revision=118244
* Deal with 'options KSTACK_PAGES' being a global option.Peter Wemm2003-07-318-2/+14
| | | | Notes: svn path=/head/; revision=118239
* Make pmap_pvo_allocf() callable without Giant.Alan Cox2003-07-273-18/+18
| | | | Notes: svn path=/head/; revision=118100
* - Introduce a new busdma flag BUS_DMA_ZERO to request for zero'edMaxime Henrion2003-07-272-6/+12
| | | | | | | | | | memory in bus_dmamem_alloc(). This is possible now that contigmalloc() supports the M_ZERO flag. - Remove the locking of Giant around calls to contigmalloc() since contigmalloc() now grabs Giant itself. Notes: svn path=/head/; revision=118081
* Rename thread_siginfo to cpu_thread_siginfo.David Xu2003-07-152-2/+2
| | | | | | | Suggested by: jhb Notes: svn path=/head/; revision=117600
* Background: pmap_object_init_pt() premaps the pages of a object inAlan Cox2003-07-033-9/+15
| | | | | | | | | | | | | | | | | | | order to avoid the overhead of later page faults. In general, it implements two cases: one for vnode-backed objects and one for device-backed objects. Only the device-backed case is really machine-dependent, belonging in the pmap. This commit moves the vnode-backed case into the (relatively) new function vm_map_pmap_enter(). On amd64 and i386, this commit only amounts to code rearrangement. On alpha and ia64, the new machine independent (MI) implementation of the vnode case is smaller and more efficient than their pmap-based implementations. (The MI implementation takes advantage of the fact that objects in -CURRENT are ordered collections of pages.) On sparc64, pmap_object_init_pt() hadn't (yet) been implemented. Notes: svn path=/head/; revision=117206
* Mega busdma API commit.Scott Long2003-07-012-3/+68
| | | | | | | | | | | | | | | | | | | | | | | | | | | Add two new arguments to bus_dma_tag_create(): lockfunc and lockfuncarg. Lockfunc allows a driver to provide a function for managing its locking semantics while using busdma. At the moment, this is used for the asynchronous busdma_swi and callback mechanism. Two lockfunc implementations are provided: busdma_lock_mutex() performs standard mutex operations on the mutex that is specified from lockfuncarg. dftl_lock() is a panic implementation and is defaulted to when NULL, NULL are passed to bus_dma_tag_create(). The only time that NULL, NULL should ever be used is when the driver ensures that bus_dmamap_load() will not be deferred. Drivers that do not provide their own locking can pass busdma_lock_mutex,&Giant args in order to preserve the former behaviour. sparc64 and powerpc do not provide real busdma_swi functions, so this is largely a noop on those platforms. The busdma_swi on is64 is not properly locked yet, so warnings will be emitted on this platform when busdma callback deferrals happen. If anyone gets panics or warnings from dflt_lock() being called, please let me know right away. Reviewed by: tmm, gibbs Notes: svn path=/head/; revision=117126
* - Export pmap_enter_quick() to the MI VM. This will permit theAlan Cox2003-06-293-0/+24
| | | | | | | | | | | | | | implementation of a largely MI pmap_object_init_pt() for vnode-backed objects. pmap_enter_quick() is implemented via pmap_enter() on sparc64 and powerpc. - Correct a mismatch between pmap_object_init_pt()'s prototype and its various implementations. (I plan to keep pmap_object_init_pt() as the MD hook for device-backed objects on i386 and amd64.) - Correct an error in ia64's pmap_enter_quick() and adjust its interface to match the other versions. Discussed with: marcel Notes: svn path=/head/; revision=117045
* Allow the interrupt controller to be probed - this picks up thePeter Grehan2003-06-291-1/+0
| | | | | | | Heathrow PIC, while not affecting the OpenPIC. Notes: svn path=/head/; revision=117017
* A module to handle the interrupt controller on Heathrow/PaddingtonPeter Grehan2003-06-282-0/+545
| | | | | | | MacIO chips, found on older Mac G3's. Notes: svn path=/head/; revision=116965
* A module for the Motorola MPC106 system controller aka 'Grackle'Peter Grehan2003-06-282-0/+622
| | | | | | | found on older Mac G3's. Notes: svn path=/head/; revision=116964
* Add a machine depended function thread_siginfo, SA signal codeDavid Xu2003-06-282-0/+38
| | | | | | | | | | will use the function to construct a siginfo structure and use the result to export to userland. Reviewed by: julian Notes: svn path=/head/; revision=116958
* Do the first and mostly mechanical step of adding mutex support to theScott Long2003-06-271-0/+1
| | | | | | | | | | | | bus_dma async callback scheme. Note that sparc64 does not seem to do async callbacks. Note that ia64 callbacks might not be MPSAFE at the moment. Note that powerpc doesn't seem to do async callbacks due to the implementation being incomplete. Reviewed by: mostly silence on arch@ Notes: svn path=/head/; revision=116907
* Remove unused bootpath[] variable. It conflicted with a declarationPeter Grehan2003-06-253-6/+0
| | | | | | | in the sunlabel utility, causing build problems. Notes: svn path=/head/; revision=116804
* 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