#
37a107a4 |
| 28-Jun-2014 |
Glen Barber <gjb@FreeBSD.org> |
Revert r267961, r267973:
These changes prevent sysctl(8) from returning proper output, such as:
1) no output from sysctl(8) 2) erroneously returning ENOMEM with tools like truss(1) or uname(1
Revert r267961, r267973:
These changes prevent sysctl(8) from returning proper output, such as:
1) no output from sysctl(8) 2) erroneously returning ENOMEM with tools like truss(1) or uname(1) truss: can not get etype: Cannot allocate memory
show more ...
|
#
3da1cf1e |
| 27-Jun-2014 |
Hans Petter Selasky <hselasky@FreeBSD.org> |
Extend the meaning of the CTLFLAG_TUN flag to automatically check if there is an environment variable which shall initialize the SYSCTL during early boot. This works for all SYSCTL types both statica
Extend the meaning of the CTLFLAG_TUN flag to automatically check if there is an environment variable which shall initialize the SYSCTL during early boot. This works for all SYSCTL types both statically and dynamically created ones, except for the SYSCTL NODE type and SYSCTLs which belong to VNETs. A new flag, CTLFLAG_NOFETCH, has been added to be used in the case a tunable sysctl has a custom initialisation function allowing the sysctl to still be marked as a tunable. The kernel SYSCTL API is mostly the same, with a few exceptions for some special operations like iterating childrens of a static/extern SYSCTL node. This operation should probably be made into a factored out common macro, hence some device drivers use this. The reason for changing the SYSCTL API was the need for a SYSCTL parent OID pointer and not only the SYSCTL parent OID list pointer in order to quickly generate the sysctl path. The motivation behind this patch is to avoid parameter loading cludges inside the OFED driver subsystem. Instead of adding special code to the OFED driver subsystem to post-load tunables into dynamically created sysctls, we generalize this in the kernel.
Other changes: - Corrected a possibly incorrect sysctl name from "hw.cbb.intr_mask" to "hw.pcic.intr_mask". - Removed redundant TUNABLE statements throughout the kernel. - Some minor code rewrites in connection to removing not needed TUNABLE statements. - Added a missing SYSCTL_DECL(). - Wrapped two very long lines. - Avoid malloc()/free() inside sysctl string handling, in case it is called to initialize a sysctl from a tunable, hence malloc()/free() is not ready when sysctls from the sysctl dataset are registered. - Bumped FreeBSD version to indicate SYSCTL API change.
MFC after: 2 weeks Sponsored by: Mellanox Technologies
show more ...
|
Revision tags: release/10.0.0, release/9.2.0, release/8.4.0, release/9.1.0, release/8.3.0_cvs, release/8.3.0, release/9.0.0, release/7.4.0_cvs, release/8.2.0_cvs, release/7.4.0, release/8.2.0, release/8.1.0_cvs, release/8.1.0, release/7.3.0_cvs, release/7.3.0, release/8.0.0_cvs, release/8.0.0, release/7.2.0_cvs, release/7.2.0, release/7.1.0_cvs, release/7.1.0, release/6.4.0_cvs, release/6.4.0 |
|
#
93ee134a |
| 15-Aug-2008 |
Kip Macy <kmacy@FreeBSD.org> |
Integrate support for xen in to i386 common code.
MFC after: 1 month
|
Revision tags: release/7.0.0_cvs, release/7.0.0, release/6.3.0_cvs, release/6.3.0 |
|
#
69296991 |
| 21-Dec-2007 |
John Baldwin <jhb@FreeBSD.org> |
More properly handle links who only have 1 valid IRQ in their bitmask. The old code special cased them too early which caused a few differences for these sort of links relative to other PCI links:
More properly handle links who only have 1 valid IRQ in their bitmask. The old code special cased them too early which caused a few differences for these sort of links relative to other PCI links:
- They were always re-routed via the BIOS call instead of assuming that they were already routed if the BIOS had programmed the IRQ into a matching device during POST. - If the BIOS did route that link to a different IRQ that was marked as invalid, we trusted the $PIR table rather than the BIOS IRQ.
This change moves the special casing for "unique IRQ" links to only take that into account when picking an IRQ for an unrouted link so that these links will now not be routed if the BIOS appears to have routed it already (some BIOSen have problems with that) and so that if the BIOS uses a different IRQ than the $PIR, we trust the BIOS routing instead (this is what we do for all other links as well).
Reported by: Bruce Walter walter of fortean com MFC after: 1 week
show more ...
|
Revision tags: release/6.2.0_cvs, release/6.2.0 |
|
#
fdaac72f |
| 09-Nov-2006 |
John Baldwin <jhb@FreeBSD.org> |
Don't dump the $PIR table under bootverbose. The pirtool program in src/tools/tools works fine, and dumping this table can add a lot of noise.
MFC after: 1 week
|
Revision tags: release/5.5.0_cvs, release/5.5.0, release/6.1.0_cvs, release/6.1.0, release/6.0.0_cvs, release/6.0.0 |
|
#
b3ffa2ae |
| 08-Sep-2005 |
Warner Losh <imp@FreeBSD.org> |
Note that pc98 specific defines maybe would be better in a header file.
|
#
11f3a4f0 |
| 13-Jul-2005 |
John Baldwin <jhb@FreeBSD.org> |
- Ignore BIOS IRQs (that is, IRQ settings left by the BIOS or a previous OS in the PCI config registers) that are > 15 as $PIR can only route PCI interrupts to ISA IRQs which are limited to the 0
- Ignore BIOS IRQs (that is, IRQ settings left by the BIOS or a previous OS in the PCI config registers) that are > 15 as $PIR can only route PCI interrupts to ISA IRQs which are limited to the 0 to 15 range. - Remove an extra word from a printf.
Reported by: othermark atkin901 at yahoo dot com MFC after: 3 days
show more ...
|
Revision tags: release/5.4.0_cvs, release/5.4.0 |
|
#
84c7fde7 |
| 14-Apr-2005 |
John Baldwin <jhb@FreeBSD.org> |
Trust the settings programmed by the BIOS over what the $PIR says. Specifically, if the BIOS has programmed an IRQ for a device that doesn't match the list of valid IRQs for the link, use it anyway a
Trust the settings programmed by the BIOS over what the $PIR says. Specifically, if the BIOS has programmed an IRQ for a device that doesn't match the list of valid IRQs for the link, use it anyway as some BIOSes don't correctly list the valid IRQs in the $PIR. Also, allow the user to specify an IRQ that $PIR claims is invalid as an override, but emit a warning in that case.
show more ...
|
#
c711aea6 |
| 10-Feb-2005 |
Poul-Henning Kamp <phk@FreeBSD.org> |
Make a bunch of malloc types static.
Found by: src/tools/tools/kernxref
|
Revision tags: release/4.11.0_cvs, release/4.11.0 |
|
#
86cb007f |
| 06-Jan-2005 |
Warner Losh <imp@FreeBSD.org> |
/* -> /*- for copyright notices, minor format tweaks as necessary
|
Revision tags: release/5.3.0_cvs, release/5.3.0 |
|
#
39981fed |
| 01-Jul-2004 |
John Baldwin <jhb@FreeBSD.org> |
Trim a few things from the dmesg output and stick them under bootverbose to cut down on the clutter including PCI interrupt routing, MTRR, pcibios, etc.
Discussed with: USENIX Cabal
|
#
092a5c45 |
| 10-Jun-2004 |
John Baldwin <jhb@FreeBSD.org> |
Remove atdevbase and replace it's remaining uses with direct references to KERNBASE instead.
|
#
41ee9f1c |
| 30-May-2004 |
Poul-Henning Kamp <phk@FreeBSD.org> |
Add some missing <sys/module.h> includes which are masked by the one on death-row in <sys/kernel.h>
|
Revision tags: release/4.10.0_cvs, release/4.10.0 |
|
#
7a64d8d7 |
| 04-May-2004 |
John Baldwin <jhb@FreeBSD.org> |
- Create a pir0 psuedo device as a child of legacy0 if we attach a legacy host-PCI bridge device and find a valid $PIR. - Make pci_pir_parse() private to pci_pir.c and have pir0's attach routine
- Create a pir0 psuedo device as a child of legacy0 if we attach a legacy 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.
show more ...
|
#
86f4fd6f |
| 16-Apr-2004 |
John Baldwin <jhb@FreeBSD.org> |
Don't call the BIOS to route a link that has already been routed by the BIOS during POST as it apparently makes some machines unhappy.
Tested by: mux
|
Revision tags: release/5.2.1_cvs, release/5.2.1 |
|
#
2e41ba54 |
| 18-Feb-2004 |
John Baldwin <jhb@FreeBSD.org> |
Rework the $PIR (aka PCIBIOS) PCI interrupt routing code and split it off into its own file: - All of the $PIR interrupt routing is now done in a link-centric fashion. When a host-PCI bridge that u
Rework the $PIR (aka PCIBIOS) PCI interrupt routing code and split it off 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@
show more ...
|
Revision tags: release/5.2.0_cvs, release/5.2.0 |
|
#
21e25fa6 |
| 31-Dec-2003 |
John Baldwin <jhb@FreeBSD.org> |
Replace an outb() during the test for configuration mechanism #1 with a DELAY(1) instead. After wading through old commit logs, I found that the outb() was added not as part of the test but as an in
Replace an outb() during the test for configuration mechanism #1 with a DELAY(1) instead. After wading through old commit logs, I found that the outb() was added not as part of the test but as an intentional delay. In fact, according to Shanley's PCI book, the configuration 1 data and address ports should only be accessed using aligned 32-bit accesses (i.e. inl() and outl()). Thus, using outb() to just the last byte of the port violates the PCI spec it would seem. On at least one box doing so broke the probe for PCI, whereas changing it to a DELAY(1) fixed the probe.
Reported by: Sean Welch <welchsm@earthlink.net> MFC after: 1 week
show more ...
|
#
6f92bdd0 |
| 03-Nov-2003 |
John Baldwin <jhb@FreeBSD.org> |
New APIC support code:
- The apic interrupt entry points have been rewritten so that each entry point can serve 32 different vectors. When the entry is executed, it uses one of the 32-bit ISR r
New APIC support code:
- The apic interrupt entry points have been rewritten so that each entry point can serve 32 different vectors. When the entry is executed, it uses one of the 32-bit ISR registers to determine which vector in its assigned range was triggered. Thus, the apic code can support 159 different interrupt vectors with only 5 entry points. - We now always to disable the local APIC to work around an errata in certain PPros and then re-enable it again if we decide to use the APICs to route interrupts. - We no longer map IO APICs or local APICs using special page table entries. Instead, we just use pmap_mapdev(). We also no longer export the virtual address of the local APIC as a global symbol to the rest of the system, but only in local_apic.c. To aid this, the APIC ID of each CPU is exported as a per-CPU variable. - Interrupt sources are provided for each intpin on each IO APIC. Currently, each source is given a unique interrupt vector meaning that PCI interrupts are not shared on most machines with an I/O APIC. That mapping for interrupt sources to interrupt vectors is up to the APIC enumerator driver however. - We no longer probe to see if we need to use mixed mode to route IRQ 0, instead we always use mixed mode to route IRQ 0 for now. This can be disabled via the 'NO_MIXED_MODE' kernel option. - The npx(4) driver now always probes to see if a built-in FPU is present since this test can now be performed with the new APIC code. However, an SMP kernel will panic if there is more than one CPU and a built-in FPU is not found. - PCI interrupts are now properly routed when using APICs to route interrupts, so remove the hack to psuedo-route interrupts when the intpin register was read. - The apic.h header was moved to apicreg.h and a new apicvar.h header that declares the APIs used by the new APIC code was added.
show more ...
|
Revision tags: release/4.9.0_cvs, release/4.9.0 |
|
#
184dcdc7 |
| 21-Oct-2003 |
Mike Silbersack <silby@FreeBSD.org> |
Change all SYSCTLS which are readonly and have a related TUNABLE from CTLFLAG_RD to CTLFLAG_RDTUN so that sysctl(8) can provide more useful error messages.
|
#
810cb9ef |
| 10-Sep-2003 |
John Baldwin <jhb@FreeBSD.org> |
We represent PCI intpin's two different ways. One is the way that the intpin register is expressed in hardware where 0 means none, 1 means INTA, 2 INTB, etc. The other way is commonly used in loops
We represent PCI intpin's two different ways. One is the way that the intpin register is expressed in hardware where 0 means none, 1 means INTA, 2 INTB, etc. The other way is commonly used in loops where 0 means INTA, 1 means INTB, etc. The matchpin argument to pci_cfgintr_search() is supposed to be the first form, but we passsed in a loop index of the second. This fix adds one to the loop index to convert to the first form.
Reported by: Pavlin Radoslavov <pavlin@icir.org>
show more ...
|
#
126ef7fc |
| 02-Aug-2003 |
Yoshihiro Takahashi <nyan@FreeBSD.org> |
PC98 uses different mask of IRQ.
|
#
e86bd39a |
| 01-Aug-2003 |
Warner Losh <imp@FreeBSD.org> |
Add hw.pci.irq_override_mask, which is a mask of interrupts that are considered to be good to try when it otherwise has no clue about which interrupts to try. This is a band-aide and we really shoul
Add hw.pci.irq_override_mask, which is a mask of interrupts that are considered to be good to try when it otherwise has no clue about which interrupts to try. This is a band-aide and we really should try to balance the IRQs that we arbitrarily pick, but it should help some people that would otherwise get bad IRQs.
show more ...
|
Revision tags: release/5.1.0_cvs, release/5.1.0 |
|
#
71c5a901 |
| 02-Jun-2003 |
David E. O'Brien <obrien@FreeBSD.org> |
Use __FBSDID().
|
Revision tags: release/4.8.0_cvs, release/4.8.0 |
|
#
af3d516f |
| 18-Feb-2003 |
Peter Wemm <peter@FreeBSD.org> |
Initiate de-orbit burn for USE_PCI_BIOS_FOR_READ_WRITE. This has been #if'ed out for a while. Complete the deed and tidy up some other bits.
We need to be able to call this stuff from outer edges
Initiate de-orbit burn for USE_PCI_BIOS_FOR_READ_WRITE. This has been #if'ed out for a while. Complete the deed and tidy up some other bits.
We need to be able to call this stuff from outer edges of interrupt handlers for devices that have the ISR bits in pci config space. Making the bios code mpsafe was just too hairy. We had also stubbed it out some time ago due to there simply being too much brokenness in too many systems. This adds a leaf lock so that it is safe to use pci_read_config() and pci_write_config() from interrupt handlers. We still will use pcibios to do interrupt routing if there is no acpi.. [yes, I tested this]
Briefly glanced at by: imp
show more ...
|
Revision tags: release/5.0.0_cvs, release/5.0.0 |
|
#
a4bbd12f |
| 14-Nov-2002 |
Warner Losh <imp@FreeBSD.org> |
MFp4: o Fix small style nit. This was supposed to be part of the last batch of style fixes, but somehow didn't get merged.
|