Skip to content
Snippets Groups Projects
  1. Jul 02, 2021
    • Masami Hiramatsu's avatar
      efi_loader: Improve the parameter check for QueryVariableInfo() · 417a3c24
      Masami Hiramatsu authored and Heinrich Schuchardt's avatar Heinrich Schuchardt committed
      
      Improve efi_query_variable_info() to check the parameter settings and
      return correct error code according to the UEFI Specification 2.9,
      and the Self Certification Test (SCT) II Case Specification, June
      2017, chapter 4.1.4 QueryVariableInfo().
      
      Reported-by: default avatarKazuhiko Sakamoto <sakamoto.kazuhiko@socionext.com>
      Signed-off-by: default avatarMasami Hiramatsu <masami.hiramatsu@linaro.org>
      Reviewed-by: Heinrich Schuchardt's avatarHeinrich Schuchardt <xypron.glpk@gmx.de>
      417a3c24
    • Heinrich Schuchardt's avatar
      efi_loader: missing parentheses in query_console_size · abd62e4d
      Heinrich Schuchardt authored
      
      After if we should use parentheses to keep the code readable.
      
      Fixes: a95f4c88 ("efi_loader: NULL dereference in EFI console")
      Signed-off-by: Heinrich Schuchardt's avatarHeinrich Schuchardt <xypron.glpk@gmx.de>
      abd62e4d
    • Ilias Apalodimas's avatar
      efi_loader: Always install FMPs · 6e0184b8
      Ilias Apalodimas authored and Heinrich Schuchardt's avatar Heinrich Schuchardt committed
      
      We only install FMPs if a CapsuleUpdate is requested.  Since we now have an
      ESRT table which relies on FMPs to build the required information, it
      makes more sense to unconditionally install them. This will allow userspace
      applications (e.g fwupd) to make use of the ERST and provide us with files
      we can use to run CapsuleUpdate on-disk
      
      Signed-off-by: default avatarIlias Apalodimas <ilias.apalodimas@linaro.org>
      Reviewed-by: Heinrich Schuchardt's avatarHeinrich Schuchardt <xypron.glpk@gmx.de>
      6e0184b8
    • Ilias Apalodimas's avatar
      efi_loader: Force a single FMP instance per hardware store · b891ff18
      Ilias Apalodimas authored and Heinrich Schuchardt's avatar Heinrich Schuchardt committed
      
      Chapter 23 of the EFI spec (rev 2.9) says:
      "A specific updatable hardware firmware store must be represented by
      exactly one FMP instance".
      This is not the case for us, since both of our FMP protocols can be
      installed at the same time because they are controlled by a single
      'dfu_alt_info' env variable.
      So make the config options depend on each other and allow the user to
      install one of them at any given time.  If we fix the meta-data provided
      by the 'dfu_alt_info' in the future,  to hint about the capsule type
      (fit or raw) we can revise this and enable both FMPs to be installed, as
      long as they target different firmware hardware stores
      
      Note that we are not using a Kconfig 'choice' on purpose, since we
      want to allow both of those to be installed and tested in sandbox
      
      Signed-off-by: default avatarIlias Apalodimas <ilias.apalodimas@linaro.org>
      Reviewed-by: Heinrich Schuchardt's avatarHeinrich Schuchardt <xypron.glpk@gmx.de>
      b891ff18
    • Masami Hiramatsu's avatar
      efi: Fix to use null handle to create new handle for efi_fmp_raw · 3ef77223
      Masami Hiramatsu authored and Heinrich Schuchardt's avatar Heinrich Schuchardt committed
      
      When running the efidebug capsule disk-update command, the efi_fmp_raw
      protocol installation fails with 2 (EFI_INVALID_PARAMETER) as below.
      This is because the code passes efi_root instead of the handle local var.
      
      => efidebug capsule disk-update
      EFI: Call: efi_install_multiple_protocol_interfaces( &handle, &efi_guid_firmware_management_protocol, &efi_fmp_fit, NULL)
        EFI: Entry efi_install_multiple_protocol_interfaces(00000000fbaf5988)
          EFI: Call: efi_install_protocol_interface( handle, protocol, EFI_NATIVE_INTERFACE, protocol_interface)
            EFI: Entry efi_install_protocol_interface(00000000fbaf5988, 86c77a67-0b97-4633-a187-49104d0685c7, 0, 00000000fbfa6ee8)
              EFI: new handle 00000000fbb37520
            EFI: Exit: efi_install_protocol_interface: 0
          EFI: 0 returned by efi_install_protocol_interface( handle, protocol, EFI_NATIVE_INTERFACE, protocol_interface)
        EFI: Exit: efi_install_multiple_protocol_interfaces: 0
      EFI: 0 returned by efi_install_multiple_protocol_interfaces( &handle, &efi_guid_firmware_management_protocol, &efi_fmp_fit, NULL)
      EFI: Call: efi_install_multiple_protocol_interfaces( &efi_root, &efi_guid_firmware_management_protocol, &efi_fmp_raw, NULL)
        EFI: Entry efi_install_multiple_protocol_interfaces(00000000fbfec648)
          EFI: Call: efi_install_protocol_interface( handle, protocol, EFI_NATIVE_INTERFACE, protocol_interface)
            EFI: Entry efi_install_protocol_interface(00000000fbfec648, 86c77a67-0b97-4633-a187-49104d0685c7, 0, 00000000fbfa6f18)
              EFI: handle 00000000fbaf8520
            EFI: Exit: efi_install_protocol_interface: 2
          EFI: 2 returned by efi_install_protocol_interface( handle, protocol, EFI_NATIVE_INTERFACE, protocol_interface)
        EFI: Exit: efi_install_multiple_protocol_interfaces: 2
      EFI: 2 returned by efi_install_multiple_protocol_interfaces( &efi_root, &efi_guid_firmware_management_protocol, &efi_fmp_raw, NULL)
      Command failed, result=1
      
      To fix this issue, pass the handle local var which is set NULL right
      before installing efi_fmp_raw as same as the installing efi_fmp_fit.
      (In both cases, the local reference to the handle will be just discarded)
      
      Signed-off-by: default avatarMasami Hiramatsu <masami.hiramatsu@linaro.org>
      Signed-off-by: default avatarIlias Apalodimas <ilias.apalodimas@linaro.org>
      Reviewed-by: Heinrich Schuchardt's avatarHeinrich Schuchardt <xypron.glpk@gmx.de>
      3ef77223
  2. Jun 30, 2021
    • Tom Rini's avatar
      Revert "TEST: USB_HOST not USB" · b7ad721c
      Tom Rini authored
      
      This reverts commit 4e1903a6.
      
      This local commit was not intended to be pushed out.
      
      Signed-off-by: default avatarTom Rini <trini@konsulko.com>
      b7ad721c
    • Tom Rini's avatar
      TEST: USB_HOST not USB · 4e1903a6
      Tom Rini authored
      
      Signed-off-by: default avatarTom Rini <trini@konsulko.com>
      4e1903a6
    • Marek Vasut's avatar
      spi: Update speed/mode on change · e2e95e5e
      Marek Vasut authored and Tom Rini's avatar Tom Rini committed
      
      The spi_get_bus_and_cs() may be called on the same bus and chipselect
      with different frequency or mode. This is valid usecase, but the code
      fails to notify the controller of such a configuration change. Call
      spi_set_speed_mode() in case bus frequency or bus mode changed to let
      the controller update the configuration.
      
      The problem can easily be triggered using the sspi command:
      => sspi 0:0@1000
      => sspi 0:0@2000
      Without this patch, both transfers happen at 1000 Hz. With this patch,
      the later transfer happens correctly at 2000 Hz.
      
      Signed-off-by: default avatarMarek Vasut <marex@denx.de>
      Cc: Jagan Teki <jagan@amarulasolutions.com>
      Cc: Patrick Delaunay <patrick.delaunay@foss.st.com>
      e2e95e5e
  3. Jun 29, 2021
  4. Jun 28, 2021
  5. Jun 25, 2021
  6. Jun 24, 2021
  7. Jun 23, 2021
Loading