summaryrefslogtreecommitdiffstats
path: root/sys/powerpc
Commit message (Collapse)AuthorAgeFilesLines
* Add a stub cpu_idle() function for sparc64, alpha, powerpc. This is apeter2003-10-192-0/+12
| | | | MI declared function so it should be everywhere.
* Move pmap_resident_count() from the MD pmap.h to the MI pmap.h.bms2003-10-061-1/+0
| | | | | | | | Add a definition of pmap_wired_count(). Add a definition of vmspace_wired_count(). Reviewed by: truckman Discussed with: peter
* Migrate pmap_prefault() into the machine-independent virtual memory layer.alc2003-10-033-24/+39
| | | | | | | A small helper function pmap_is_prefaultable() is added. This function encapsulate the few lines of pmap_prefault() that actually vary from machine to machine. Note: pmap_is_prefaultable() and pmap_mincore() have much in common. Going forward, it's worth considering their merger.
* DELAY must be a routine, not a macro definition.grehan2003-09-264-6/+4
|
* Add sysentvec->sv_fixlimits() hook so that we can catch cases on 64 bitpeter2003-09-252-13/+2
| | | | | | | | | | | | | | | | | | | | | systems where the data/stack/etc limits are too big for a 32 bit process. Move the 5 or so identical instances of ELF_RTLD_ADDR() into imgact_elf.c. Supply an ia32_fixlimits function. Export the clip/default values to sysctl under the compat.ia32 heirarchy. Have mmap(0, ...) respect the current p->p_limits[RLIMIT_DATA].rlim_max value rather than the sysctl tweakable variable. This allows mmap to place mappings at sensible locations when limits have been reduced. Have the imgact_elf.c ld-elf.so.1 placement algorithm use the same method as mmap(0, ...) now does. Note that we cannot remove all references to the sysctl tweakable maxdsiz etc variables because /etc/login.conf specifies a datasize of 'unlimited'. And that causes exec etc to fail since it can no longer find space to mmap things.
* _MACHINE/_MACHINE_ARCH shouldn't be quoted. Found by trying togrehan2003-09-241-2/+2
| | | | compile the isp driver.
* Soften assert in pmap_remove_all.grehan2003-09-223-12/+75
| | | | | | Introduct pmap_extract_and_hold. Stolen from: sparc64
* ATAng requires <sys/taskqueue.h>grehan2003-09-222-0/+2
|
* Standardize idempotentcy ifdefs. Consistently use _MACHINE_VARARGS_H_kan2003-09-011-3/+3
| | | | symbol.
* Migrate the sf_buf allocator that is used by sendfile(2) and zero-copyalc2003-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.
* Prefer new location of pci include files (which have only been in theimp2003-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.
* Fixup the ELF branding information to point to the new home of rtld.gordon2003-08-171-1/+1
|
* In vm_thread_swap{in|out}(), remove the alpha specific conditionalmarcel2003-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.
* Further cleanup <machine/cpu.h> and <machine/md_var.h>: move the MImarcel2003-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)
* Update powerpc to use the (old thread,new thread) calling conventiongrehan2003-08-144-74/+60
| | | | for cpu_throw() and cpu_switch().
* Expand inline the relevant parts of src/COPYRIGHT for Matt Dillon'simp2003-08-122-4/+48
| | | | | | copyrighted files. Approved by: Matt Dillon
* - Since td_critnest is now initialized in MI code, it doesn't have to bejhb2003-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.
* Deal with GCC annoyingly defining _BIG_ENDIAN.obrien2003-08-031-0/+1
|
* Use kmem_alloc_nofault() rather than kmem_alloc_pageable() in pmap_mapdev().alc2003-08-023-3/+3
| | | | | | See revision 1.140 of kern/sys_pipe.c for a detailed rationale. Submitted by: tegge
* Make sure that when the PV ENTRY zone is created in pmap, that it'sbmilekic2003-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.
* Deal with 'options KSTACK_PAGES' being a global option.peter2003-07-318-2/+14
|
* Make pmap_pvo_allocf() callable without Giant.alc2003-07-273-18/+18
|
* - Introduce a new busdma flag BUS_DMA_ZERO to request for zero'edmux2003-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.
* Rename thread_siginfo to cpu_thread_siginfo.davidxu2003-07-152-2/+2
| | | | Suggested by: jhb
* Background: pmap_object_init_pt() premaps the pages of a object inalc2003-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.
* Mega busdma API commit.scottl2003-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
* - Export pmap_enter_quick() to the MI VM. This will permit thealc2003-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
* Allow the interrupt controller to be probed - this picks up thegrehan2003-06-291-1/+0
| | | | Heathrow PIC, while not affecting the OpenPIC.
* A module to handle the interrupt controller on Heathrow/Paddingtongrehan2003-06-282-0/+545
| | | | MacIO chips, found on older Mac G3's.
* A module for the Motorola MPC106 system controller aka 'Grackle'grehan2003-06-282-0/+622
| | | | found on older Mac G3's.
* Add a machine depended function thread_siginfo, SA signal codedavidxu2003-06-282-0/+38
| | | | | | | will use the function to construct a siginfo structure and use the result to export to userland. Reviewed by: julian
* Do the first and mostly mechanical step of adding mutex support to thescottl2003-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@
* Remove unused bootpath[] variable. It conflicted with a declarationgrehan2003-06-253-6/+0
| | | | in the sunlabel utility, causing build problems.
* Migrate the thread stack management functions from the machine-dependentalc2003-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().
* Move the *_new_altkstack() and *_dispose_altkstack() functions out of thealc2003-06-143-75/+0
| | | | | various pmap implementations into the machine-independent vm. They were all identical.
* GC unused cpu_wait() functionpeter2003-06-112-12/+0
|
* Note that scbus is required for SCSI, not just "required" in general.jmallett2003-06-081-1/+1
| | | | | Submitted by: Edward Kaplan (tmbg37 on IRC) Reviewed by: rwatson (in principle)
* Change the second (and last) argument of cpu_set_upcall(). Previouslymarcel2003-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
* Remove #include <sys/disklabel.h>phk2003-06-012-2/+0
|
* Bring back bus_dmasync_op_t. It is now a typedef to an int, though thescottl2003-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)
* sys/sys/limits.h:kan2003-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)
* - Merge struct procsig with struct sigacts.jhb2003-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)
* Things run thru the C preprocessor must use C-style comments.obrien2003-05-052-22/+22
|
* Style fixes.kan2003-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.
* Back out last commits. The elf64/elf32 kernel name thing was more painpeter2003-05-012-6/+2
| | | | than it was worth.
* Slight reorg and added AMD64 support. A couple of the MODINFOMD_* valuespeter2003-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.
* Fix transcription error. Use == NULL, not != NULL. Fortunately thispeter2003-04-302-2/+2
| | | | was harmless.
* Look for an elf32 kernel (powerpc) and elf64 kernel (sparc64) as wellpeter2003-04-302-2/+6
| | | | as a plain "elf kernel".
* Range check the syscall number before looking it up in the syscallnames[]jhb2003-04-302-2/+2
| | | | | | array. Submitted by: pho
* Deprecate machine/limits.h in favor of new sys/limits.h.kan2003-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>
OpenPOWER on IntegriCloud