^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1) ============
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2) Introduction
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3) ============
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 4)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 5) The firmware API enables kernel code to request files required
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 6) for functionality from userspace, the uses vary:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 7)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 8) * Microcode for CPU errata
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 9) * Device driver firmware, required to be loaded onto device
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 10) microcontrollers
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 11) * Device driver information data (calibration data, EEPROM overrides),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 12) some of which can be completely optional.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 13)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 14) Types of firmware requests
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 15) ==========================
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 16)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 17) There are two types of calls:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 18)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 19) * Synchronous
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 20) * Asynchronous
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 21)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 22) Which one you use vary depending on your requirements, the rule of thumb
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 23) however is you should strive to use the asynchronous APIs unless you also
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 24) are already using asynchronous initialization mechanisms which will not
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 25) stall or delay boot. Even if loading firmware does not take a lot of time
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 26) processing firmware might, and this can still delay boot or initialization,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 27) as such mechanisms such as asynchronous probe can help supplement drivers.