numam-dpdk/drivers
Qi Zhang b1d08cb258 net/ice/base: read option ROM combo version from CIVD
The driver currently reads the combo image version data from within the
Boot Configuration TLV block of the PFA area of the NVM. This allows
access to the active Option ROM version data, assuming that it has been
properly copied into this section.

There is no equivalent method for reading the Option ROM version data
from a pending Option ROM update, as it will not yet have been copied
into the PFA boot configuration block. Instead, replace this
implementation with one which scans for the CIVD data section of the
Option ROM image data.

This CIVD data is stored in a packed structured format within the Option
ROM. It is always aligned to a 512 byte boundary, and starts with
a special '$CIV' 4-byte signature. Data integrity is checked using
a simple modulo 256 sum of the structure bytes.

Implement a new ice_get_orom_civd_data function which allows reading
from the selected flash bank (active or inactive), and scans for valid
CIVD data. Use this instead of the boot configuration TLV in order to
report the combo version data of precisely what is in the Option ROM
data.

To allow access to reading the inactive Option ROM bank, introduce a new
ice_get_inactive_orom_ver function. Use of a new function is done in
order to avoid leaking the bank selection abstraction outside of
ice_nvm.c

With this new function, the driver can now read and display the version
of the to-be-activated Option ROM when an update has been initiated but
not yet finalized.

Signed-off-by: Jacob Keller <jacob.e.keller@intel.com>
Signed-off-by: Qi Zhang <qi.z.zhang@intel.com>
Acked-by: Qiming Yang <qiming.yang@intel.com>
2021-01-08 16:03:06 +01:00
..
baseband baseband/acc100: remove useless checks 2020-11-02 09:24:40 +01:00
bus bus/pci: ignore missing NUMA node on Windows 2021-01-05 23:01:36 +01:00
common common/iavf: support eCPRI protocol header fields 2021-01-08 16:03:06 +01:00
compress compress/isal: check allocation in queue setup 2020-11-22 13:17:10 +01:00
crypto build: update meson for Marvell Armada drivers 2021-01-08 16:03:05 +01:00
event event/octeontx2: unlink queues during port release 2020-11-20 18:53:47 +01:00
mempool build: align wording of non-support reasons 2020-11-20 16:05:35 +01:00
net net/ice/base: read option ROM combo version from CIVD 2021-01-08 16:03:06 +01:00
raw raw/ifpga/base: check adapter pointer before dereference 2020-11-13 16:26:54 +01:00
regex regex/octeontx2: fix PCI table overflow 2021-01-07 21:25:21 +01:00
vdpa common/mlx5: fix name for ConnectX VF device ID 2020-11-20 21:10:05 +01:00
meson.build build: align wording of non-support reasons 2020-11-20 16:05:35 +01:00