david/ipxe
david
/
ipxe
Archived
1
0
Fork 0
Commit Graph

42 Commits

Author SHA1 Message Date
Jerone Young 1015a350f7 [intel] Add support for I219-V in 7th Gen Intel NUC
Signed-off-by: Michael Brown <mcb30@ipxe.org>
2017-07-05 10:57:59 +01:00
Mika Tiainen 62573b99cc [intel] Add INTEL_NO_PHY_RST for I219-V
Fix booting on HP EliteBook 820 G3.

Signed-off-by: Michael Brown <mcb30@ipxe.org>
2017-06-14 12:22:08 +01:00
Michael Brown 2d79b20f2a [intel] Do not enable ASDE on i350 backplane NIC
On most Intel NICs, Auto-Speed Detection Enable (ASDE) can be used to
automatically detect the correct link speed by sampling the link using
the internal PHY.  This feature is automatically inhibited when not
appropriate for the physical link (e.g. when using internal SerDes
mode on the 8254x).

On the i350 datasheet ASDE is a reserved bit, but the relevant
auto-speed detection hardware appears still to be present.  However,
enabling ASDE on the i350 1000BASE-KX backplane NIC seems to cause an
immediate link failure.  It is possible that the auto-speed detection
hardware is still present, is not connected to a physical link, and is
not inhibited from being applied in this mode.

Work around this problem by adding an INTEL_NO_ASDE flag bit
(analogous to INTEL_NO_PHY_RST), and applying this for the i350
backplane NIC.

Signed-off-by: Michael Brown <mcb30@ipxe.org>
2017-04-16 21:37:41 +01:00
Michael Brown e6616da8b8 [intel] Show original CTRL and STATUS values in debugging output
In situations where iPXE fails to reach link-up as expected, it is
useful to know the original values of the CTRL and STATUS registers
prior to our reset attempt.

Signed-off-by: Michael Brown <mcb30@ipxe.org>
2017-04-14 10:09:57 +01:00
Vishvananda Ishaya 1d04900262 [intel] Reset all virtual function settings
Some VF data is not cleared with reset, so make sure to return all the
settings to default before configuring the VF.

This fixes an issue where network packets would fail to be received if
the VF was previously used by the linux ixgbevf driver.

Modified-by: Michael Brown <mcb30@ipxe.org>
Signed-off-by: Michael Brown <mcb30@ipxe.org>
2017-03-09 13:56:22 +00:00
Christian Nilsson 0bfe9f5342 [intel] Add INTEL_NO_PHY_RST for I219-LM (2)
Originally-implemented-by: Malte zu Klampen <malte@pclab.ifg.uni-kiel.de>
Originally-implemented-by: Richard Moore <rich@richud.com>
Tested-by: Esben Storgaard Nielsen <esn@solar.dk>
Signed-off-by: Christian Nilsson <nikize@gmail.com>
Signed-off-by: Michael Brown <mcb30@ipxe.org>
2017-01-26 12:26:54 +00:00
Lukas Grossar 23c275bd1e [intel] Add PCI device ID for I219-V/LM
Signed-off-by: Lukas Grossar <lukas.grossar@adfinis-sygroup.ch>
Signed-off-by: Michael Brown <mcb30@ipxe.org>
2016-07-12 05:51:10 +01:00
Christian Nilsson ec992b97c2 [intel] Add PCI device ID for another I219-LM
Tested-by: Kuniyasu Suzaki <k.suzaki@aist.go.jp>
Signed-off-by: Michael Brown <mcb30@ipxe.org>
2016-06-16 11:42:24 +01:00
Christian Nilsson ef1c4b1c90 [intel] Add PCI device ID for another I219-V
Signed-off-by: Christian Nilsson <nikize@gmail.com>
Signed-off-by: Michael Brown <mcb30@ipxe.org>
2016-03-29 19:53:20 +01:00
Mika Tiainen 0588c03772 [intel] Add INTEL_NO_PHY_RST for another I218-LM variant
Fixed booting on HP EliteBook 820 G2 laptop.

Signed-off-by: Michael Brown <mcb30@ipxe.org>
2016-02-12 13:23:44 +00:00
Hummel Frank 6366fa7af6 [intel] Add INTEL_NO_PHY_RST for I218-LM
Signed-off-by: Michael Brown <mcb30@ipxe.org>
2016-01-27 13:07:42 +00:00
Torgeir Wulfsberg d6945925d8 [intel] Add INTEL_NO_PHY_RST for I217-LM
Signed-off-by: Michael Brown <mcb30@ipxe.org>
2015-12-07 19:52:16 +00:00
Michael Brown fff9281b84 [intel] Forcibly skip PHY reset on some models
On some models (notably ICH), the PHY reset mechanism appears to be
broken.  In particular, the PHY_CTRL register will be correctly loaded
from NVM but the values will not be propagated to the "OEM bits" PHY
register.  This typically has the effect of dropping the link speed to
10Mbps.

Since the original version of this driver in commit 945e428 ("[intel]
Replace driver for Intel Gigabit NICs"), we have always worked around
this problem by skipping the PHY reset if the link is already up.
Enhance this workaround by explicitly checking for known-broken PCI
IDs.

Reported-by: Robin Smidsrød <robin@smidsrod.no>
Tested-by: Robin Smidsrød <robin@smidsrod.no>
Signed-off-by: Michael Brown <mcb30@ipxe.org>
2015-11-22 19:08:09 +00:00
Kyösti Mälkki d5f7ee60e7 [intel] Add PCI IDs for i210/i211 flashless operation
Signed-off-by: Kyösti Mälkki <kyosti.malkki@gmail.com>
Signed-off-by: Michael Brown <mcb30@ipxe.org>
2015-11-04 20:47:39 +00:00
Michael Brown 9e2121be0d [intel] Allow for the use of advanced TX descriptors
Intel virtual function NICs almost work with the use of "legacy"
transmit and receive descriptors (which are backwards compatible right
back to the original Intel Gigabit NICs).

Unfortunately the "TX switching" feature (which allows for VM<->VM
traffic to be looped back within the NIC itself) does not work when a
legacy TX descriptor is used: the packet is instead sent onto the
wire.

Fix by allowing for the use of an "advanced" TX descriptor (containing
exactly the same information as is found in the "legacy" descriptor).

Signed-off-by: Michael Brown <mcb30@ipxe.org>
2015-05-16 14:54:31 +01:00
Michael Brown 28ce9b6cc0 [intel] Expose intel_diag() for use by other Intel NIC drivers
Signed-off-by: Michael Brown <mcb30@ipxe.org>
2015-05-15 15:19:10 +01:00
Christian Hesse 5744c3e8cd [intel] Add PCI device IDs for Intel I218-LM and I218-V
I218-LM (rev 3) is found in Lenovo Thinkpad X250.  The remaining
device IDs are from linux/drivers/net/ethernet/intel/e1000e/hw.h

Signed-off-by: Christian Hesse <mail@eworm.de>
Signed-off-by: Michael Brown <mcb30@ipxe.org>
2015-04-22 13:57:52 +01:00
Michael Brown 8958f62a1c [intel] Force RX polling on VMware emulated 82545em
The emulated Intel 82545em in some versions of VMware (observed with
ESXi v5.1) seems to sometimes fail to set the RXT0 bit in the
interrupt cause register (ICR), causing iPXE to stop receiving
packets.  Work around this problem (for the 82545em only) by always
polling the receive queue regardless of the state of the ICR.

Reported-by: Slava Bendersky <volga629@networklab.ca>
Tested-by: Slava Bendersky <volga629@networklab.ca>
Signed-off-by: Michael Brown <mcb30@ipxe.org>
2015-04-21 16:52:33 +01:00
Michael Brown 63dcab002e [intel] Report any unexpected interrupt causes
Signed-off-by: Michael Brown <mcb30@ipxe.org>
2015-04-21 15:47:16 +01:00
Thomas Miletich 02bf4f16f3 [intel] Add PCI ID for I218-LM
Signed-off-by: Thomas Miletich <thomas.miletich@gmail.com>
Signed-off-by: Michael Brown <mcb30@ipxe.org>
2015-03-09 14:20:41 +00:00
Michael Brown b6ee89ffb5 [legal] Relicense files under GPL2_OR_LATER_OR_UBDL
Relicense files for which I am the sole author (as identified by
util/relicense.pl).

Signed-off-by: Michael Brown <mcb30@ipxe.org>
2015-03-02 14:17:31 +00:00
Michael Brown a937615151 [intel] Use autoloaded MAC address instead of EEPROM MAC address
The i350 (and possibly other Intel NICs) have a non-trivial
correspondence between the PCI function number and the external
physical port number.  For example, the i350 has a "LAN Function Sel"
bit within the EEPROM which can invert the mapping so that function 0
becomes port 3, function 1 becomes port 2, etc.

Unfortunately the MAC addresses within the EEPROM are indexed by
physical port number rather than PCI function number.  The end result
is that when anything other than the default mapping is used, iPXE
will use the wrong address as the base MAC address.

Fix by using the autoloaded MAC address if it is valid, and falling
back to reading the MAC address directly from the EEPROM only if no
autoloaded address is available.

Signed-off-by: Michael Brown <mcb30@ipxe.org>
2014-10-31 15:24:40 +00:00
Jan Kiszka 0df7ce9641 [intel] Add I217-LM PCI ID
Add the ID for the LM variant and differentiate it from the I217-V.

Signed-off-by: Jan Kiszka <jan.kiszka@web.de>
Signed-off-by: Michael Brown <mcb30@ipxe.org>
2014-09-16 16:00:50 +01:00
Michael Brown ead70bf920 [intel] Apply PBS/PBA errata workaround only to ICH8 PCI device IDs
ICH8 devices have an errata which requires us to reconfigure the
packet buffer size (PBS) register, and correspondingly adjust the
packet buffer allocation (PBA) register.  The "Intel I/O Controller
Hub ICH8/9/10 and 82566/82567/82562V Software Developer's Manual"
notes for the PBS register that:

  10.4.20   Packet Buffer Size - PBS (01008h; R/W)

  Note: The default setting of this register is 20 KB and is
        incorrect. This register must be programmed to 16 KB.

  Initial value: 0014h
                 0018h (ICH9/ICH10)

It is unclear from this comment precisely which devices require the
workaround to be applied.  We currently attempt to err on the side of
caution: if we detect an initial value of either 0x14 or 0x18 then the
workaround will be applied.  If the workaround is applied
unnecessarily, then the effect should be just that we use less than
the full amount of the available packet buffer memory.

Unfortunately this approach does not play nicely with other device
drivers.  For example, the Linux e1000e driver will rewrite PBA while
assuming that PBS still contains the default value, which can result
in inconsistent values between the two registers, and a corresponding
inability to transmit or receive packets.  Even more unfortunately,
the contents of PBS and PBA are not reset by anything less than a
power cycle, meaning that this error condition will survive a hardware
reset.

The Linux driver (written and maintained by Intel) applies the PBS/PBA
errata workaround only for devices in the ICH8 family, identified via
the PCI device ID.  Adopt a similar approach, using the PCI_ROM()
driver data field to indicate when the workaround is required.

Reported-by: Donald Bindner <dbindner@truman.edu>
Debugged-by: Donald Bindner <dbindner@truman.edu>
Signed-off-by: Michael Brown <mcb30@ipxe.org>
2014-08-21 00:40:22 +01:00
Michael Brown d461b8ddf2 [intel] Display before and after values for both PBS and PBA
Signed-off-by: Michael Brown <mcb30@ipxe.org>
2014-08-20 23:16:01 +01:00
Michael Brown c845740b88 [intel] Display PBS value when applying ICH errata workaround
Signed-off-by: Michael Brown <mcb30@ipxe.org>
2014-08-20 22:59:54 +01:00
Michael Brown 9ce2b56af6 [intel] Check for ioremap() failures
Debugged-by: Anton D. Kachalov <mouse@yandex-team.ru>
Signed-off-by: Michael Brown <mcb30@ipxe.org>
2014-07-16 15:49:08 +01:00
Michael Brown abf875a2e5 [intel] Exclude time spent in hypervisor from profiling
When profiling, exclude any time spent inside the hypervisor
responding to our MMIO accesses.  This substantially reduces the
variance accumulated on many other profilers.

Signed-off-by: Michael Brown <mcb30@ipxe.org>
2014-05-06 22:53:33 +01:00
Michael Brown b2c7b6a85e [intel] Push new RX descriptors in batches
Inside a virtual machine, writing the RX ring tail pointer may incur a
substantial overhead of processing inside the hypervisor.  Minimise
this overhead by writing the tail pointer once per batch of
descriptors, rather than once per descriptor.

Profiling under qemu-kvm (version 1.6.2) shows that this reduces the
amount of time taken to refill the RX descriptor ring by around 90%.

Signed-off-by: Michael Brown <mcb30@ipxe.org>
2014-04-27 23:14:48 +01:00
Michael Brown 8a3dcefc0c [intel] Profile common virtual machine operations
Operations which are negligible on physical hardware (such as issuing
a posted write to the transmit ring tail register) may involve
substantial amounts of processing within the hypervisor if running in
a virtual machine.

Signed-off-by: Michael Brown <mcb30@ipxe.org>
2014-04-27 23:14:48 +01:00
Michael Brown 27884298a3 [intel] Avoid completely filling the TX descriptor ring
It is unclear from the datasheets whether or not the TX ring can be
completely filled (i.e. whether writing the tail value as equal to the
current head value will cause the ring to be treated as completely
full or completely empty).  It is very plausible that this edge case
could differ in behaviour between real hardware and the many
implementations of an emulated Intel NIC found in various virtual
machines.  Err on the side of caution and always leave at least one
ring entry empty.

Signed-off-by: Michael Brown <mcb30@ipxe.org>
2014-04-22 13:12:54 +01:00
lolipop 0780bccb68 [intel] Add Intel I217 Gigabit Ethernet PCI ID
Signed-off-by: Michael Brown <mcb30@ipxe.org>
2013-10-23 12:03:58 +01:00
Michael Brown 18521a170c [intel] Incorporate ring producer and consumer counters in diagnostics
Signed-off-by: Michael Brown <mcb30@ipxe.org>
2013-07-14 23:27:37 +02:00
Michael Brown 1dd4e51063 [intel] Expose functionality to be shared with intelx driver
The Intel 10 Gigabit NICs have a datapath that is almost
register-compatible with the Intel 1 Gigabit NICs.  Expose common
functionality to avoid duplication of code in the new "intelx" driver.

Signed-off-by: Michael Brown <mcb30@ipxe.org>
2013-04-18 23:56:05 +01:00
Michael Brown c2ba57e517 [intel] Remove hardcoded offsets for descriptor ring registers
The Intel 10 Gigabit NICs use the same simplified (aka "legacy")
descriptor format and the same layout for descriptor register blocks
as the Intel 1 Gigabit NICs.  The offsets of the descriptor register
blocks are not the same.

Simplify reuse of the existing code by removing all hardcoded offsets
for registers within descriptor register blocks, and ensuring that all
offsets are calculated using the descriptor register block base
address provided via intel_init_ring().

Signed-off-by: Michael Brown <mcb30@ipxe.org>
2013-04-18 23:56:05 +01:00
Jens Rottmann 3c29c8ecc1 [intel] Add Intel I210 Gigabit Ethernet PCI ID
Signed-off-by: Jens Rottmann <JRottmann@LiPPERTembedded.de>
Signed-off-by: Michael Brown <mcb30@ipxe.org>
2013-02-20 12:04:10 +00:00
Michael Brown 0c5e3df6d9 [intel] Poll RX queue if hardware reports RX overflow
The Intel NIC emulation in some versions of VMware seems to suffer
from a flaw whereby the Interrupt Cause Register (ICR) fails to assert
the usual "packet received" bit (ICR.RXT0) if a receive overflow
(ICR.RXO) has also occurred.

Work around this flaw by polling for completed descriptors whenever
either ICR.RXT0 or ICR.RXO is asserted.

Reported-by: Miroslav Halas <miroslav.halas@bankofamerica.com>
Debugged-by: Miroslav Halas <miroslav.halas@bankofamerica.com>
Tested-by: Miroslav Halas <miroslav.halas@bankofamerica.com>
Signed-off-by: Michael Brown <mcb30@ipxe.org>
2012-10-28 18:53:23 +00:00
Michael Brown dace457baf [intel] Report receive overruns via network device errors
Signed-off-by: Michael Brown <mcb30@ipxe.org>
2012-10-24 11:21:34 -07:00
Michael Brown ac8107854f [intel] Add missing iounmap()
Reported-by: Thomas Miletich <thomas.miletich@gmail.com>
Signed-off-by: Michael Brown <mcb30@ipxe.org>
2012-07-19 17:10:28 +01:00
Michael Brown 9f0b2d25a8 [intel] Explicitly enable descriptor queues
On i350 the datasheet contradicts itself in stating that the default
value of RXDCTL.ENABLE for queue zero is both set (according to the
"Receive Initialization" section) and unset (according to the "Receive
Descriptor Control - RXDCTL" section).  Empirical evidence suggests
that the default value is unset.

Explicitly enable both transmit and receive queues to avoid any
ambiguity.

Signed-off-by: Michael Brown <mcb30@ipxe.org>
2012-07-10 11:21:22 +01:00
Michael Brown 8391ff3ee0 [intel] Refill receive ring only after enabling receiver
On 82576 (and probably others), the datasheet states that "the tail
register of the queue (RDT[n]) should not be bumped until the queue is
enabled".  There is some confusion over exactly what constitutes
"enabled": the initialisation blurb says that we should "poll the
RXDCTL register until the ENABLE bit is set", while the description
for the RXDCTL register says that the ENABLE bit is set by default
(for queue zero).  Empirical evidence suggests that the ENABLE bit
reads as set immediately after writing to RCTL.EN, and so polling is
not necessary.

Signed-off-by: Michael Brown <mcb30@ipxe.org>
2012-07-10 09:32:58 +01:00
Michael Brown 945e428137 [intel] Replace driver for Intel Gigabit NICs
Tested-by: Robin Smidsrød <robin@smidsrod.no>
Tested-by: Thomas Miletich <thomas.miletich@gmail.com>
Signed-off-by: Michael Brown <mcb30@ipxe.org>
2012-04-23 23:29:18 +01:00