summaryrefslogtreecommitdiffstats
path: root/sys/powerpc
Commit message (Collapse)AuthorAgeFilesLines
* Add HWPMC_HOOKS to GENERIC kernels, this makes hwpmc.ko work outdelphij2008-07-071-0/+1
| | | | of the box.
* Remove the unused M_MEMDEV from the kernel.ed2008-06-251-2/+0
| | | | | | | The M_MEMDEV memory allocation pool does not seem to be used. We can live without it. Approved by: philip (mentor)
* Remove the unused major/minor numbers from iodev and memdev.ed2008-06-251-1/+0
| | | | | | | | | Now that st_rdev is being automatically generated by the kernel, there is no need to define static major/minor numbers for the iodev and memdev. We still need the minor numbers for the memdev, however, to distinguish between /dev/mem and /dev/kmem. Approved by: philip (mentor)
* Return an error code rather than ENXIO when both rman_init() andkevlo2008-06-123-28/+33
| | | | | | rman_manage_region() failed. Reviewed by: marcel
* Fix a typo in a comment.wkoszek2008-06-111-1/+1
|
* Move bm(4) from the sys/conf/NOTES to sys/powerpc/conf/NOTES.marcel2008-06-081-0/+1
| | | | The driver applies to PowerPC only.
* Add support for the Apple Big Mac (BMAC) Ethernet controller,marcel2008-06-071-0/+1
| | | | | | found on various Apple G3 models. Submitted by: Nathan Whitehorn
* Add support for Apple's Descriptor-Based DMA (DBDMA) engine. The DMAmarcel2008-06-073-0/+551
| | | | | | | engine is usful to various existing drivers, such as ata(4) and scc(4), and is used bhy the soon to be added bm(4). Submitted by: Nathan Whitehorn
* Add link register to fatal trap printout to better diagnose NULLgrehan2008-06-041-0/+1
| | | | function pointer derefs.
* Invalidate the TLB in pmap_cpu_bootstrap(), so that it also happensmarcel2008-05-231-1/+4
| | | | on the APs.
* The VM system no longer uses setPQL2(). Remove it and its helpers.alc2008-05-232-16/+0
|
* Use the "options " spelling (vs. "options<TAB>") so that commented linesobrien2008-05-211-3/+3
| | | | line up nicely.
* Retire pmap_addr_hint(). It is no longer used.alc2008-05-183-22/+10
|
* Removed unused assembly offsets for structures digging.attilio2008-05-161-1/+0
|
* Add a stub for pmap_align_superpage() on machines that don't (yet)alc2008-05-091-0/+10
| | | | implement pmap-level support for superpages.
* The first argment of mtdbatu or mtibatu is part of the encoding.marcel2008-04-281-7/+8
| | | | It needs to be constant, so eliminate the loop and "hand-unroll".
* MFp4: SMP supportmarcel2008-04-2715-137/+714
|
* Eliminate track_modified_needed(), better known as pmap_track_modified()marcel2008-04-271-37/+8
| | | | | | | on other platforms. We no longer need it because we do not create managed mappings within the clean submap. Pointed out by: alc
* MFp4: SMP supportmarcel2008-04-271-6/+63
|
* Make sure tmpstk is aligned and make it 8KB in size -- not 8KB+16.marcel2008-04-271-2/+3
|
* Remove mfsvr():marcel2008-04-273-12/+2
| | | | | | o The function is defined unconditionally but depends on SPR_SVR, which is defined conditionally. o spr.h defines mfspr() and mtspr(), which is no worse to use.
* Take into account the size of the interrupt cell. It's determinedmarcel2008-04-262-14/+27
| | | | | | | | | | | by the parent for interrupt resources. This corrects parsing of the interrupts property. With parsing of the property fixed, add all interrupts to the resource list. Bump the max. number of interrupts from 5 to 6 as scc(4) attached to macio(4) has 6 interrupts (3 per channel). Submitted by: Nathan Whitehorn <nathanw@uchicago.edu>
* Use RSTCR for resetting the MPC8572 (the old way does not apply).raj2008-04-262-7/+25
| | | | Obtained from: Freescale, Semihalf
* Introduce a dedicated file for MPC85xx-specific routines. Move cpu_reset()raj2008-04-262-17/+60
| | | | | there, as it's not relevant to Book-E specification, but is an implementation detail, directly dependent on the given SoC version.
* Improve handling of Local Access Windows on MPC85xx systems:raj2008-04-264-19/+50
| | | | | | | | - detect number of LAWs in run time and initalize accordingly - introduce decode windows target IDs used in MPC8572 - other minor updates Obtained from: Freescale, Semihalf
* Move System Revision defines to a bit better place, add MPC8572 systems IDs.raj2008-04-261-9/+9
|
* Enable NFSLOCKD for MPC85XX kernel to comply with recent NFS rework.raj2008-04-261-0/+1
|
* - Add an integer argument to idle to indicate how likely we are to wakejeff2008-04-252-2/+16
| | | | | | | | | | | | | | | from idle over the next tick. - Add a new MD routine, cpu_wake_idle() to wakeup idle threads who are suspended in cpu specific states. This function can fail and cause the scheduler to fall back to another mechanism (ipi). - Implement support for mwait in cpu_idle() on i386/amd64 machines that support it. mwait is a higher performance way to synchronize cpus as compared to hlt & ipis. - Allow selecting the idle routine by name via sysctl machdep.idle. This replaces machdep.cpu_idle_hlt. Only idle routines supported by the current machine are permitted. Sponsored by: Nokia
* Now that all platforms use genclock, shuffle things around slightlyphk2008-04-223-3/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | for better structure. Much of this is related to <sys/clock.h>, which should really have been called <sys/calendar.h>, but unless and until we need the name, the repocopy can wait. In general the kernel does not know about minutes, hours, days, timezones, daylight savings time, leap-years and such. All that is theoretically a matter for userland only. Parts of kernel code does however care: badly designed filesystems store timestamps in local time and RTC chips almost universally track time in a YY-MM-DD HH:MM:SS format, and sometimes in local timezone instead of UTC. For this we have <sys/clock.h> <sys/time.h> on the other hand, deals with time_t, timeval, timespec and so on. These know only seconds and fractions thereof. Move inittodr() and resettodr() prototypes to <sys/time.h>. Retain the names as it is one of the few surviving PDP/VAX references. Move startrtclock() to <machine/clock.h> on relevant platforms, it is a MD call between machdep.c/clock.c. Remove references to it elsewhere. Remove a lot of unnecessary <sys/clock.h> includes. Move the machdep.disable_rtc_set sysctl to subr_rtc.c where it belongs. XXX: should be kern.disable_rtc_set really, it's not MD.
* Make genclock standard on all platforms.phk2008-04-212-2/+0
| | | | Thanks to: grehan & marcel for platform support on ia64 and ppc.
* Switch to using genclock. Have nexus double as clock device formarcel2008-04-213-77/+78
| | | | | | now. While here, add a proper attach() method to nexus. Requested by: phk
* Simplify the pmap_zero_page family of functions by making use ofmarcel2008-04-171-160/+6
| | | | | | | | the fact that we have a 1:1 mapping by virtue of the BATs. Eliminate the now unused moea_rkva_alloc(), moea_pa_map() and moea_pa_unmap() functions. Pointed out by: grehan.
* Allocate a stack (with optional guard pages) for thread0 andmarcel2008-04-163-70/+60
| | | | switch to it before calling mi_startup().
* Get rid of an empty RTC implementation and hook up genclock instead.phk2008-04-132-44/+1
|
* - Add the interrupt vector number to intr_event_create so MI code canjeff2008-04-111-1/+1
| | | | | | | | | | | | lookup hard interrupt events by number. Ignore the irq# for soft intrs. - Add support to cpuset for binding hardware interrupts. This has the side effect of binding any ithread associated with the hard interrupt. As per restrictions imposed by MD code we can only bind interrupts to a single cpu presently. Interrupts can be 'unbound' by binding them to all cpus. Reviewed by: jhb Sponsored by: Nokia
* Fix copy-n-paste typos in free text.marcel2008-04-101-3/+3
|
* Include <sys/types.h> before <sys/systm.h> to get typedefs requiredgrehan2008-04-098-8/+8
| | | | by new atomic.h. Fixes tinderbox LINT build.
* Reimplement atomic_add, atomic_clear, atomic_set and atomic_subtractmarcel2008-04-091-272/+294
| | | | | | | | so that all implemented variants have proper prototypes. The 8-bit, 16-bit and 64-bit variants are not implemented. This really fixes the current build breakages caused by type casting and struct aliasing rules.
* Quick fix for the kernel build breakage in netgraph and themarcel2008-04-081-2/+4
| | | | | | aliasing warning in libthr. A more elaborate fix is in the works that makes sure that all variants have proper inline functions with proper types.
* Add a MI intr_event_handle() routine for the non-INTR_FILTER case. Thisjhb2008-04-051-45/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | allows all the INTR_FILTER #ifdef's to be removed from the MD interrupt code. - Rename the intr_event 'eoi', 'disable', and 'enable' hooks to 'post_filter', 'pre_ithread', and 'post_ithread' to be less x86-centric. Also, add a comment describe what the MI code expects them to do. - On amd64, i386, and powerpc this is effectively a NOP. - On arm, don't bother masking the interrupt unless the ithread is scheduled in the non-INTR_FILTER case to match what INTR_FILTER did. Also, don't bother unmasking the interrupt in the post_filter case if we never masked it. The INTR_FILTER case had been doing this by having arm_unmask_irq for the post_filter (formerly 'eoi') hook. - On ia64, stray interrupts are now masked for the non-INTR_FILTER case. They were already masked in the INTR_FILTER case. - On sparc64, use the a NULL pre_ithread hook and use intr_enable_eoi() for both the 'post_filter' and 'post_ithread' hooks to match what the non-INTR_FILTER code did. - On sun4v, retire the ithread wrapper hack by using an appropriate 'post_ithread' hook instead (it's what 'post_ithread'/'enable' was designed to do even in 5.x). Glanced at by: piso Reviewed by: marius Requested by: marius [1], [5] Tested on: amd64, i386, arm, sparc64
* Align functions to 16-byte boundaries due to profiling granularity.marcel2008-04-031-1/+1
|
* Set sc_psim so that the openpic core can correct the off-by-onemarcel2008-04-031-0/+5
| | | | error in the number of IRQs that PSIM gives us.
* Add kernel module support for nfslockd and krpc. Use the module systemdfr2008-03-271-0/+1
| | | | | | | to detect (or load) kernel NLM support in rpc.lockd. Remove the '-k' option to rpc.lockd and make kernel NLM the default. A user can still force the use of the old user NLM by building a kernel without NFSLOCKD and/or removing the nfslockd.ko module.
* When building a kernel module, define MAXCPU the same as SMP sojb2008-03-271-2/+2
| | | | that modules work with and without SMP.
* The "free-lance" timer in the i8254 is only used for the speakerphk2008-03-263-24/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | these days, so de-generalize the acquire_timer/release_timer api to just deal with speakers. The new (optional) MD functions are: timer_spkr_acquire() timer_spkr_release() and timer_spkr_setfreq() the last of which configures the timer to generate a tone of a given frequency, in Hz instead of 1/1193182th of seconds. Drop entirely timer2 on pc98, it is not used anywhere at all. Move sysbeep() to kern/tty_cons.c and use the timer_spkr*() if they exist, and do nothing otherwise. Remove prototypes and empty acquire-/release-timer() and sysbeep() functions from the non-beeping archs. This eliminate the need for the speaker driver to know about i8254frequency at all. In theory this makes the speaker driver MI, contingent on the timer_spkr_*() functions existing but the driver does not know this yet and still attaches to the ISA bus. Syscons is more tricky, in one function, sc_tone(), it knows the hz and things are just fine. In the other function, sc_bell() it seems to get the period from the KDMKTONE ioctl in terms if 1/1193182th second, so we hardcode the 1193182 and leave it at that. It's probably not important. Change a few other sysbeep() uses which obviously knew that the argument was in terms of i8254 frequency, and leave alone those that look like people thought sysbeep() took frequency in hertz. This eliminates the knowledge of i8254_freq from all but the actual clock.c code and the prof_machdep.c on amd64 and i386, where I think it would be smart to ask for help from the timecounters anyway [TBD].
* Simplify the interrupt code a bit:jhb2008-03-171-6/+1
| | | | | | | | | | | | - Always include the ie_disable and ie_eoi methods in 'struct intr_event' and collapse down to one intr_event_create() routine. The disable and eoi hooks simply aren't used currently in the !INTR_FILTER case. - Expand 'disab' to 'disable' in a few places. - Use function casts for arm and i386:intr_eoi_src() instead of wrapper routines since to trim one extra indirection. Compiled on: {arm,amd64,i386,ia64,ppc,sparc64} x {FILTER, !FILTER} Tested on: {amd64,i386} x {FILTER, !FILTER}
* Make remote GDB work for AIM processors. For BookE, the kernelmarcel2008-03-172-43/+27
| | | | | | | | will have a special section, named .PPC.EMB.apuinfo, which will tell GDB that a BookE processor is targeted and which will result in GDB using a different register definition. In order to support remote GDB for BookE, we need the GDB stub in the kernel look for that section and use the BookE definitions.
* Implement atomic_fetchadd_long() for all architectures and document it.pjd2008-03-161-0/+2
| | | | Reviewed by: attilio, jhb, jeff, kris (as a part of the uidinfo_waitfree.patch)
* In keeping with style(9)'s recommendations on macros, use a ';'rwatson2008-03-163-3/+3
| | | | | | | | | after each SYSINIT() macro invocation. This makes a number of lightweight C parsers much happier with the FreeBSD kernel source, including cflow's prcc and lxr. MFC after: 1 month Discussed with: imp, rink
* Add preliminary support for binding interrupts to CPUs:jhb2008-03-141-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | - Add a new intr_event method ie_assign_cpu() that is invoked when the MI code wishes to bind an interrupt source to an individual CPU. The MD code may reject the binding with an error. If an assign_cpu function is not provided, then the kernel assumes the platform does not support binding interrupts to CPUs and fails all requests to do so. - Bind ithreads to CPUs on their next execution loop once an interrupt event is bound to a CPU. Only shared ithreads are bound. We currently leave private ithreads for drivers using filters + ithreads in the INTR_FILTER case unbound. - A new intr_event_bind() routine is used to bind an interrupt event to a CPU. - Implement binding on amd64 and i386 by way of the existing pic_assign_cpu PIC method. - For x86, provide a 'intr_bind(IRQ, cpu)' wrapper routine that looks up an interrupt source and binds its interrupt event to the specified CPU. MI code can currently (ab)use this by doing: intr_bind(rman_get_start(irq_res), cpu); however, I plan to add a truly MI interface (probably a bus_bind_intr(9)) where the implementation in the x86 nexus(4) driver would end up calling intr_bind() internally. Requested by: kmacy, gallatin, jeff Tested on: {amd64, i386} x {regular, INTR_FILTER}
OpenPOWER on IntegriCloud