summaryrefslogtreecommitdiffstats
path: root/sys/powerpc
Commit message (Collapse)AuthorAgeFilesLines
* Simplify the pager support in DDB. Allowing different db commands tojhb2006-07-121-4/+1
| | | | | | | | | | | | | | | | install custom pager functions didn't actually happen in practice (they all just used the simple pager and passed in a local quit pointer). So, just hardcode the simple pager as the only pager and make it set a global db_pager_quit flag that db commands can check when the user hits 'q' (or a suitable variant) at the pager prompt. Also, now that it's easy to do so, enable paging by default for all ddb commands. Any command that wishes to honor the quit flag can do so by checking db_pager_quit. Note that the pager can also be effectively disabled by setting $lines to 0. Other fixes: - 'show idt' on i386 and pc98 now actually checks the quit flag and terminates early. - 'show intr' now actually checks the quit flag and terminates early.
* Add synchronization to moea_zero_page() and moea_zero_page_area().alc2006-07-102-16/+34
| | | | | | Remove the acquisition and release of Giant from moea_zero_page_idle(). Tested by: grehan@
* Eliminate the acquisition and release of Giant from moea_extract_and_hold()alc2006-07-012-12/+0
| | | | | | and moea_protect(). Tested by: grehan@ and rink@
* Backed out the change by request from rwatson.babkin2006-06-261-1/+0
| | | | PR: kern/14584
* Synchronize accesses to the PTEG table.alc2006-06-252-6/+58
| | | | | | Add many lock assertions. Tested by: grehan@
* The common UID/GID space implementation. It has been discussed on -archbabkin2006-06-251-0/+1
| | | | | | | | | | in 1999, and there are changes to the sysctl names compared to PR, according to that discussion. The description is in sys/conf/NOTES. Lines in the GENERIC files are added in commented-out form. I'll attach the test script I've used to PR. PR: kern/14584 Submitted by: babkin
* Prevent 'mutex not owned' panic on boot if INVARIANTS is in the kernel. Thisrink2006-06-172-0/+4
| | | | | | | | | | makes the GENERIC kernel boot on ppc. Reviewed by: grehan Approved by: imp (mentor) MFC after: 1 week dCVS: ----------------------------------------------------------------------
* Remove COMPAT_43 from GENERIC (and other kernel configs). For amd64 there'snetchild2006-06-151-1/+0
| | | | | | | | | | | | | | | | | | | | | | an explicit comment that it's needed for the linuxolator. This is not the case anymore. For all other architectures there was only a "KEEP THIS". I'm (and other people too) running a COMPAT_43-less kernel since it's not necessary anymore for the linuxolator. Roman is running such a kernel for a for longer time. No problems so far. And I doubt other (newer than ia32 or alpha) architectures really depend on it. This may result in a small performance increase for some workloads. If the removal of COMPAT_43 results in a not working program, please recompile it and all dependencies and try again before reporting a problem. The only place where COMPAT_43 is needed (as in: does not compile without it) is in the (outdated/not usable since too old) svr4 code. Note: this does not remove the COMPAT_43TTY option. Nagging by: rdivacky
* Remove mpte optimization from pmap_enter_quick().ups2006-06-154-19/+12
| | | | | | | | | There is a race with the current locking scheme and removing it should have no measurable performance impact. This fixes page faults leading to panics in pmap_enter_quick_locked() on amd64/i386. Reviewed by: alc,jhb,peter,ps
* Some machines have an ESCC. Make sure we build uart(4) with supportmarcel2006-06-121-0/+1
| | | | for the z8530.
* Add the ability to subset the devices that UART pulls in. This allowsimp2006-06-121-0/+3
| | | | | | | | the arm to compile without all the extras that don't appear, at least not in the flavors of ARM I deal with. This helps us save about 100k. If I've botched the available devices on a platform, please let me know and I'll correct ASAP.
* Correct a typo in the previous revision.alc2006-06-062-2/+2
|
* Add a stub for pmap_enter_object().alc2006-06-061-0/+7
|
* Introduce the function pmap_enter_object(). It maps a sequence of residentalc2006-06-053-30/+139
| | | | | | | pages from the same object. Use it in vm_map_pmap_enter() to reduce the locking overhead of premapping objects. Reviewed by: tegge@
* Since DELAY() was moved, most <machine/clock.h> #includes have beenphk2006-05-167-7/+0
| | | | unnecessary.
* Remove straggling reference to CPU_ macrosphk2006-05-112-4/+4
|
* Clean out sysctl machdep.* related defines.phk2006-05-111-11/+0
| | | | The cmos clock related stuff should really be in MI code.
* Set the rid for any resource obtained from rman_resource_reserve.imp2006-04-206-1/+6
|
* Add kbdmux(4). This avoids having to use the hint.pcib.1.skipslot=26marcel2006-04-071-0/+1
| | | | trick on a PowerBook G4 and friends to get the USB keyboard as ukbd0.
* Remove the unused sva and eva arguments from pmap_remove_pages().peter2006-04-032-6/+3
|
* Add a dummy implementation of bus_space_map().marcel2006-03-311-3/+9
|
* Simplify system time accounting for profiling.phk2006-02-082-8/+6
| | | | | | | | | | Rename struct thread's td_sticks to td_pticks, we will need the other name for more appropriately named use shortly. Reduce it from uint64_t to u_int. Clear td_pticks whenever we enter the kernel instead of recording its value as reference for userret(). Use the absolute value of td->pticks in userret() and eliminate third argument.
* Move the old BSD4.3 tty compatibility from (!BURN_BRIDGES && COMPAT_43)phk2006-01-101-0/+1
| | | | | | | | | | | | to COMPAT_43TTY. Add COMPAT_43TTY to NOTES and */conf/GENERIC Compile tty_compat.c only under the new option. Spit out #warning "Old BSD tty API used, please upgrade." if ioctl_compat.h gets #included from userland.
* Set the siginfo si_addr field, and also the mysterious 3rd parametergrehan2006-01-072-2/+8
| | | | | | | | to old-style signals, to be the DAR register for DSI miss exceptions. This gives the address of the access rather than the instruction address. The behaviour is now the same as on i386. Found by: libsigsegv tests
* - Make pcib_devclass private to sys/dev/pci/pci_pci.c and change all thejhb2006-01-061-5/+3
| | | | | | | various pcib drivers to use their own private devclass_t variables for their modules. - Use the DEFINE_CLASS_0() macro to declare drivers for the various pcib drivers while I'm here.
* MI changes:netchild2005-12-312-0/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | - provide an interface (macros) to the page coloring part of the VM system, this allows to try different coloring algorithms without the need to touch every file [1] - make the page queue tuning values readable: sysctl vm.stats.pagequeue - autotuning of the page coloring values based upon the cache size instead of options in the kernel config (disabling of the page coloring as a kernel option is still possible) MD changes: - detection of the cache size: only IA32 and AMD64 (untested) contains cache size detection code, every other arch just comes with a dummy function (this results in the use of default values like it was the case without the autotuning of the page coloring) - print some more info on Intel CPU's (like we do on AMD and Transmeta CPU's) Note to AMD owners (IA32 and AMD64): please run "sysctl vm.stats.pagequeue" and report if the cache* values are zero (= bug in the cache detection code) or not. Based upon work by: Chad David <davidc@acns.ab.ca> [1] Reviewed by: alc, arch (in 2004) Discussed with: alc, Chad David, arch (in 2004)
* Remove duplicate options (originals in sys/conf/NOTES).ru2005-12-301-2/+0
| | | | Reported by: fresh config(8)
* Add user-space profiling support. Kernel profiling still todo.grehan2005-12-291-8/+82
| | | | Obtained from: NetBSD
* Remove kern.elf32.can_exec_dyn sysctl. Instead extend Brandinfo structuresobomax2005-12-261-0/+2
| | | | | | | | | | with flags bitfield and set BI_CAN_EXEC_DYN flag for all brands that usually allow executing elf dynamic binaries (aka shared libraries). When it is requested to execute ET_DYN elf image check if this flag is on after we know the elf brand allowing execution if so. PR: kern/87615 Submitted by: Marcin Koziej <creep@desk.pl>
* Forward-declare struct trapframe to allow the aic module to compile.grehan2005-12-241-0/+2
|
* Mark the return address of the call to ast() in the generic trapgrehan2005-12-233-5/+13
| | | | | | | | | | handling code so the stack trace unwinders don't start trying to go into user-space. Found by trying to create core dumps with a KTR_COMPILE/KTR_GEOM kernel, which results in a stack_save() call in the ast() coredump path - this created a panic, and then calling 'trace' in ddb resulted in the black screen of death after printing out most of the backtrace.
* Tweak how the MD code calls the fooclock() methods some. Instead ofjhb2005-12-227-29/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | passing a pointer to an opaque clockframe structure and requiring the MD code to supply CLKF_FOO() macros to extract needed values out of the opaque structure, just pass the needed values directly. In practice this means passing the pair (usermode, pc) to hardclock() and profclock() and passing the boolean (usermode) to hardclock_cpu() and hardclock_process(). Other details: - Axe clockframe and CLKF_FOO() macros on all architectures. Basically, all the archs were taking a trapframe and converting it into a clockframe one way or another. Now they can just extract the PC and usermode values directly out of the trapframe and pass it to fooclock(). - Renamed hardclock_process() to hardclock_cpu() as the latter is more accurate. - On Alpha, we now run profclock() at hz (profhz == hz) rather than at the slower stathz. - On Alpha, for the TurboLaser machines that don't have an 8254 timecounter, call hardclock() directly. This removes an extra conditional check from every clock interrupt on Alpha on the BSP. There is probably room for even further pruning here by changing Alpha to use the simplified timecounter we use on x86 with the lapic timer since we don't get interrupts from the 8254 on Alpha anyway. - On x86, clkintr() shouldn't ever be called now unless using_lapic_timer is false, so add a KASSERT() to that affect and remove a condition to slightly optimize the non-lapic case. - Change prototypeof arm_handler_execute() so that it's first arg is a trapframe pointer rather than a void pointer for clarity. - Use KCOUNT macro in profclock() to lookup the kernel profiling bucket. Tested on: alpha, amd64, arm, i386, ia64, sparc64 Reviewed by: bde (mostly)
* add LINT buildsam2005-12-212-0/+86
| | | | | Discussed with: grehan MFC after: 1 week
* GC some unused frame types.jhb2005-12-162-94/+0
| | | | Approved by: grehan
* - Cleanup whitespace and extra ()s in vtophys() macros.jhb2005-12-061-1/+1
| | | | | | | | | | | - Move vtophys() macros next to vtopte() where vtopte() exists to match comments above vtopte(). - Remove references to the alternate address space in the comment above vtopte(). amd64 never had the alternate address space, and i386 lost it prior to PAE support being added. - s/entires/entries/ in comments. Reviewed by: alc
* Drop _MACHINE_ARCH and _MACHINE defines (not to be confused withru2005-12-061-7/+0
| | | | | | | MACHINE_ARCH and MACHINE). Their purpose was to be able to test in cpp(1), but cpp(1) only understands integer type expressions. Using such unsupported expressions introduced a number of subtle bugs, which were discovered by compiling with -Wundef.
* Convert to use the recently introduced set of ofw_bus_gen_get_*() formarius2005-12-032-93/+40
| | | | | | providing the ofw_bus KOBJ interface. Tested by: grehan
* - Allow duplicate "machine" directives with the same arguments.ru2005-11-272-3/+1
| | | | - Move existing "machine" directives to DEFAULTS.
* Create DEFAULTS files for alpha, ia64, powerpc, and sparc64 and movejhb2005-11-212-1/+10
| | | | | | 'device mem' over from GENERIC to DEFAULTS to be consistent with i386 and amd64. Additionally, on ia64 enable ACPI by default since ia64 requires acpi.
* Create a device node in /dev when a USB keyboard is plugged in.arun2005-11-211-0/+1
| | | | Reviewed by: grehan
* Eliminate pmap_init2(). It's no longer used.alc2005-11-202-20/+0
|
* Add definitions for 64-bit PTEsgrehan2005-11-111-10/+47
|
* ata_generic_hw takes a dev as a parameter, not a channel.grehan2005-11-111-1/+1
|
* Fix compile warning: pmap_bootstrap is now declared extern in pmap.h,grehan2005-11-112-2/+0
| | | | remove redundant declaration.
* No longer needed: replaced by mmu_if.m/pmap_dispatch.c/mmu_oea.cgrehan2005-11-091-2476/+0
|
* Apply r1.103 to correct place.grehan2005-11-091-1/+0
| | | | | | | pmap.c on PowerPC is now a combo of mmu_if.m, pmap_dispatch.c and mmu_oea.c (I forgot to delete pmap.c from CVS in last jumbo commit)
* Reimplement the reclamation of PV entries. Specifically, performalc2005-11-091-2/+0
| | | | | | | | | | | | | | | | | | reclamation synchronously from get_pv_entry() instead of asynchronously as part of the page daemon. Additionally, limit the reclamation to inactive pages unless allocation from the PV entry zone or reclamation from the inactive queue fails. Previously, reclamation destroyed mappings to both inactive and active pages. get_pv_entry() still, however, wakes up the page daemon when reclamation occurs. The reason being that the page daemon may move some pages from the active queue to the inactive queue, making some new pages available to future reclamations. Print the "reclaiming PV entries" message at most once per minute, but don't stop printing it after the fifth time. This way, we do not give the impression that the problem has gone away. Reviewed by: tegge
* Name change from pmap_* to moea_* to fit into the new order ofgrehan2005-11-082-934/+918
| | | | | | mmu implementation. This code handles the 32-bit 'OEA' MMU found on G2/G3/G4 PPC cores.
* Insert a layer of indirection to the pmap code, using a kobj forgrehan2005-11-086-4/+1248
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | the interface. This allows run-time selection of MMU code, based on CPU-type detection, or tunable-overrides when testing new code. Pre-requisite for G5 support. conf/files.powerpc - remove pmap.c - add mmu_if.h, mmu_oea.c, pmap_dispatch.c powerpc/include/mmuvar.h - definitions for MMU implementations powerpc/include/pmap.h - remove pmap_pte_spill declaration - add pmap_mmu_install declaration - size the phys_avail array - pmap_bootstrapped is now global-scope powerpc/powerpc/machdep.c - call kobj_machdep_init early in the boot sequence to allow kobj usage prior to SI_SUB_LOCK - install the OEA pmap code. This will be moved to CPU-specific init code in the future. powerpc/powerpc/mmu_if.m - Kobj MMU interface definitions powerpc/powerpc/pmap_dispatch.c - central dispatch for pmap calls - contains the global mmu kobj and the routine to locate the the mmu implementation and init the kobj
* Finally (!?) get to the bottom of the mysterious G3 boot-time panics.grehan2005-11-071-1/+1
| | | | | | | | | | | | | After a number of tests using nop's to change the alignment, it was confirmed that the mtibat instructions should be cache-aligned. FreeScale app note AN2540 indicates that the isync before and after the mtdbat is the right thing to do, but sync/isync isn't required before the mtibat so it has been removed. Fix by using a ".balign 32" to pull the code in question to the correct alignment. MFC after: 3 days
OpenPOWER on IntegriCloud