summaryrefslogtreecommitdiffstats
path: root/Documentation
diff options
context:
space:
mode:
authorJacob Keller <jacob.e.keller@intel.com>2021-10-27 16:22:54 -0700
committerTony Nguyen <anthony.l.nguyen@intel.com>2021-12-15 08:38:14 -0800
commitaf18d8866c8013fadca37a3db0162fbc5c4fc9c0 (patch)
treea46baa97ccadb43aaa70e20b111eba544007af50 /Documentation
parentc9f7a483e47004e94fcb9187dda10fb2406e983d (diff)
downloadlinux-stable-af18d8866c8013fadca37a3db0162fbc5c4fc9c0.tar.gz
linux-stable-af18d8866c8013fadca37a3db0162fbc5c4fc9c0.tar.bz2
linux-stable-af18d8866c8013fadca37a3db0162fbc5c4fc9c0.zip
ice: reduce time to read Option ROM CIVD data
During probe and device reset, the ice driver reads some data from the NVM image as part of ice_init_nvm. Part of this data includes a section of the Option ROM which contains version information. The function ice_get_orom_civd_data is used to locate the '$CIV' data section of the Option ROM. Timing of ice_probe and ice_rebuild indicate that the ice_get_orom_civd_data function takes about 10 seconds to finish executing. The function locates the section by scanning the Option ROM every 512 bytes. This requires a significant number of NVM read accesses, since the Option ROM bank is 500KB. In the worst case it would take about 1000 reads. Worse, all PFs serialize this operation during reload because of acquiring the NVM semaphore. The CIVD section is located at the end of the Option ROM image data. Unfortunately, the driver has no easy method to determine the offset manually. Practical experiments have shown that the data could be at a variety of locations, so simply reversing the scanning order is not sufficient to reduce the overall read time. Instead, copy the entire contents of the Option ROM into memory. This allows reading the data using 4Kb pages instead of 512 bytes at a time. This reduces the total number of firmware commands by a factor of 8. In addition, reading the whole section together at once allows better indication to firmware of when we're "done". Re-write ice_get_orom_civd_data to allocate virtual memory to store the Option ROM data. Copy the entire OptionROM contents at once using ice_read_flash_module. Finally, use this memory copy to scan for the '$CIV' section. This change significantly reduces the time to read the Option ROM CIVD section from ~10 seconds down to ~1 second. This has a significant impact on the total time to complete a driver rebuild or probe. Signed-off-by: Jacob Keller <jacob.e.keller@intel.com> Tested-by: Gurucharan G <gurucharanx.g@intel.com> Signed-off-by: Tony Nguyen <anthony.l.nguyen@intel.com>
Diffstat (limited to 'Documentation')
0 files changed, 0 insertions, 0 deletions