summaryrefslogtreecommitdiffstats
path: root/sys/amd64
Commit message (Collapse)AuthorAgeFilesLines
* Make LINT compile.phk2000-09-161-1/+1
|
* - Add a new process flag P_NOLOAD that marks a process that should bejhb2000-09-151-0/+1
| | | | | ignored during load average calcuations. - Set this flag for the idle processes and the softinterrupt process.
* Moved the fe driver from the compat section to the correct section.nyan2000-09-151-2/+2
| | | | Submitted by: sanpei
* Check to see if we actually have an interrupt descriptor and an interruptjhb2000-09-151-0/+21
| | | | | | | | thread for each interrupt that comes in. If we don't, log the event and return immediately for a hardware interrupt. For a softinterrupt, panic instead. Submitted by: ben
* Remove the mtx_t, witness_t, and witness_blessed_t types. Instead, justjhb2000-09-142-27/+25
| | | | | | use struct mtx, struct witness, and struct witness_blessed. Requested by: bde
* - Remove the inthand2_t type and use the equivalent driver_intr_t type fromjhb2000-09-138-127/+64
| | | | | | | | | | | | | newbus for referencing device interrupt handlers. - Move the 'struct intrec' type which describes interrupt sources into sys/interrupt.h instead of making it just be a x86 structure. - Don't create 'ithd' and 'intrec' typedefs, instead, just use 'struct ithd' and 'struct intrec' - Move the code to translate new-bus interrupt flags into an interrupt thread priority out of the x86 nexus code and into a MI ithread_priority() function in sys/kern/kern_intr.c. - Remove now-uneeded x86-specific headers from sys/dev/ata/ata-all.c and sys/pci/pci_compat.c.
* Be more careful about cleaning up the stack after function calls earlybde2000-09-132-22/+32
| | | | | | | | | | in the boot. The cleanup must be done in one of the few ways that db_numargs() understands, so that early backtraces in ddb don't underrun the stack. The underruns caused reboots a few years ago when there was an unmapped page above the stack (trapping to abort the command doesn't work early). Cleaned up some nearby code.
* Fixed hang on booting with -d. mtx_enter() was called on an uninitializedbde2000-09-132-10/+8
| | | | | lock. The quick fix in trap.c was not quite the version tested and had no effect; back it out.
* A new driver for PCI:SCSI RAID controllers based on the Adaptec FSAmsmith2000-09-131-0/+1
| | | | | design. This includes integrated Dell RAID controllers, the Dell PERC 2/QC and the HP NetRAID-4M.
* Clean up process accounting some more. Unfortunately, it is still notjhb2000-09-123-54/+42
| | | | | quite right on i386 as the CPU who runs statclock() doesn't have a valid clockframe to calculate statistics with.
* Quick fix for hang on booting with -d. mtx_enter() was called beforebde2000-09-121-2/+4
| | | | | | curproc was initialized. curproc == NULL was interpreted as matching the process holding Giant... Just skip mtx_enter() and mtx_exit() in trap() if (curproc == NULL && cold) (&& cold for safety).
* Don't panic for delivery of a multiplexed SWI. Most SWI handlersbde2000-09-121-1/+4
| | | | | | | | | | | | don't take an arg, but swi_generic() is special in order to avoid one whole conditional branch in the old SWI dispatch code. The new SWI dispatch code passed it a garbage arg. Bypass swi_generic() and call swi_dispatcher() directly, like the corresponding alpha code has always done. The panic was rare because because it only occurred if more than one of the {sio,cy,rc} drivers was configured and one was active, and the cy driver doesn't even compile.
* Turn the /dev/random device into a (pseudo-)device, not an option.markm2000-09-121-1/+1
| | | | | (I didn't realise that it was this easy!) Submitted by: jhb
* Move tx to the list of drivers that now require miibus.billf2000-09-111-1/+1
|
* When doing statistics for statclock on other CPU's, use the other CPUs'jhb2000-09-113-9/+9
| | | | | | idleproc pointers instead of our own for comparisons. Submitted by: tegge
* Style cleanups. No functional changes.jasone2000-09-091-42/+37
|
* Add file and line arguments to WITNESS_ENTER() and WITNESS_EXIT, sincejasone2000-09-091-14/+14
| | | | | | __FILE__ and __LINE__ don't get expanded usefully in inline functions. Add const to all witness*() arguments that are filenames.
* Rename mtx_enter(), mtx_try_enter(), and mtx_exit() and wrap them with cppjasone2000-09-081-68/+80
| | | | | | | | macros that expand to pass filename and line number information. This is necessary since we're using inline functions instead of macros now. Add const to the filename pointers passed througout the mtx and witness code.
* Remove an unneeded extern declaration of cp_time.jhb2000-09-083-6/+0
|
* Really fix USER_LDT. (Don't use currentldt as an L-value.)jake2000-09-084-5/+5
|
* Don't use currentldt as an L-value.jake2000-09-071-1/+1
| | | | | | | This should fix options USER_LDT. Reported-by: John Hay <jhay@zibbi.mikom.csir.co.za> Nickolay Dudorov <nnd@mail.nsk.ru>
* Test for both SMP and I386_CPU being set before generating an error.jhb2000-09-071-1/+1
|
* Don't assume that address of I/O address table increase (PC-98 only).nyan2000-09-071-2/+2
| | | | Pointed out by: Tomokazu HARADA <tkhara@osk4.3web.ne.jp>
* Major update to the way synchronization is done in the kernel. Highlightsjasone2000-09-0743-2161/+2597
| | | | | | | | | | | | | | | include: * Mutual exclusion is used instead of spl*(). See mutex(9). (Note: The alpha port is still in transition and currently uses both.) * Per-CPU idle processes. * Interrupts are run in their own separate kernel threads and can be preempted (i386 only). Partially contributed by: BSDi (BSD/OS) Submissions by (at least): cp, dfr, dillon, grog, jake, jhb, sheldonh
* Add KTR, a facility that logs kernel events in order to to facilitatejasone2000-09-071-6/+115
| | | | | | | debugging. Acquired from: BSDi (BSD/OS) Submitted by: dfr, grog, jake, jhb
* Introduce atomic_cmpset_int() and atomic_cmpset_long() from SMPng aphk2000-09-062-0/+73
| | | | | | | | | | | few hours earlier than the rest. The next DEVFS commit needs these functions. Alpha versions by: dfr i386 versions by: jakeb Approved by: SMPng
* Teach the NFS && NFS_ROOT case how to pick up information left by themsmith2000-09-051-0/+174
| | | | PXE loader, and use this to build the nfs_diskless structure.
* Catch a few more bogosities in certain chipsets before they mess us up.peter2000-09-052-38/+178
| | | | | | | | | | | | | Some have dual host->PCI bridges for the same logical pci bus (!), eg: some of the RCC chipsets. This is a 32/64 bit 33/66MHz and dual pci voltage motherboard so persumably there are electical or signalling differences but they are otherwise the same logical bus. The new PCI probe code however was getting somewhat upset about it and ended up creating two pci bridges to the same logical bus, which caused devices on that logical bus to appear and be probed twice. The ACPI data on this box correctly identifies this stuff, so bring on ACPI! :-)
* Complain if we cannot find loader(8) metadata.peter2000-09-031-0/+2
|
* Add the 'asr' driver, supplied by Mark Salyzyn of Adaptec (nee DPT).msmith2000-09-011-1/+2
| | | | | | | | This provides support for the Adaptec SCSI RAID controller family, as well as the DPT SmartRAID V and VI families. The driver will be maintained by Mark and Adaptec, and any changes should be referred to the MAINTAINER.
* Take a shot at fixing multiple pci busses on i386.peter2000-08-312-20/+100
| | | | | | | | pcib_set_bus() cannot be used on the new child because it is meant to be used on the *pci* device (it looks at the parent internally) not the pcib being added. Bite the bullet and use ivars for the bus number to avoid any doubts about whether the softc is consistant between probe and attach. This should not break the Alpha code.
* Merge rest piece of ACPI driver.To activate acpi driver ,addtakawata2000-08-312-3/+39
| | | | | | | | device acpi line. Merge finished. But still experimental phase.Need more hack! Obtained from:ACPI for FreeBSD project
* Improved Cyrix 486DX supports for NEC PC-98.kato2000-08-311-0/+15
| | | | | | | | - Enable WB cache via CCR2 and CR0. - Set the need_pre_dma_flush when the CPU_I486_ON_386 option is defined. Submitted by: Kaho Toshikazu <kaho@elam.kais.kyoto-u.ac.jp>
* * Completely rewrite the alpha busspace to hide the implementation fromdfr2000-08-282-96/+168
| | | | | | | | | | | | the drivers. * Remove legacy inx/outx support from chipset and replace with macros which call busspace. * Rework pci config accesses to route through the pcib device instead of calling a MD function directly. With these changes it is possible to cleanly support machines which have more than one independantly numbered PCI busses. As a bonus, the new busspace implementation should be measurably faster than the old one.
* Comment out the static wiring of hints for GENERIC - the release processpeter2000-08-241-1/+2
| | | | now installs the hints file into /boot.
* Add entries for the 'mly' driver. Re-group 'mly' and 'dpt' into a newmsmith2000-08-231-1/+4
| | | | classification for RAID controllers that have CAM interfaces.
* Remove all traces of Julians DEVFS (incl from kern/subr_diskslice.c)phk2000-08-201-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | Remove old DEVFS support fields from dev_t. Make uid, gid & mode members of dev_t and set them in make_dev(). Use correct uid, gid & mode in make_dev in disk minilayer. Add support for registering alias names for a dev_t using the new function make_dev_alias(). These will show up as symlinks in DEVFS. Use makedev() rather than make_dev() for MFSs magic devices to prevent DEVFS from noticing this abuse. Add a field for DEVFS inode number in dev_t. Add new DEVFS in fs/devfs. Add devfs cloning to: disk minilayer (ie: ad(4), sd(4), cd(4) etc etc) md(4), tun(4), bpf(4), fd(4) If DEVFS add -d flag to /sbin/inits args to make it mount devfs. Add commented out DEVFS to GENERIC
* Replace the mbuf external reference counting code with somethingdwmalone2000-08-191-7/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | that should be better. The old code counted references to mbuf clusters by using the offset of the cluster from the start of memory allocated for mbufs and clusters as an index into an array of chars, which did the reference counting. If the external storage was not a cluster then reference counting had to be done by the code using that external storage. NetBSD's system of linked lists of mbufs was cosidered, but Alfred felt it would have locking issues when the kernel was made more SMP friendly. The system implimented uses a pool of unions to track external storage. The union contains an int for counting the references and a pointer for forming a free list. The reference counts are incremented and decremented atomically and so should be SMP friendly. This system can track reference counts for any sort of external storage. Access to the reference counting stuff is now through macros defined in mbuf.h, so it should be easier to make changes to the system in the future. The possibility of storing the reference count in one of the referencing mbufs was considered, but was rejected 'cos it would often leave extra mbufs allocated. Storing the reference count in the cluster was also considered, but because the external storage may not be a cluster this isn't an option. The size of the pool of reference counters is available in the stats provided by "netstat -m". PR: 19866 Submitted by: Bosko Milekic <bmilekic@dsuper.net> Reviewed by: alfred (glanced at by others on -net)
* Increase the default NAPIC from 1 to 2 as a bandaid until we allocatemsmith2000-08-181-1/+1
| | | | these dynamically (ie. typically you shouldn't have to set NAPIC at all)
* Don't let an illegal value for dr7 get set, which can lead to anbsd2000-08-171-0/+18
| | | | | | unexpected TRCTRAP. Reported by: John W. De Boskey <jwd@FreeBSD.org>
* Prepare for a cleanup of pmap module API pollution introduced by thetegge2000-08-162-9/+14
| | | | | | | | | | | | | | | suggested fix in PR 12378. Keep track of all existing pmaps independent of existing processes. This allows for a process to temporarily connect to a different address space without the risk of missing an update of the original address space if the kernel grows. pmap_pinit2() is no longer needed on the i386 platform but is left as a stub until the alpha pmap code is updated. PR: 12378
* Include machine/cputypes.h so we get the cpu_class variable. This is neededjhb2000-08-131-0/+1
| | | | if I386_CPU is defined in the kernel config file.
* Clean up some low level bootstrap code:peter2000-08-119-131/+34
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - stop using the evil 'struct trapframe' argument for mi_startup() (formerly main()). There are much better ways of doing it. - do not use prepare_usermode() - setregs() in execve() will do it all for us as long as the p_md.md_regs pointer is set. (which is now done in machdep.c rather than init_main.c. The Alpha port did it this way all along and is much cleaner). - collect all the magic %cr0 etc register settings into one place and have the AP's call that instead of using magic numbers (!!) that keep changing over and over again. - Make it safe to call kthread_create() earlier, including during the device probe sequence. It doesn't need the callback mechanism that NetBSD's version uses. - kthreads created this way are root-less as they exist before the root filesystem is mounted. init(1) is set up so that it aquires the root pointers prior to running. If other kthreads want filesystem acccess we can make this code more generic. - set all threads start times once we have decided what time it is. - init uses a trampoline rather than the evil prepare_usermode() hack. - kern_descrip.c has a couple of tweaks to deal with forking when there is no rootdir or cwd etc. - adjust the early SYSINIT() sequence so that a few prereqisites are in place. eg: make sure the run queue is initialized before doing forks. With this, the USB code can easily create a kthread to do the device tree discovery. (I have tested it, it works nicely). There are still some open issues before this is truely useful. - tsleep() does not like working before the clock is running. It sort-of tries to spin wait, but it can do more useful things now. - stopping a kthread in kld code at unload time is "interesting" but we have a solution for that. The Alpha code needs no changes for this. It already uses pretty much the same strategies, but a little cleaner.
* Don't skip IOAPIC id conflict detection when only one pci bus is present.tegge2000-08-103-18/+12
| | | | | PR: 20312 Reviewed by: Steve Roome <steve@sse0691.bri.hp.com>
* Add workaround for livelock problem when starting APs.tegge2000-08-071-0/+4
| | | | | | | | With more than 1 AP present, an AP could fail to properly release the mp lock before waiting for smp_started to become nonzero. With early startup of APs, the BSP could fail to properly release the mp lock before waiting for smp_started to become nonzero.
* Change the behavior of isa_nmi to log an error message instead ofps2000-08-063-45/+93
| | | | | | | | | panicing and return a status so that we can decide whether to drop into DDB or panic. If the status from isa_nmi is true, panic the kernel based on machdep.panic_on_nmi, otherwise if DDB is enabled, drop to DDB based on machdep.ddb_on_nmi. Reviewed by: peter, phk
* Be more verbose when changing APIC ID on an IO APIC.tegge2000-08-064-6/+427
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Don't allow cpu entries in the MP table to contain APIC IDs out of range. Don't write outside array boundaries if an IO APIC entry in the MP table contains an APIC ID out of range. Assign APIC IDs for all IO APICs according to section 3.6.6 in the Intel MP spec: - If the current APIC ID on an IO APIC doesn't conflict with other IO APICs or CPUs, that APIC ID should be used. The copy of the MP table must be updated if the corresponding APIC ID in the MP table is different. - If the current APIC ID was in conflict with other units, the corresponding APIC ID specified in the MP table is checked for conflict. - If a conflict is still found then fall back to using a new unique ID. The copy of the MP table must be updated. - IDs out of range is considered to be in conflict. During these operations, the IO_TO_ID array cannot be used, since any conflict would have caused information loss. The array is then corrected, since all APIC ID conflicts should have been resolved. PR: 20312, 18919
* Handle write page faults (both write only or read-modify-write) as MI vmluoqi2000-07-311-3/+3
| | | | | write-only faults. This would allow write-only mmapped regions to function correctly.
* Allow use of TSC even if APM is compiled in but disabled.phk2000-07-302-2/+12
|
* Revert previous commit. Not all RAID controllers are SCSI.obrien2000-07-291-6/+5
|
OpenPOWER on IntegriCloud