summaryrefslogtreecommitdiffstats
path: root/sys/i386
Commit message (Collapse)AuthorAgeFilesLines
* Fixed the latest unsortings of CPU_ENABLE_*.bde2004-02-241-5/+5
|
* Add missed CPU_ENABLE_LONGRON.sobomax2004-02-231-0/+1
| | | | Submitted by: Jon Noack <noackjr@alumni.rice.edu>
* Device megapatch 4/6:phk2004-02-2119-7/+38
| | | | | | | | Introduce d_version field in struct cdevsw, this must always be initialized to D_VERSION. Flip sense of D_NOGIANT flag to D_NEEDGIANT, this involves removing four D_NOGIANT flags and adding 145 D_NEEDGIANT flags.
* Device megapatch 3/6:phk2004-02-214-13/+0
| | | | | | | | | | | | Add missing D_TTY flags to various drivers. Complete asserts that dev_t's passed to ttyread(), ttywrite(), ttypoll() and ttykqwrite() have (d_flags & D_TTY) and a struct tty pointer. Make ttyread(), ttywrite(), ttypoll() and ttykqwrite() the default cdevsw methods for D_TTY drivers and remove the explicit initializations in various drivers cdevsw structures.
* Device megapatch 1/6:phk2004-02-2118-33/+0
| | | | | | | Free approx 86 major numbers with a mostly automatically generated patch. A number of strategic drivers have been left behind by caution, and a few because they still (ab)use their major number.
* Add back an include to fix the build for the CPU_ELAN case.jhb2004-02-191-0/+3
|
* Switch to using the new $PIR interrupt routing code and remove the oldjhb2004-02-183-436/+21
| | | | | code. The pci_cfgreg.c file now just controls reading/writing PCI config registers.
* Rework the $PIR (aka PCIBIOS) PCI interrupt routing code and split it offjhb2004-02-181-609/+445
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | into its own file: - All of the $PIR interrupt routing is now done in a link-centric fashion. When a host-PCI bridge that uses the $PIR attaches, it calls pir_parse() to parse the table. This scans for link devices and merges all the masks for each link device from the table entries. It then looks at the intline register of PCI devices connected to a link to figure out if the BIOS has routed this link and if so to which IRQ. - The IRQ for any given link can be overridden via a hint like so: 'hw.pci.link.0x62.irq=10' Any IRQ set in this matter is treated as if it were set that way by the BIOS. - We only call the BIOS to route each link device once. - When a PCI device wants to route an interrupt, we look it up in the $PIR to find the associated link. If the link is routed, we simply return the IRQ it is using. If it is not routed, we have to pick one. This uses a different algorithm from the old code. First off, when we try to pick an interrupt from a mask of possible interrupts, we try to pick the one that is least loaded as far as PCI devices. We maintain this weight based on the number of devices attached to each link device. When choosing an IRQ, we first attempt to route using any PCI only interrupts (the old code did this as well). If that doesn't work, we try to use the list of IRQs that the BIOS has used. This is a new step that the new code didn't do and avoids using IRQ 3 or 4 for every virgin interrupt routing. If none of the IRQs that the BIOS used worked, then we fall back to trying anything. - The fallback mask for !PC98 was fixed to include IRQ 3 and not allow IRQ 2. - We don't use the $PIR to route interrupts on a PCI-PCI bridge unless it has already been used to route on at least one Host-PCI bridge. This helps to avoid mixing and matching x86 firmware PCI interrupt routing methods (which is a Bad Thing(tm)). Silence on: current@
* Fixed a misplaced ifdef that prevented npx.c building without "device isa"bde2004-02-131-1/+1
| | | | | | | | | ISA. npx has few isa dependencies, but it does unconditional outb()'s to the isa bus in the !SMP case, and it attaches to isa if "device isa" is configured in order to support PNP-ISA. The ifdef for the latter was misplaced. PR: 62595
* Regen.jhb2004-02-063-19/+19
|
* Sync up MP safe flags with global syscalls.master. This includes write(),jhb2004-02-061-16/+16
| | | | | | close(), getpid(), ibcs2_setuid(), getuid(), ptrace(), ibcs2_pause(), ibcs2_nice(), ibcs2_kill(), ibcs2_pgrpsys(), dup(), pipe(), ibcs2_setgid(), getgid(), umask(), and sigreturn().
* Rename cn_unavailable to cnunavailable for little more consistency.kan2004-02-051-2/+2
| | | | | | Garbage collect unused cndebug() function. Suggested by: bde
* Updates cx driver information (Cronyx-Sigma)rik2004-02-051-1/+3
| | | | Approved by: imp (mentor)
* Fix a typo in kan's last commit: cnavaiable() -> cnavailable()roam2004-02-051-1/+1
|
* Eliminate global cons_unavailable flag and replace it by the statuskan2004-02-054-6/+9
| | | | | bit maintained on a per-device basis. Single variable is inadequate on machines running with multiple consoles enabled.
* Regen.jhb2004-02-0411-17/+17
|
* The following compat syscalls are now mpsafe: linux_getrlimit(),jhb2004-02-044-6/+6
| | | | | | | linux_setrlimit(), linux_old_getrlimit(), osf1_getrlimit(), osf1_setrlimit(), svr4_sys_ulimit(), svr4_sys_setrlimit(), svr4_sys_getrlimit(), svr4_sys_setrlimit64(), svr4_sys_getrlimit64(), ibcs2_sysconf(), and ibcs2_ulimit().
* Locking for the per-process resource limits structure.jhb2004-02-043-55/+41
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - struct plimit includes a mutex to protect a reference count. The plimit structure is treated similarly to struct ucred in that is is always copy on write, so having a reference to a structure is sufficient to read from it without needing a further lock. - The proc lock protects the p_limit pointer and must be held while reading limits from a process to keep the limit structure from changing out from under you while reading from it. - Various global limits that are ints are not protected by a lock since int writes are atomic on all the archs we support and thus a lock wouldn't buy us anything. - All accesses to individual resource limits from a process are abstracted behind a simple lim_rlimit(), lim_max(), and lim_cur() API that return either an rlimit, or the current or max individual limit of the specified resource from a process. - dosetrlimit() was renamed to kern_setrlimit() to match existing style of other similar syscall helper functions. - The alpha OSF/1 compat layer no longer calls getrlimit() and setrlimit() (it didn't used the stackgap when it should have) but uses lim_rlimit() and kern_setrlimit() instead. - The svr4 compat no longer uses the stackgap for resource limits calls, but uses lim_rlimit() and kern_setrlimit() instead. - The ibcs2 compat no longer uses the stackgap for resource limits. It also no longer uses the stackgap for accessing sysctl's for the ibcs2_sysconf() syscall but uses kernel_sysctl() instead. As a result, ibcs2_sysconf() no longer needs Giant. - The p_rlimit macro no longer exists. Submitted by: mtm (mostly, I only did a few cleanups and catchups) Tested on: i386 Compiled on: alpha, amd64
* Revert the skipping of segment register reloads as it appears to actuallyjhb2004-02-032-34/+40
| | | | | be a pessimization on non Pentium4 CPUs. More importantly, it is buggy as it can cause GPF's when using APM or vm86.
* Removed bogus checks that (PCPU_GET(curpcb) != NULL). Rev.1.586 ofbde2004-02-031-3/+1
| | | | | | | | | | | | | machdep.c fixed the missing early initialization of curpcb, so curpcb is now always set together with curthread and it cannot be NULL except before the IDT has been set up (so trap() is unreachable) or after a memory error. In any case, it was often used without checking. curcpb shouldn't exist anyway. It doesn't exist for most non-i386 arches. It just caches curthread->td_pcb in a global. This was a better idea before it was per-cpu. trap() and some other places can get at it more efficiently using td->td_pcb instead of PCPU_GET(curpcb). The main exception is support.s which mostly wants only curpcb->pcb_onfault.
* Set PCPU_GET(curpcb) for the BSP to thread0's pcb. Otherwise, the boot CPUjhb2004-02-021-0/+1
| | | | | doesn't have a pcb until after it's first context switch. This can cause secondary panics if a page fault happens during bootup.
* - Make sure the apic is idle before sending an IPI. This is required onjeff2004-02-021-4/+2
| | | | | | | non-X-APIC machines. Previously this was only done in the DETECT_DEADLOCK case when really it is needed in all cases. Reminded by: jhb
* Eliminate all TLB shootdowns by pmap_pte_quick(): By temporarily pinningalc2004-02-011-13/+52
| | | | | | | | | | the thread that calls pmap_pte_quick() and by virtue of the page queues lock being held, we can manage PADDR1/PMAP1 as a CPU private mapping. The most common effect of this change is to reduce the overhead of the page daemon on multiprocessors. In collaboration with: tegge
* Compiled longrun.c when defined options CPU_ENABLE_LONGRUN,shiba2004-01-311-1/+1
| | | | | and fixed wrong comparation in cpu vendor. Longrun function was re-enabled.
* Consistently capitalize acronyms like POSIX and NIC. Style.schweikh2004-01-291-52/+52
|
* Fix typos and remove whitespace at EOL.schweikh2004-01-291-20/+20
|
* Optimize the i386 interrupt entry code to not reload the segment registersjhb2004-01-282-40/+34
| | | | | | | if they already contain the correct kernel selectors. Reviewed by: peter Suggested by: peter
* Remove process lock XXX's, fixed in src/sys/sys/proc.h:1.366.rwatson2004-01-281-8/+0
|
* Stick two XXX's in the syscall() code: we call STOPEVENT() twice forrwatson2004-01-271-0/+8
| | | | | | every system call, and that grabs and release the process lock each time. Don't fix it (yet), but document it so we know to fix it. Also should be a 5.3-RELEASE todo item.
* - Call acpi_Startup() before parsing interrupt-related APIC resources so wejhb2004-01-261-7/+43
| | | | | | | | | | | | | | | | | can look at the ACPI tables. If the startup fails, we panic and tell the user to try rebooting with ACPI disabled. Previously in this case we would try to use $PIR interrupt routing which only works for the atpic while using the apic to handle interrupts which would result in misrouted interrupts and a hang at boot time with no error message. - Read the SCI out of the FADT instead of hardcoding 9 when checking to see if an interrupt override entry is for the SCI. - Try to work around some BIOS brain damage for the SCI's programming by forcing the SCI to be level triggered and active low if it is routed to a non-ISA interrupt (greater than 15) or if it is identity mapped with edge trigger and active high polarity. This should fix some of the hangs with device apic and ACPI that some people see. Reviewed by: njl
* Move LongRun support out of identcpu.c, where it hardly belongs, into itssobomax2004-01-253-263/+311
| | | | | | | | own file and make it opt-in, not mandatory, depending on CPU_ENABLE_LONGRUN config(8) option. Discussed with: nate MFC after: 2 weeks
* - Now that both schedulers support temporary cpu pinning use this ratherjeff2004-01-251-77/+17
| | | | | | | | | | | than the switchin functions to guarantee that we're operating with the correct tlb entry. - Remove the post copy/zero tlb invalidations. It is faster to invalidate an entry that is known to exist and so it is faster to invalidate after use. However, some architectures implement speculative page table prefetching so we can not be guaranteed that the invalidated entry is still invalid when we re-enter any of these functions. As a result of this we must always invalidate before use to be safe.
* - Don't define DETECT_DEADLOCK. I don't know that this code has detectedjeff2004-01-251-1/+0
| | | | | | | a deadlock in several years. Furthermore, the IPI code is currently protected by a seperate spinlock. This only served to make IPIs twice as expensive as they had to be which severely slowed down the IPI heavy ULE scheduler.
* - Recruit some new ULE users by making it the default scheduler in GENERIC.jeff2004-01-241-1/+1
| | | | | ULE will be in a probationary period to determine whether it will be left as the default in 5.3 which would likely mean the rest of the 5.x series.
* - Move performance-controlling sysctls into hw.p4tcc.* tree;sobomax2004-01-242-26/+36
| | | | | | | | | | Suggested by: nate - get rid of "magick" values in code and make sysctl's reflecting reality on processor versions which have one or another frequency "forbidden" due to errata. MFC after: 2 weeks
* - Move performance-controlling sysctls into hw.p4tcc.* tree;sobomax2004-01-241-1/+1
| | | | | | | | | | | | | | | Suggested by: nate - get rid of "magick" values in code and make sysctl's reflecting reality on processor versions which have one or another frequency "forbidden" due to errata. PR: Submitted by: Reviewed by: Approved by: Obtained from: MFC after: 2 weeks
* - Move smp_topology to subr_smp.c so that it is defined on all architectures.jeff2004-01-241-1/+0
|
* Add PFIL_HOOKS to the GENERIC kernel configuration, primarily sonectar2004-01-241-0/+1
| | | | | | that one can load the IPFilter module (which requires PFIL_HOOKS). Requested by: Many, for over a year
* Add linenumber and source filename to panic(9) output.phk2004-01-191-3/+9
| | | | Ideally a traceback should be printed too, any takers ?
* Fixed misplacement and bitrot in the cy driver's configuration inbde2004-01-191-17/+14
| | | | | | | | | | rev.1.1040. It is a miscellaneous isa+pci driver, but came back described as a pci-only driver and placed in an i4b pci subsection after its migration to /sys/conf/NOTES. Put it back where it used to be, fully unsorted in the `Miscellaneous hardware' section. Reduced nearby disorder in this section by moving configuration of the digi driver to where it was for the old digiboard drivers, so that the order at least matches the order in the table of contents.
* Removed some garbage comments:bde2004-01-191-8/+1
| | | | | | | - references to removed math emulators for NPX_DEBUG - header for the null set of mandatory devices - reference to the removed (and bogus when it existed) sysctl kern.timecounter.method.
* Fixed formatting of sentence breaks. Use 2 spaces for all of them insteadbde2004-01-191-14/+14
| | | | of for about 3/4 of them.
* FIxed unsorting in previous commit (description of CPU_ENABLE_TCC).bde2004-01-191-27/+28
| | | | | | | FIxed some nearby disorder (descriptions of CPU_BLUELIGHTNING_3X, CPU_DIRECT_MAPPED_CACHE, CPU_DISABLE_CMPXCHG, CPU_DISABLE_SSE, CPU_ELAN_XTAL and CPU_SOEKRIS, and options for all of these except CPU_DIRECT_MAPPED_CACHE).
* Add new CPU_ENABLE_TCC option, from NOTES:sobomax2004-01-181-0/+3
| | | | | | | | | | | | | | CPU_ENABLE_TCC enables Thermal Control Circuitry (TCC) found in some Pentium(tm) 4 and (possibly) later CPUs. When enabled and detected, TCC allows to restrict power consumption by using machdep.cpuperf* sysctls. This operates independently of SpeedStep and is useful on systems where other mechanisms such as apm(4) or acpi(4) don't work. Given the fact that many, even modern, notebooks don't work properly with Intel ACPI, this is indeed very useful option for notebook owners. Obtained from: OpenBSD MFC after: 2 weeks
* Add new CPU_ENABLE_TCC option, from NOTES:sobomax2004-01-183-0/+495
| | | | | | | | | | | | | | CPU_ENABLE_TCC enables Thermal Control Circuitry (TCC) found in some Pentium(tm) 4 and (possibly) later CPUs. When enabled and detected, TCC allows to restrict power consumption by using machdep.cpuperf* sysctls. This operates independently of SpeedStep and is useful on systems where other mechanisms such as apm(4) or acpi(4) don't work. Given the fact that many, even modern, notebooks don't work properly with Intel ACPI, this is indeed very useful option for notebook owners. Obtained from: OpenBSD MFC after: 2 weeks
* Only remove the handler if we installed it.njl2004-01-121-2/+4
|
* Clean up the probe message and sort the function table according tonjl2004-01-121-3/+3
| | | | the function order in the file.
* Update list of device drivers that support polling.ale2004-01-111-2/+2
| | | | | | | | | Remove redundancy in NOTES. PR: docs/61195 Submitted by: Xin LI <delphij@frontfree.net> Approved by: blackend (mentor) MFC after: 1 week
* Add the ACPI Toshiba extras driver (hotkeys, LCD backlight, video output,njl2004-01-111-0/+485
| | | | | | | | | | | forced fan control, and CPU throttling). PR: Submitted by: Hiroyuki Aizu <aizu@navi.org> Reviewed by: Approved by: Obtained from: MFC after:
* Add the ACPI Toshiba extras driver (hotkeys, LCD backlight, video output,njl2004-01-111-0/+4
| | | | | | forced fan control, and CPU throttling). Submitted by: Hiroyuki Aizu <aizu@navi.org>
OpenPOWER on IntegriCloud