• Zhang Lixu's avatar
    HID: intel-ish-hid: Implement loading firmware from host feature · 579a267e
    Zhang Lixu authored
    Starting from the Lunar Lake generation, the ISH firmware has been
    divided into two components for better space optimization and increased
    flexibility. These components include a bootloader that is integrated
    into the BIOS, and a main firmware that is stored within the operating
    system's file system.
    
    Introduce support for loading ISH main firmware from host. This feature is
    applicable for Lunar Lake and later generation.
    
    Current intel-ishtp-loader, is designed for Chrome OS based systems which
    uses core boot and has different firmware loading method. For non chrome
    systems the ISH firmware loading uses different method.
    
    Key differences include:
    1. The new method utilizes ISHTP capability/fixed client to enumerate the
    firmware loader function. It does not require a connection or flow control,
    unlike the method used in Chrome OS, which is enumerated as an ISHTP
    dynamic client driver, necessitating connect/disconnect operations and flow
    control.
    
    2. The new method employs a table to describe firmware fragments, which are
    sent to ISH in a single operation. Conversely, the Chrome OS method sends
    firmware fragments in multiple operations within a loop, sending only one
    fragment at a time.
    
    Additionally, address potential error scenarios to ensure graceful failure
    handling.
    - Firmware Not Found: Triggers if request_firmware() fails, leaving ISH in
      a waiting state.
      Recovery: Re-insmod the ISH drivers to retry.
    
    - DMA Buffer Allocation Failure: Occurs during prepare_dma_bufs(), leading
      to ISH waiting state. Allocated resources are released.
      Recovery: Re-insmod the ISH drivers to retry.
    
    - Incorrect Firmware Image: Causes ISH to refuse loading after three failed
      attempts.
      Recovery: A platform reset is required.
    
    Please refer to the [Documentation](Documentation/hid/intel-ish-hid.rst)
    for the details on flows.
    Signed-off-by: default avatarZhang Lixu <lixu.zhang@intel.com>
    Acked-by: default avatarSrinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
    Signed-off-by: default avatarJiri Kosina <jkosina@suse.com>
    579a267e
Makefile 812 Bytes