summaryrefslogtreecommitdiffstats
path: root/sys/alpha
Commit message (Collapse)AuthorAgeFilesLines
* Use correct flag in test whether this interrupt handler is fast or not.mjacob2001-06-041-1/+1
| | | | | PR: 27866 Submitted by: Peter Jeremy <peter.jeremy@alcatel.com.au>
* Properly wrap mtx_intr_enable() macro in "do $bla while (0)"phk2001-06-021-1/+1
|
* Resurrect platform.pci_intr_map() and essentially undo the effects ofgallatin2001-06-0115-213/+206
| | | | | | | | | | | | | | | | | the interface conversion to platform.pci_intr_route(). I've left the platform.pci_intr_route() function pointer in place, as well as alpha_pci_route_interrupt(), but no platform currently implements it. To work around the removal of alpha_platform_assign_pciintr(cfg); from the pci probe code, I've hooked in calls to platform.pci_intr_map() in pcib_read_config (similar to the x86 APIC_IO ifdef in pci_cfgregread) for every chipset that has a platform which needs it. While here, I've removed the interupt mapping/routing code from the AS2x00 platform because its not required (it has never been present in -stable). Tested on: UP1000, Miata(GL), XP1000, AS2100, AS500
* Clean up the code exporting interrupt statistics via sysctl a bit:tmm2001-06-011-8/+0
| | | | | | | | | | | | | - move the sysctl code to kern_intr.c - do not use INTRCNT_COUNT, but rather eintrcnt - intrcnt to determine the length of the intrcnt array - move the declarations of intrnames, eintrnames, intrcnt and eintrcnt from machine-dependent include files to sys/interrupt.h - remove the hw.nintr sysctl, it is not needed. - fix various style bugs Requested by: bde Reviewed by: bde (some time ago)
* remove unneeded #include <vm/vm_map.h>gallatin2001-05-312-2/+0
|
* Backout previous revision. While it fixed many platforms, it brokegallatin2001-05-311-7/+2
| | | | | | | all alphas with devices behind ppb's. I'm working on a better solution now. Note that all alphas that use per-platform interrupt mapping are broken again (as they have been for several months)
* move wx to be part of miibus requiring chipsetsmjacob2001-05-302-2/+2
|
* GC #if 0'd calls to releasing and acquiring the old style giant kerneljhb2001-05-291-6/+0
| | | | lock.
* Remove MFS options from all example kernel configs.phk2001-05-292-2/+0
|
* One needs to introduce things with a `.file' directive before trying toobrien2001-05-283-2/+13
| | | | | do a .loc on it. BTW, the .loc needs to be in a .text section. gas 2.11.0 catches these oversights where previous versions did not.
* finally fix intr routing on alphas such as the as500 after months ofgallatin2001-05-271-2/+7
| | | | | | | | | | | | | | | | | | | breakage: - call PCIB_ROUTE_INTERRUPT() regardless of how valid the intline looks. Some alphas leave garbage in the intline and leave the intr mapping to OS platform support routines that map slots/buses to intlines - Down in the alpha pci code, first try platform.pci_intr_route() and if it doesn't exist or returns garbage, just read the intline out of config space. tested on AS500 (garbage in intline) and UP1000 (PC-like, intline is valid) Note that a nice little hack like the APIC_IO section of pci_cfgregread() is not workable. This is because the calling interface for alpha_pci_route_interrupt() requires us to figure out the bus/slot/etc from a device_t. At pci_read_device() time, we don't have a device_t for the bus/slot/func in question.
* catch up to i386: Don't acquire Giant just to print the trap and panicgallatin2001-05-251-2/+0
|
* make this compile.gallatin2001-05-251-1/+1
|
* track the One True Architecture (i386)mjacob2001-05-251-4/+4
|
* JHB would prefer the KTR examples not be in here.obrien2001-05-252-8/+0
|
* o Merge contents of struct pcred into struct ucred. Specifically, add therwatson2001-05-251-17/+30
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | real uid, saved uid, real gid, and saved gid to ucred, as well as the pcred->pc_uidinfo, which was associated with the real uid, only rename it to cr_ruidinfo so as not to conflict with cr_uidinfo, which corresponds to the effective uid. o Remove p_cred from struct proc; add p_ucred to struct proc, replacing original macro that pointed. p->p_ucred to p->p_cred->pc_ucred. o Universally update code so that it makes use of ucred instead of pcred, p->p_ucred instead of p->p_pcred, cr_ruidinfo instead of p_uidinfo, cr_{r,sv}{u,g}id instead of p_*, etc. o Remove pcred0 and its initialization from init_main.c; initialize cr_ruidinfo there. o Restruction many credential modification chunks to always crdup while we figure out locking and optimizations; generally speaking, this means moving to a structure like this: newcred = crdup(oldcred); ... p->p_ucred = newcred; crfree(oldcred); It's not race-free, but better than nothing. There are also races in sys_process.c, all inter-process authorization, fork, exec, and exit. o Remove sigio->sio_ruid since sigio->sio_ucred now contains the ruid; remove comments indicating that the old arrangement was a problem. o Restructure exec1() a little to use newcred/oldcred arrangement, and use improved uid management primitives. o Clean up exit1() so as to do less work in credential cleanup due to pcred removal. o Clean up fork1() so as to do less work in credential cleanup and allocation. o Clean up ktrcanset() to take into account changes, and move to using suser_xxx() instead of performing a direct uid==0 comparision. o Improve commenting in various kern_prot.c credential modification calls to better document current behavior. In a couple of places, current behavior is a little questionable and we need to check POSIX.1 to make sure it's "right". More commenting work still remains to be done. o Update credential management calls, such as crfree(), to take into account new ruidinfo reference. o Modify or add the following uid and gid helper routines: change_euid() change_egid() change_ruid() change_rgid() change_svuid() change_svgid() In each case, the call now acts on a credential not a process, and as such no longer requires more complicated process locking/etc. They now assume the caller will do any necessary allocation of an exclusive credential reference. Each is commented to document its reference requirements. o CANSIGIO() is simplified to require only credentials, not processes and pcreds. o Remove lots of (p_pcred==NULL) checks. o Add an XXX to authorization code in nfs_lock.c, since it's questionable, and needs to be considered carefully. o Simplify posix4 authorization code to require only credentials, not processes and pcreds. Note that this authorization, as well as CANSIGIO(), needs to be updated to use the p_cansignal() and p_cansched() centralized authorization routines, as they currently do not take into account some desirable restrictions that are handled by the centralized routines, as well as being inconsistent with other similar authorization instances. o Update libkvm to take these changes into account. Obtained from: TrustedBSD Project Reviewed by: green, bde, jhb, freebsd-arch, freebsd-audit
* + Turn on SMP support by default (yes an Alpha SMP kernel works onobrien2001-05-252-0/+14
| | | | | uniprocessor systems, aren't Alpha's neat :-)) + Add example KTR (debugging) options.
* Make sure that all resource allocation is handled in the pcib device, notdfr2001-05-2312-119/+90
| | | | | | | | the chipset. This is already how the multi-hose systems handle resource allocation and it fixes a bug where dense and bwx memory allocations were not handled properly. Reviewed by: gallatin
* catch up to i386:gallatin2001-05-231-7/+24
| | | | | | | - remove Giant for vm related traps - don't hold Giant for MP safe syscalls Reviewed-by: jhb
* - FDESC, FIFO, NULL, PORTAL, PROC, UMAP and UNION fileru2001-05-233-3/+3
| | | | | | | | | | | | | | | systems were repo-copied from sys/miscfs to sys/fs. - Renamed the following file systems and their modules: fdesc -> fdescfs, portal -> portalfs, union -> unionfs. - Renamed corresponding kernel options: FDESC -> FDESCFS, PORTAL -> PORTALFS, UNION -> UNIONFS. - Install header files for the above file systems. - Removed bogus -I${.CURDIR}/../../sys CFLAGS from userland Makefiles.
* grab the vm mtx around exec_new_vmspace()gallatin2001-05-221-0/+2
|
* Change pmap_emulate_reference() so that it only touches the vm_pagegallatin2001-05-211-1/+9
| | | | | | | | | flags if it is safe to do so, otherwise it will just alter the pmap state (eg, clear the appropriate PG_FOx bits). This gets alpha booting in the face of the vm_mtx introduction. Reviewed by: dfr
* catch these files up to their i386 neighbors to make alpha bootgallatin2001-05-213-8/+28
| | | | prior to the vm_mtx
* fix vm_mtx related compiler warninggallatin2001-05-201-0/+1
|
* fix alpha-MD compile errors after the vm_mtx commitgallatin2001-05-2011-0/+11
|
* Style changes -- revert ordering to mostly two revs ago.obrien2001-05-181-65/+65
| | | | | | Embellish some comments, fix tab'ing. Requested by: bde
* - Move the setting of bootverbose to a MI SI_SUB_TUNABLES SYSINIT.jhb2001-05-171-5/+1
| | | | | | | | - Attach a writable sysctl to bootverbose (debug.bootverbose) so it can be toggled after boot. - Move the printf of the version string to a SI_SUB_COPYRIGHT SYSINIT just afer the display of the copyright message instead of doing it by hand in three MD places.
* Consistently define the rune types.obrien2001-05-161-4/+17
| | | | Follow NetBSD's lead and add a _BSD_MBSTATE_T_ type.
* Move the int typedefs to the top so they can be used in defining other types.obrien2001-05-161-24/+24
| | | | | | Ensure every platform has __offsetof. Make multiple inclusion detection consistent with other <platform>/include/*.h files.
* Lock the procfs functions for doing a single step and reading/writingjhb2001-05-161-28/+16
| | | | | | registers better. Hold sched_lock not only for checking the flag but also while performing the actual operation to ensure the process doesn't get swapped out by another CPU while we the operation is being performed.
* "Sir, the deorbit burn completed succesfully."jhb2001-05-151-33/+0
| | | | RIP {sys/machine}/ipl.h.
* Remove unneeded includes of sys/ipl.h and machine/ipl.h.jhb2001-05-153-3/+0
|
* Implement a few more floppy ioctl commands and IO options, namely:joerg2001-05-141-2/+18
| | | | | | | | | | | | | | | | | | | | | . FD_CLRERR clears the error counter, thus re-enables kernel error printf()s, . FD_GSTAT obtains the last FDC operation state, if any, . FDOPT_NOERRLOG (temporarily) turns off kernel printf() floppy error logging, . FDOPT_NOERROR makes the kernel ignore an FDC error, thus can enable the transfer of an erroneous sector to the user application All options are being cleared on (last) close. Prime consumer of the last features will be fdread(1), to be committed shortly. (FD_CLRERR should be wired into fdcontrol(8), but then fdcontrol(8) needs a major rewrite anyway.)
* Convert DEVFS from an "opt-in" to an "opt-out" option.phk2001-05-132-2/+0
| | | | | | | | | If for some reason DEVFS is undesired, the "NODEVFS" option is needed now. Pending any significant issues, DEVFS will be made mandatory in -current on july 1st so that we can start reaping the full benefits of having it.
* Simply the vm fault trap handling code a bit by using if-else instead ofjhb2001-05-111-11/+4
| | | | | duplicating code in the then case and then using a goto to jump around the else case.
* Allow sendsig() to hand the proc lock off to osendsig() rather than havingjhb2001-05-111-2/+1
| | | | | sendsig() release the lock just so it can call osendsig() and have osendsig() acquire the lock.
* - Split out the support for per-CPU data from the SMP code. UP kernelsjhb2001-05-103-3/+3
| | | | | | | have per-CPU data and gdb on the i386 at least needs access to it. - Clean up includes in kern_idle.c and subr_smp.c. Reviewed by: jake
* The new order of things is that dwlpxN is now called pcibN- so hack aroundmjacob2001-05-101-2/+4
| | | | | *that* whilst we ponder the best way to decide how to register dwlpx interrupts with TLSB.
* add alpha_pci_route_interrupt methodmjacob2001-05-101-2/+4
|
* Quick hack to reintroduce the notion that there might be alpha platformsmjacob2001-05-101-20/+82
| | | | without an i8254 timer/counter. This really needs to be cleaned up.
* Include sys/lock.h for witness_list_locks() and axe unneeded sys/mutex.hjhb2001-05-091-1/+1
| | | | include.
* Undo part of the tangle of having sys/lock.h and sys/mutex.h included inmarkm2001-05-016-59/+57
| | | | | | | | | | | other "system" header files. Also help the deprecation of lockmgr.h by making it a sub-include of sys/lock.h and removing sys/lockmgr.h form kernel .c files. Sort sys/*.h includes where possible in affected files. OK'ed by: bde (with reservations)
* Turn on preemption by default on the alpha arch. This also removes thejhb2001-05-011-5/+0
| | | | | | PREEMPTION kernel option. Not objected to by: -alpha
* Overhaul of the SMP code. Several portions of the SMP kernel support havejhb2001-04-2711-769/+115
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | been made machine independent and various other adjustments have been made to support Alpha SMP. - It splits the per-process portions of hardclock() and statclock() off into hardclock_process() and statclock_process() respectively. hardclock() and statclock() call the *_process() functions for the current process so that UP systems will run as before. For SMP systems, it is simply necessary to ensure that all other processors execute the *_process() functions when the main clock functions are triggered on one CPU by an interrupt. For the alpha 4100, clock interrupts are delievered in a staggered broadcast fashion, so we simply call hardclock/statclock on the boot CPU and call the *_process() functions on the secondaries. For x86, we call statclock and hardclock as usual and then call forward_hardclock/statclock in the MD code to send an IPI to cause the AP's to execute forwared_hardclock/statclock which then call the *_process() functions. - forward_signal() and forward_roundrobin() have been reworked to be MI and to involve less hackery. Now the cpu doing the forward sets any flags, etc. and sends a very simple IPI_AST to the other cpu(s). AST IPIs now just basically return so that they can execute ast() and don't bother with setting the astpending or needresched flags themselves. This also removes the loop in forward_signal() as sched_lock closes the race condition that the loop worked around. - need_resched(), resched_wanted() and clear_resched() have been changed to take a process to act on rather than assuming curproc so that they can be used to implement forward_roundrobin() as described above. - Various other SMP variables have been moved to a MI subr_smp.c and a new header sys/smp.h declares MI SMP variables and API's. The IPI API's from machine/ipl.h have moved to machine/smp.h which is included by sys/smp.h. - The globaldata_register() and globaldata_find() functions as well as the SLIST of globaldata structures has become MI and moved into subr_smp.c. Also, the globaldata list is only available if SMP support is compiled in. Reviewed by: jake, peter Looked over by: eivind
* Make stathz match reality on platforms like the 4100 where hz!=1024gallatin2001-04-271-1/+1
| | | | | | It might be more correct to make stathz as close as possible to 128, but that would involve adding complexity to the clock intr path, which I don't want to do.
* Initialize p_md.md_kernnest to 1 for newly fork'd processes since theyjhb2001-04-261-0/+6
| | | | start off in the kernel.
* Fix SCM ID's and remove tailing blanks.obrien2001-04-258-27/+24
|
* - Make the dumping of console messages from the secondary CPU's to thejhb2001-04-251-3/+5
| | | | | kernel console be #ifdef DIAGNOSTIC. - Don't set ktr_mask in release_aps().
* alpha_fpstate_save is fairly expensive (critical enter/exit, possiblygallatin2001-04-251-0/+2
| | | | | | | saves 32 registers) to do on every context switch. This is only required for SMP, so only do it there. We should also look at moving the critical enter/exit out to the callers
* Add a new field 'md_kernnest' to the alpha machine dependent processjhb2001-04-246-15/+69
| | | | | | | | | | | | | | | | | | | | | structure. This field keeps track of how many levels deep we are nested into the kernel. The nesting level is bumped at the start of a trap, interrupt, syscall, or exception and is decremented on return. This is used to detect the case when the kernel is returning back to a kernel context in exception_return(). If we are returning to the kernel we need to update the globaldata pointer register saved in the stack frame in case we have switched CPU's between taking the initial interrupt that saved the frame and returning. If we don't do this fixup it is possible for a CPU to use the wrong per-cpu data. On UP systems this is not a problem, so the code is conditional on SMP. A count was used instead of simply checking the process status register in the frame during exception_return() since there are critical sections at the very start and end of a trap, exception, or interrupt from userland in which we could trash the t7 register being used in userland. The counter is incremented after adn before these critical sections respectively so that we will not overwrite the saved t7 register if we are interrupted during one of these critical sections.
OpenPOWER on IntegriCloud