From mboxrd@z Thu Jan 1 00:00:00 1970 Subject: =?UTF-8?B?SG93IHRvIGhhbmRsZSDigJhSZWdpc3RlckZtcEluc3RhbGxlcuKAmSBpbiBGbXBEeGUgdG8gb3BlcmF0ZSBVU0JJTyB3aGVuIHVwZGF0aW5nIGNhcHN1bGU/?= To: devel@edk2.groups.io From: gordontcp@gmail.com X-Originating-Location: Hsinchu, TW (61.222.87.235) X-Originating-Platform: Windows Chrome 103 User-Agent: GROUPS.IO Web Poster MIME-Version: 1.0 Date: Thu, 21 Jul 2022 02:38:12 -0700 Message-ID: Content-Type: multipart/alternative; boundary="KZ2OotQtrUB181DPkL0r" --KZ2OotQtrUB181DPkL0r Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Hi all, In \FmpDevicePkg\Library\FmpDeviceLibNull\FmpDeviceLib.c There are comments for RegisterFmpInstaller : /** Used to pass the FMP install function to this lib. This allows the librar= y to have control of the handle that the FMP instance is installed on. This al= lows the library to use DriverBinding protocol model to locate its device(s) in= the system. @param[in] Func Function pointer to FMP install function. @retval EFI_SUCCESS Library has saved function pointer and will call function pointer on each DriverBinding Start. @retval EFI_UNSUPPORTED Library doesn't use driver binding and only supp= orts a single instance. @retval other error Error occurred. Don't install FMP **/ EFI_STATUS EFIAPI RegisterFmpInstaller ( IN FMP_DEVICE_LIB_REGISTER_FMP_INSTALLER Func ) { // // This is a system firmware update that does not use Driver Binding Proto= col // return EFI_UNSUPPORTED; } However, since the =E2=80=98RegisterFmpInstaller=E2=80=99 of the example di= rectly returns EFI_UNSUPPORTED , it does not demonstrate how to handle the = DriverBinding protocol. There are similar instructions in the edk2-platform= s example, but it also does not demonstrate how to locate the DriverBinding= protocol. The full path of edk2-platforms example is : edk2-platforms\Platform\Intel\Vlv2TbltDevicePkg\Feature\Capsule\Library\Fmp= DeviceLib\FmpDeviceLib.c I would like to operate USBIO in FmpDxe, how to do Binding protocol in FmpD= xe, is there any sample code? Any suggestion is greatly appreciated! Many thanks! --KZ2OotQtrUB181DPkL0r Content-Type: text/html; charset="utf-8" Content-Transfer-Encoding: quoted-printable

Hi all,
In \FmpDevicePkg\Library\FmpDeviceLibNull\FmpDeviceLib.c<= /code>
There are comments for R= egisterFmpInstaller:

<=
code style=3D"font-family: ui-monospace, SFMono-Regular, 'SF Mono', Menlo, =
Consolas, 'Liberation Mono', monospace; font-size: 12px; margin: 0px; backg=
round-image: initial; background-position: initial; background-size: initia=
l; background-repeat: initial; background-attachment: initial; background-o=
rigin: initial; background-clip: initial; border-radius: 6px; word-break: n=
ormal; white-space: pre; border: 0px; display: inline; overflow: visible; l=
ine-height: inherit; overflow-wrap: normal;">/**
  Used to pass the FMP install function to this lib.  This allows the libra=
ry to
  have control of the handle that the FMP instance is installed on.  This a=
llows
  the library to use DriverBinding protocol model to locate its device(s) i=
n the
  system.

  @param[in] Func  Function pointer to FMP install function.

  @retval EFI_SUCCESS       Library has saved function pointer and will cal=
l
                            function pointer on each DriverBinding Start.
  @retval EFI_UNSUPPORTED   Library doesn't use driver binding and only sup=
ports
                            a single instance.
  @retval other error       Error occurred.  Don't install FMP

**/
EFI_STATUS
EFIAPI
RegisterFmpInstaller (
  IN FMP_DEVICE_LIB_REGISTER_FMP_INSTALLER Func
  )
{
  //
  // This is a system firmware update that does not use Driver Binding Prot=
ocol
  //
  return EFI_UNSUPPORTED;
}

However, since the ‘Registe= rFmpInstaller’ of the example directly returns EFI_UNSUPPORTED, it does not demonstrate how to handl= e the DriverBinding protocol. There are similar instructions in the edk2-pl= atforms example, but it also does not demonstrate how to locate the DriverB= inding protocol. The full path of edk2-platforms example is :
edk2-platforms\Platform\Intel\Vlv2TbltDevicePkg\Fea= ture\Capsule\Library\FmpDeviceLib\FmpDeviceLib.c

I would like to operate= USBIO in FmpDxe, how to do Binding protocol in FmpDxe, is there any sample= code?
Any suggestion is greatly appreciated!
Many thanks!

--KZ2OotQtrUB181DPkL0r--