summaryrefslogtreecommitdiffstats
path: root/sys/i386/include
Commit message (Collapse)AuthorAgeFilesLines
* Rework the APIC mixed mode support a bit:jhb2004-05-101-0/+1
| | | | | | | | | | | | | | | | | - Require the APIC enumerators to explicitly enable mixed mode by calling ioapic_enable_mixed_mode(). Calling this function tells the apic driver that the PC-AT 8259A PICs are present and routable through the first I/O APIC via an ExtINT pin. The mptable enumerator always calls this function for now. The MADT enumerator only enables mixed mode if the PC-AT compatability flag is set in the MADT header. - Allow mixed mode to be enabled or disabled via a 'hw.apic.mixed_mode' tunable. By default this tunable is set to 1 (true). The kernel option NO_MIXED_MODE changes the default to 0 to preserve existing behavior, but adding 'hw.apic.mixed_mode=0' to loader.conf achieves the same effect. - Only use mixed mode to route IRQ 0 if it is both enabled by the APIC enumerator and activated by the loader tunable. Note that both conditions must be true, so if the APIC enumerator does not enable mixed mode, then you can't set the tunable to try to override the enumerator.
* Add an MI implementation of the ACPI global lock routines and retire thenjl2004-05-051-35/+8
| | | | | | | | individual asm versions. The global lock is shared between the BIOS and OS and thus cannot use our mutexes. It is defined in section 5.2.9.1 of the ACPI specification. Reviewed by: marcel, bde, jhb
* - Create a pir0 psuedo device as a child of legacy0 if we attach a legacyjhb2004-05-041-1/+0
| | | | | | | | | | | | | | | | | host-PCI bridge device and find a valid $PIR. - Make pci_pir_parse() private to pci_pir.c and have pir0's attach routine call it instead of having legacy_pcib_attach() call it. - Implement suspend/resume support for the $PIR by giving pir0 a resume method that calls the BIOS to reroute each link that was already routed before the machine was suspended. - Dump the state of the routed flag in the links display code. - If a link's IRQ is set by a tunable, then force that link to be re-routed the first time it is used. - Move the 'Found $PIR' message under bootverbose as the pir0 description line lists the number of entries already. The pir0 line also only shows up if we are actually using the $PIR which is a bonus. - Use BUS_CONFIG_INTR() to ensure that any IRQs used by a PCI link are set to level/low trigger/polarity.
* - Add a new pic method pic_config_intr() to set the trigger mode andjhb2004-05-041-0/+4
| | | | | | | | | | | | | | polarity for a specified IRQ. The intr_config_intr() function wraps this pic method hiding the IRQ to interrupt source lookup. - Add a config_intr() method to the atpic(4) driver that reconfigures the interrupt using the ELCR if possible and returns an error otherwise. - Add a config_intr() method to the apic(4) driver that just logs any requests that would change the existing programming under bootverbose. Currently, the only changes the apic(4) driver receives are due to bugs in the acpi(4) driver and its handling of link devices, hence the reason for such requests currently being ignored. - Have the nexus(4) driver on i386 implement the bus_config_intr() function by calling intr_config_intr().
* - Change the APIC code to mostly use the recently added intr_triggerjhb2004-05-041-4/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | and intr_polarity enums for passing around interrupt trigger modes and polarity rather than using the magic numbers 0 for level/low and 1 for edge/high. - Convert the mptable parsing code to use the new ELCR wrapper code rather than reading the ELCR directly. Also, use the ELCR settings to control both the trigger and polarity of EISA IRQs instead of just the trigger mode. - Rework the MADT's handling of the ACPI SCI again: - If no override entry for the SCI exists at all, use level/low trigger instead of the default edge/high used for ISA IRQs. - For the ACPI SCI, use level/low values for conforming trigger and polarity rather than the edge/high values we use for all other ISA IRQs. - Rework the tunables available to override the MADT. The hw.acpi.force_sci_lo tunable is no longer supported. Instead, there are now two tunables that can independently override the trigger mode and/or polarity of the SCI. The hw.acpi.sci.trigger tunable can be set to either "edge" or "level", and the hw.acpi.sci.polarity tunable can be set to either "high" or "low". To simulate hw.acpi.force_sci_lo, set hw.acpi.sci.trigger to "level" and hw.acpi.sci.polarity to "low". If you are having problems with ACPI either causing an interrupt storm or not working at all (e.g., the power button doesn't turn invoke a shutdown -p now), you can try tweaking these two tunables to find the combination that works.
* Add a simple mini-driver for the ELCR register. Originally, the ELCRjhb2004-05-041-0/+5
| | | | | | | | | | | | | | | register controlled the trigger mode and polarity of EISA interrupts. However, it appears that most (all?) PCI systems use the ELCR to manage the trigger mode and polarity of ISA interrupts as well since ISA IRQs used to route PCI interrupts need to be level triggered with active low polarity. We check to see if the ELCR exists by sanity checking the value we get back ensuring that IRQS 0 (8254), 1 (atkbd), 2 (the link from the slave PIC), and 8 (RTC) are all clear indicating edge trigger and active high polarity. This mini-driver will be used by the atpic driver to manage the trigger and polarity of ISA IRQs. Also, the mptable parsing code will use this mini driver rather than examining the ELCR directly.
* Increase BUS_SPACE_IAT_MAXSIZE to 33 for the ed driver.nyan2004-05-041-1/+1
|
* Make the legacy_pcib_attach() function static.jhb2004-05-031-1/+0
|
* Belatedly remove a file from the earlier apic code that is no longer used.jhb2004-04-271-59/+0
|
* Hide FLT_EVAL_METHOD and DECIMAL_DIG in pre-C99 compilationdas2004-04-251-0/+4
| | | | | | | environments. PR: 63935 Submitted by: Stefan Farfeleder <stefan@fafoe.narf.at>
* - is_physical_memory()'s parameter, which is a physical address, should bealc2004-04-111-1/+1
| | | | a vm_paddr_t not a vm_offset_t.
* - pmap_kenter_temporary()'s first parameter, which is a physical address,alc2004-04-101-1/+1
| | | | should be declared as vm_paddr_t not vm_offset_t.
* - pmap_kenter_temporary() is unused by machine-independent code. Therefore,alc2004-04-101-0/+1
| | | | | | | | move its declaration to the machine-dependent header file on those machines that use it. In principle, only i386 should have it. Alpha and AMD64 should use their direct virtual-to-physical mapping. - Remove pmap_kenter_temporary() from ia64. It is unused. Approved by: marcel@
* Remove advertising clause from University of California Regent'simp2004-04-0729-116/+0
| | | | | | | license, per letter dated July 22, 1999 and email from Peter Wemm, Alan Cox and Robert Watson. Approved by: core, peter, alc, rwatson
* Remove avail_start on those platforms that no longer use it. (Only amd64alc2004-04-051-1/+0
| | | | does anything with it beyond simple initialization.)
* Move the definition of rss() from db_interface.c to cpufunc.h wheremarcel2004-04-031-0/+8
| | | | | | it belongs. Change the implementation to match those of rfs() and rgs() for consistency and irrespective of whether the original was more correct or not (technically speaking).
* Introduce the cpumask_t type. The purpose of the type is to create amarcel2004-03-201-0/+1
| | | | | | | | | | | | | | | | | | | level of abstraction for any and all CPU mask and CPU bitmap variables so that platforms have the ability to break free from the hard limit of 32 CPUs, simply because we don't have more bits in an u_int. Note that the type is not supposed to solve massive parallelism, where the number of CPUs can be larger than the width of the widest integral type. As such, cpumask_t is not supposed to be a compound type. If such would be necessary in the future, we can deal with the issues then and there. For now, it can be assumed that the type is integral and unsigned. With this commit, all MD definitions start off as u_int. This allows us to phase-in cpumask_t at our leasure without breaking anything. Once cpumask_t is used consistently, platforms can switch to wider (or smaller) types if such would be beneficial (or not; whatever :-) Compile-tested on: i386
* The gsc driver uses the old COMPAT_ISA api. Retire it so we canimp2004-03-141-53/+0
| | | | | retire the COMPAT_ISA shims. If someone were to redo this driver with the new APIs and test it, it can return.
* The spigot driver uses the old COMPAT_ISA interface. Retire it sinceimp2004-03-141-97/+0
| | | | | that's going away soon. Should someone reimplement it using modern APIs and can test the driver, it can return.
* stl and stli use the old COMPAT_ISA api. slt also uses the really oldimp2004-03-141-495/+0
| | | | | | | | COMPAT_PCI api. This API is going away, so this driver is going away also. If users are interested in updating this, please contact the author since he has some preliminary work to move this to newer APIs.
* remove the ioctl files from the asc, ctx and wt drivers just removedimp2004-03-143-114/+0
|
* Move the non-MD machine/dvcfg.h and machine/physio_proc.h to a commonpeter2004-03-132-122/+0
| | | | MI area before they proliferate more.
* These are changes to allow to use the Intel C/C++ compiler (lang/icc)trhodes2004-03-1213-58/+161
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | to build the kernel. It doesn't affect the operation if gcc. Most of the changes are just adding __INTEL_COMPILER to #ifdef's, as icc v8 may define __GNUC__ some parts may look strange but are necessary. Additional changes: - in_cksum.[ch]: * use a generic C version instead of the assembly version in the !gcc case (ASM code breaks with the optimizations icc does) -> no bad checksums with an icc compiled kernel Help from: andre, grehan, das Stolen from: alpha version via ppc version The entire checksum code should IMHO be replaced with the DragonFly version (because it isn't guaranteed future revisions of gcc will include similar optimizations) as in: ---snip--- Revision Changes Path 1.12 +1 -0 src/sys/conf/files.i386 1.4 +142 -558 src/sys/i386/i386/in_cksum.c 1.5 +33 -69 src/sys/i386/include/in_cksum.h 1.5 +2 -0 src/sys/netinet/igmp.c 1.6 +0 -1 src/sys/netinet/in.h 1.6 +2 -0 src/sys/netinet/ip_icmp.c 1.4 +3 -4 src/contrib/ipfilter/ip_compat.h 1.3 +1 -2 src/sbin/natd/icmp.c 1.4 +0 -1 src/sbin/natd/natd.c 1.48 +1 -0 src/sys/conf/files 1.2 +0 -1 src/sys/conf/files.amd64 1.13 +0 -1 src/sys/conf/files.i386 1.5 +0 -1 src/sys/conf/files.pc98 1.7 +1 -1 src/sys/contrib/ipfilter/netinet/fil.c 1.10 +2 -3 src/sys/contrib/ipfilter/netinet/ip_compat.h 1.10 +1 -1 src/sys/contrib/ipfilter/netinet/ip_fil.c 1.7 +1 -1 src/sys/dev/netif/txp/if_txp.c 1.7 +1 -1 src/sys/net/ip_mroute/ip_mroute.c 1.7 +1 -2 src/sys/net/ipfw/ip_fw2.c 1.6 +1 -2 src/sys/netinet/igmp.c 1.4 +158 -116 src/sys/netinet/in_cksum.c 1.6 +1 -1 src/sys/netinet/ip_gre.c 1.7 +1 -2 src/sys/netinet/ip_icmp.c 1.10 +1 -1 src/sys/netinet/ip_input.c 1.10 +1 -2 src/sys/netinet/ip_output.c 1.13 +1 -2 src/sys/netinet/tcp_input.c 1.9 +1 -2 src/sys/netinet/tcp_output.c 1.10 +1 -1 src/sys/netinet/tcp_subr.c 1.10 +1 -1 src/sys/netinet/tcp_syncache.c 1.9 +1 -2 src/sys/netinet/udp_usrreq.c 1.5 +1 -2 src/sys/netinet6/ipsec.c 1.5 +1 -2 src/sys/netproto/ipsec/ipsec.c 1.5 +1 -1 src/sys/netproto/ipsec/ipsec_input.c 1.4 +1 -2 src/sys/netproto/ipsec/ipsec_output.c and finally remove sys/i386/i386 in_cksum.c sys/i386/include in_cksum.h ---snip--- - endian.h: * DTRT in C++ mode - quad.h: * we don't use gcc v1 anymore, remove support for it Suggested by: bde (long ago) - assym.h: * avoid zero-length arrays (remove dependency on a gcc specific feature) This change changes the contents of the object file, but as it's only used to generate some values for a header, and the generator knows how to handle this, there's no impact in the gcc case. Explained by: bde Submitted by: Marius Strobl <marius@alchemy.franken.de> - aicasm.c: * minor change to teach it about the way icc spells "-nostdinc" Not approved by: gibbs (no reply to my mail) - bump __FreeBSD_version (lang/icc needs to know about the changes) Incarnations of this patch survive gcc compiles since a loooong time, I use it on my desktop. An icc compiled kernel works since Nov. 2003 (exceptions: snd_* if used as modules), it survives a build of the entire ports collection with icc. Parts of this commit contains suggestions or submissions from Marius Strobl <marius@alchemy.franken.de>. Reviewed by: -arch Submitted by: netchild
* Don't implement anything in the ffs family in <machine/cpufunc.h>bde2004-03-111-0/+4
| | | | | | | | | | | | | | | in the non-_KERNEL case. This "fixes" applications that include this "kernel-only" header and also include <strings.h> (or get <strings.h> via the default _BSD_VISIBLE pollution in <string.h>. In C++ there was a fatal error: the declaration specifies C linkage but the implementation gives C++ linkage. In C there was only a static/extern mismatch if the headers were included in a certain order order, and a partially redundant declaration for all include orders; gcc emits incomplete or wrong diagnostics for these, but only for compiling with -Wsystem-headers and certain other warning options, so the problem was usually not seen for C. Ports breakage reported by: kris
* Remove unused declarations. (Some time ago, these variables became fieldsalc2004-03-071-2/+0
| | | | of vm/vm.h's struct kva_md_info.)
* Fixed insertion sort errors in prototype list.bde2004-03-051-20/+20
|
* Removed garbage:bde2004-03-051-14/+0
| | | | | | | | | - completely unused things - all of rev.1.102 (C++ support). <sys/cdefs.h> is included by the prerequisite <sys/types.h>. __BEGIN_DECLS/__END_DECLS has no effect (except possibly if undefined behaviour is invoked using a hack like defining away __inline) since this header doesn't really support any extern functions.
* Fix syntax errors and wrong function prototypes in several MD headerle2004-03-052-5/+5
| | | | | | | | files when using non-GNUC compilers. PR: kern/58515 Submitted by: Stefan Farfeleder <stefan@fafoe.narf.at> Approved by: grog (mentor), obrien
* Switch to using the new $PIR interrupt routing code and remove the oldjhb2004-02-181-2/+4
| | | | | code. The pci_cfgreg.c file now just controls reading/writing PCI config registers.
* 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
* Provide sysarch(2) prototypes in the MD sysarch.h headers. While I'mnectar2004-01-091-0/+1
| | | | | | | | | | at it, use the ANSI C generic pointer type for the second argument, thus matching the documentation. Remove the now extraneous (and now conflicting) function declarations in various libc sources. Remove now unnecessary casts. Reviewed by: bde
* Use ANSI C function definition for `_mcount' and remove `static'nectar2004-01-061-1/+0
| | | | | | prototype from header file. Discussed with: bde, maybe one year ago
* Add struct definition of the Elan MMCR registers (from jb@)phk2004-01-052-1/+280
| | | | | | | | Put a CTASSERT() on the size of the struct. Use the struct where it is easy to do so in elan_mmcr.c Add the Elan specific hardware reset code (also from jb@).
* GC the unused <machine/kse.h> file.peter2003-12-241-49/+0
|
* Hey, how about we NOT make modules crash 486s?green2003-12-171-1/+1
|
* - Add the mp_topology() function to mp_machdep.c. This function builds upjeff2003-12-111-0/+1
| | | | | the smp_topology structure to reflect the layout of HTT enabled machines. - Add a prototype for mp_topology() in smp.h
* Delete old and unused APIC_IRQ defines.jhb2003-12-101-32/+0
|
* Add just enough of i386/include/pcvt_ioctl.h to amd64/include/pcvt_ioctl.hobrien2003-12-101-4/+0
| | | | | | such that 'ispcvt' can build. Unforunately 'ispcvt' is needed in order for /etc/rc.d/syscons to run. This fixes the bug where I could not get my keymap effective at boot.
* Move the bktr(4) <arch>/include/ioctl_{bt848,meteor}.h files to dev/bktrobrien2003-12-082-445/+36
| | | | | | as these ioctl's aren't MD. This also means they are installed in /usr/include/dev/bktr now. Also provide compatability wrappers for where these headers lived in 4.x.
* Don't remove the virtual-to-physical mapping when an sf_buf is freed.alc2003-12-071-0/+1
| | | | | | | | | | | | | | | Instead, allow the mapping to persist, but add the sf_buf to a free list. If a later sendfile(2) or zero-copy send resends the same physical page, perhaps with the same or different contents, then the mapping overhead is avoided and the sf_buf is simply removed from the free list. In other words, the i386 sf_buf implementation now behaves as a cache of virtual-to-physical translations using an LRU replacement policy on inactive sf_bufs. This is similar in concept to a part of http://www.cs.princeton.edu/~yruan/debox/ patch, but much simpler in implementation. Note: none of this is required on alpha, amd64, or ia64. They now use their direct virtual-to-physical mapping to avoid any emphemeral mapping overheads in their sf_buf implementations.
* Ooops. These are still used by the bktr driver. David O'Brien hasimp2003-12-071-0/+187
| | | | | | plans for dealing, but I'll let him deal. Pointy hat to: imp@
* Remote meteor driver. It hasn't compiled in over 3 years. If someoneimp2003-12-071-187/+0
| | | | | makes it compile again, and can test it, we can restore the driver to the tree.
* File forgotten in the cx shuffle.imp2003-12-051-484/+0
| | | | | Pointed out by: Roman Kurakin Approved by: re@ <scottl> (under go ahead and commit new cx approval)
* Updated cx driver commit part 1: bring in the new kernel driver.imp2003-12-031-0/+449
| | | | | | | | | | | | | | | | | | | | | | | | This is the vastly updated cx drvier from Roman Kurakin <rik@cronyx.ru> who has been patiently waiting for this update for sometime. The driver is mostly a rewrite from the version we have in the tree. While some similarities remain, losing the little history that the old driver has is not a big loss, and the re@ felt it was easier this way (less error prone). The userland parts of this update will be committed shortly. The driver is not connected to the build yet. I want to make sure I don't break any platform at any time, so I want to test that with these files in the tree before I continue (on the off chance I'm forgetting a file). I changed the DEBUG macro to CX_DEBUG from the code that was submitted (to not break when we go to building with opt_global.h after the release), as well adding $FreeBSD$. Submitted by: Roman Kurakin Approved by: re@ <scottl>
* MFamd64: use a less compiler-intensive MD implementation of 'curthread'peter2003-11-201-0/+10
| | | | | | so that the compiler doesn't have to do so much work. Approved by: re (jhb)
* - Change the i386's sf_buf implementation so that it never allocatesalc2003-11-171-1/+2
| | | | | | | | | | | | | | | more than one sf_buf for one vm_page. To accomplish this, we add a global hash table mapping vm_pages to sf_bufs and a reference count to each sf_buf. (This is similar to the patches for RELENG_4 at http://www.cs.princeton.edu/~yruan/debox/.) For the uninitiated, an sf_buf is nothing more than a kernel virtual address that is used for temporary virtual-to-physical mappings by sendfile(2) and zero-copy sockets. As such, there is no reason for one vm_page to have several sf_bufs mapping it. In fact, using more than one sf_buf for a single vm_page increases the likelihood that sendfile(2) blocks, hurting throughput. (See http://www.cs.princeton.edu/~yruan/debox/.)
* Fixed pedantic warnings for statement-expressions using __extension__bde2003-11-171-4/+4
| | | | | and by not using a statement-expression for the non-expression __PCPU_SET().
* Fixed a pedantic syntax error (a stray semicolon at the end ofbde2003-11-171-1/+1
| | | | PCPU_MD_FIELDS).
* Fixed pedantic syntax errors. Many macros didn't permit a semicolon afterbde2003-11-171-3/+6
| | | | | their invocation in the !KLD_MODULE case, but a semicolon is provided after all invocations and is required in the KLD_MODULE case.
* Avoid a warning for compiling with `gcc -Wbad-function cast'. (Thisbde2003-11-171-1/+5
| | | | | | is the warning that points to the bug in `(char *)malloc(...)' where malloc() is implicitly declared as returning int. We do similar things here, but they work because u_int is the same as uintptr_t on i386's.)
OpenPOWER on IntegriCloud