UPSTREAM: ich_descriptors: Refactor read_ich_descriptors_from_dump()

Process the "upper map" early as it doesn't depend on the descriptor
generation. This way, we can use it to guess the generation.

BUG=none
BRANCH=none
TEST=none

Original-Change-Id: Ia2786b762ccefdce31b63397119bd89879e887ff
Original-Signed-off-by: Nico Huber <nico.h@gmx.de>
Original-Reviewed-on: https://review.coreboot.org/c/flashrom/+/55646
Original-Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Original-Reviewed-by: Angel Pons <th3fanbus@gmail.com>
(cherry picked from commit 763784000e0620b35184a65aaf552f327244db22)

Change-Id: I7c34e0410ad9c62d193cb42b760e7aeffe2f5b84
Signed-off-by: Edward O'Callaghan <quasisec@google.com>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/third_party/flashrom/+/2977535
Reviewed-by: Sean Paul <seanpaul@chromium.org>
Reviewed-by: Sam McNally <sammc@chromium.org>
Tested-by: Edward O'Callaghan <quasisec@chromium.org>
Commit-Queue: Edward O'Callaghan <quasisec@chromium.org>
1 file changed
tree: 1bad1dbbd7962b2b0dceaa513f45bc00530a85d6
  1. Documentation/
  2. subprojects/
  3. tests/
  4. util/
  5. .gitattributes
  6. .gitignore
  7. 82802ab.c
  8. action_descriptor.c
  9. action_descriptor.h
  10. amd_imc.c
  11. archtest.c
  12. at45db.c
  13. atahpt.c
  14. atapromise.c
  15. atavia.c
  16. big_lock.c
  17. big_lock.h
  18. bitbang_spi.c
  19. board_enable.c
  20. buspirate_spi.c
  21. cbtable.c
  22. ch341a_spi.c
  23. chipdrivers.h
  24. chipset_enable.c
  25. cli_classic.c
  26. cli_common.c
  27. cli_output.c
  28. COPYING
  29. coreboot_tables.h
  30. cros_alias.c
  31. cros_ec.c
  32. cros_ec.h
  33. cros_ec_commands.h
  34. cros_ec_dev.c
  35. custom_baud.c
  36. custom_baud.h
  37. dediprog.c
  38. developerbox_spi.c
  39. digilent_spi.c
  40. dmi.c
  41. drkaiser.c
  42. dummyflasher.c
  43. edi.c
  44. edi.h
  45. en29lv640b.c
  46. endiantest.c
  47. ene.h
  48. ene_lpc.c
  49. file.c
  50. file.h
  51. file_lock.c
  52. flash.h
  53. flashchips.c
  54. flashchips.h
  55. flashrom.8.tmpl
  56. flashrom.c
  57. fmap.c
  58. fmap.h
  59. ft2232_spi.c
  60. gfxnvidia.c
  61. helpers.c
  62. hwaccess.c
  63. hwaccess.h
  64. hwaccess_x86_io.h
  65. hwaccess_x86_io_unittest.h
  66. i2c_helper.h
  67. i2c_helper_linux.c
  68. ich_descriptors.c
  69. ich_descriptors.h
  70. ichspi.c
  71. internal.c
  72. ipc_lock.h
  73. it8212.c
  74. it85spi.c
  75. it87spi.c
  76. jedec.c
  77. jlink_spi.c
  78. layout.c
  79. layout.h
  80. libflashrom.c
  81. libflashrom.h
  82. libflashrom.map
  83. linux_mtd.c
  84. linux_spi.c
  85. lspcon_i2c_spi.c
  86. Makefile
  87. mcp6x_spi.c
  88. mec1308.c
  89. meson.build
  90. meson_options.txt
  91. mstarddc_spi.c
  92. ni845x_spi.c
  93. nic3com.c
  94. nicintel.c
  95. nicintel_eeprom.c
  96. nicintel_spi.c
  97. nicnatsemi.c
  98. nicrealtek.c
  99. ogp_spi.c
  100. opaque.c
  101. os.h
  102. OWNERS
  103. pcidev.c
  104. physmap.c
  105. pickit2_spi.c
  106. platform.h
  107. pony_spi.c
  108. power.c
  109. power.h
  110. PRESUBMIT.cfg
  111. print.c
  112. print_wiki.c
  113. processor_enable.c
  114. programmer.c
  115. programmer.h
  116. programmer_table.c
  117. raiden_debug_spi.c
  118. rayer_spi.c
  119. README
  120. README.chromiumos
  121. realtek_mst_i2c_spi.c
  122. s25f.c
  123. satamv.c
  124. satasii.c
  125. sb600spi.c
  126. serial.c
  127. serprog.c
  128. serprog.h
  129. sfdp.c
  130. spi.c
  131. spi.h
  132. spi25.c
  133. spi25_statusreg.c
  134. spi95.c
  135. sst28sf040.c
  136. sst49lfxxxc.c
  137. sst_fwhub.c
  138. stlinkv3_spi.c
  139. stm50.c
  140. udelay.c
  141. unittest_env.h
  142. usb_device.c
  143. usb_device.h
  144. usbblaster_spi.c
  145. usbdev.c
  146. w29ee011.c
  147. w39.c
  148. wbsio_spi.c
  149. wp_statusreg.c
  150. writeprotect.c
  151. writeprotect.h