1. 16 Apr, 2024 6 commits
  2. 15 Apr, 2024 32 commits
  3. 12 Apr, 2024 2 commits
    • Arnd Bergmann's avatar
      accel/qaic: mark debugfs stub functions as static inline · 42d34193
      Arnd Bergmann authored
      The alternative stub functions are listed as global, which produces
      a build failure in some configs:
      
      In file included from drivers/accel/qaic/qaic_drv.c:31:
      drivers/accel/qaic/qaic_debugfs.h:16:5: error: no previous prototype for 'qaic_bootlog_register' [-Werror=missing-prototypes]
         16 | int qaic_bootlog_register(void) { return 0; }
            |     ^~~~~~~~~~~~~~~~~~~~~
      drivers/accel/qaic/qaic_debugfs.h:17:6: error: no previous prototype for 'qaic_bootlog_unregister' [-Werror=missing-prototypes]
         17 | void qaic_bootlog_unregister(void) {}
            |      ^~~~~~~~~~~~~~~~~~~~~~~
      drivers/accel/qaic/qaic_debugfs.h:18:6: error: no previous prototype for 'qaic_debugfs_init' [-Werror=missing-prototypes]
         18 | void qaic_debugfs_init(struct qaic_drm_device *qddev) {}
            |      ^~~~~~~~~~~~~~~~~
      
      Make them static inline as intended.
      
      Fixes: 5f8df5c6 ("accel/qaic: Add bootlog debugfs")
      Signed-off-by: default avatarArnd Bergmann <arnd@arndb.de>
      Reviewed-by: default avatarJeffrey Hugo <quic_jhugo@quicinc.com>
      Signed-off-by: default avatarJeffrey Hugo <quic_jhugo@quicinc.com>
      Link: https://patchwork.freedesktop.org/patch/msgid/20240409133945.2976190-1-arnd@kernel.org
      42d34193
    • Jeffrey Hugo's avatar
      accel/qaic: Add Sahara implementation for firmware loading · 76b801aa
      Jeffrey Hugo authored
      The AIC100 secondary bootloader uses the Sahara protocol for two
      purposes - loading the runtime firmware images from the host, and
      offloading crashdumps to the host. The crashdump functionality is only
      invoked when the AIC100 device encounters a crash and dumps are enabled.
      Also the collection of the dump is optional - the host can reject
      collecting the dump.
      
      The Sahara protocol contains many features and modes including firmware
      upload, crashdump download, and client commands. For simplicity,
      implement the parts of the protocol needed for loading firmware to the
      device.
      
      Fundamentally, the Sahara protocol is an embedded file transfer
      protocol. Both sides negotiate a connection through a simple exchange of
      hello messages. After handshaking through a hello message, the device
      either sends a message requesting images, or a message advertising the
      memory dump available for the host. For image transfer, the remote device
      issues a read data request that provides an image (by ID), an offset, and
      a length. The host has an internal mapping of image IDs to filenames. The
      host is expected to access the image and transfer the requested chunk to
      the device. The device can issue additional read requests, or signal that
      it has consumed enough data from this image with an end of image message.
      The host confirms the end of image, and the device can proceed with
      another image by starting over with the hello exchange again.
      
      Some images may be optional, and only provided as part of a provisioning
      flow. The host is not aware of this information, and thus should report
      an error to the device when an image is not available. The device will
      evaluate if the image is required or not, and take the appropriate
      action.
      Signed-off-by: default avatarJeffrey Hugo <quic_jhugo@quicinc.com>
      Reviewed-by: default avatarCarl Vanderlip <quic_carlv@quicinc.com>
      Reviewed-by: default avatarPranjal Ramajor Asha Kanojiya <quic_pkanojiy@quicinc.com>
      Reviewed-by: default avatarBjorn Andersson <andersson@kernel.org>
      Reviewed-by: default avatarJacek Lawrynowicz <jacek.lawrynowicz@linux.intel.com>
      Link: https://patchwork.freedesktop.org/patch/msgid/20240322034917.3522388-1-quic_jhugo@quicinc.com
      76b801aa