• Ping-Ke Shih's avatar
    wifi: rtw89: fw: download firmware with key data for secure boot · 43f8a4dc
    Ping-Ke Shih authored
    Since firmware header contains multiple secure sections, we need to trim
    ignored sections, and then download firmware header with single one secure
    section.
    
    For secure boot, when downloading secure section, copy security key data
    from MSS poll by key_idx read from efuse. If non-secure boot, no need this
    extra copy.
    
               +---------------------------+ -\
               |      firmware header      |  |
               |                           |  |
               | +-----------------------+ |  | only preserve single one secure
               | | section type/size * N | |  | section
               | | ...                   | |  |
               | +-----------------------+ |  |
               +---------------------------+ -/
               :                           :
               +---------------------------+ -\
               | secure section type (ID:9)|  |
               |                           |  |
          +----|-> [ security key data ]   |  |
          |    +---------------------------+ -/
          |    |MSS Pool for above section |
          |    |  [ security key data 0 ]  |
          +----|- [ security key data 1 ]  |
    by key_idx |  [ security key data 2 ]  |
               |  ...                      |
               +---------------------------+
    Signed-off-by: default avatarPing-Ke Shih <pkshih@realtek.com>
    Signed-off-by: default avatarKalle Valo <kvalo@kernel.org>
    Link: https://msgid.link/20240204012627.9647-5-pkshih@realtek.com
    43f8a4dc
fw.c 198 KB