summaryrefslogtreecommitdiffstats
path: root/sys/powerpc
Commit message (Collapse)AuthorAgeFilesLines
* Use proper trap code for the EXC_ALI traps. This fixes SIGBUS duringsobomax2006-08-032-2/+2
| | | | | | unaligned 64-bits load/stores. MFC after: 2 weeks
* Don't ignore errors from intr_event_add_handler().jhb2006-08-021-3/+1
| | | | | CID: 1516 Found by: Coverity Prevent (tm)
* Add device to access and modify Open Firmware NVRAM settings insobomax2006-08-011-0/+3
| | | | | | | | | PowerPC-based Apple's machines and small utility to do it from userland modelled after the similar utility in Darwin/OSX. Only tested on 1.25GHz G4 Mac Mini. MFC after: 1 month
* Complete the transition from pmap_page_protect() to pmap_remove_write().alc2006-08-014-174/+106
| | | | | | | | | | | | | Originally, I had adopted sparc64's name, pmap_clear_write(), for the function that is now pmap_remove_write(). However, this function is more like pmap_remove_all() than like pmap_clear_modify() or pmap_clear_reference(), hence, the name change. The higher-level rationale behind this change is described in src/sys/amd64/amd64/pmap.c revision 1.567. The short version is that I'm trying to clean up and fix our support for execute access. Reviewed by: marcel@ (ia64)
* Remove sio(4) and related options from MI files to amd64, i386marcel2006-07-291-1/+0
| | | | | | | | | and pc98 MD files. Remove nodevice and nooption lines specific to sio(4) from ia64, powerpc and sparc64 NOTES. There were no such lines for arm yet. sio(4) is usable on less than half the platforms, not counting a future mips platform. Its presence in MI files is therefore increasingly becoming a burden.
* Retire SYF_ARGMASK and remove both SYF_MPSAFE and SYF_ARGMASK. sy_narg isjhb2006-07-282-2/+2
| | | | now back to just being an argument count.
* Now that all system calls are MPSAFE, retire the SYF_MPSAFE flag used tojhb2006-07-282-18/+0
| | | | | | | | | mark system calls as being MPSAFE: - Stop conditionally acquiring Giant around system call invocations. - Remove all of the 'M' prefixes from the master system call files. - Remove support for the 'M' prefix from the script that generates the syscall-related files from the master system call files. - Don't explicitly set SYF_MPSAFE when registering nfssvc.
* Unify the checking for lock misbehavior in the various syscall()jhb2006-07-272-10/+26
| | | | | | | | | | | | | | implementations and adjust some of the checks while I'm here: - Add a new check to make sure we don't return from a syscall in a critical section. - Add a new explicit check before userret() to make sure we don't return with any locks held. The advantage here is that we can include the syscall number and name in syscall() whereas that info is not available in userret(). - Drop the mtx_assert()'s of sched_lock and Giant. They are replaced by the more general checks just added. MFC after: 2 weeks
* Add missing ptrace(2) system-call stops to various syscall()jhb2006-07-272-0/+10
| | | | | | implementations. MFC after: 1 week
* Turn this into an uart(4) bus attachment.marcel2006-07-261-40/+19
|
* Repocopy from: src/sys/powerpc/psim/sio_iobus.cmarcel2006-07-261-108/+0
| | | | | | to: src/sys/powerpc/psim/uart_iobus.c Meister: simon@
* o Remove device zsmarcel2006-07-261-5/+1
| | | | | o Remove nodevice uart o Reorder
* o Enable -Werrormarcel2006-07-261-3/+2
| | | | | | | o Remove commented-out sio(4) o Remove zs(4) o Add scc(4) o Add uart(4)
* o Move the prototype of mem_valid() from ofw_machdep.h to md_var.h.marcel2006-07-265-2/+38
| | | | | | | | | This avoids that mem.c has to include ofw_machdep.h, including all OFW related headers. o Provide a stub for OF_decode_addr(), which is used by low-level console drivers to obtain a tag and handle given a OFW phandle. This is different from sparc64, where a fake bus tag needs to be created explicitly.
* Include needed clock.h.marcel2006-07-262-0/+2
|
* Forward declare struct trapframe.marcel2006-07-261-0/+2
|
* 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
OpenPOWER on IntegriCloud