1. 03 6月, 2018 2 次提交
  2. 29 5月, 2018 2 次提交
    • R
      efi_loader: Enable RISC-V support · 6836adbe
      Rick Chen 提交于
      We have almost all pieces needed to support RISC-V UEFI binaries in place already.
      The only missing piece are ELF relocations for runtime code and
      data.
      
      This patch adds respective support in the linker script and the runtime
      relocation code. It also allows users to enable the EFI_LOADER configuration
      switch on RISC-V platforms.
      Signed-off-by: NAlexander Graf <agraf@suse.de>
      6836adbe
    • A
      efi_loader: Use EFI_CACHELINE_SIZE in the image loader too · 89aea436
      Alexander Graf 提交于
      We were using our EFI_CACHELINE_SIZE define only in the runtime service
      code, but left the image loader to use plain CONFIG_SYS_CACHELINE_SIZE.
      
      This patch moves EFI_CACHELINE_SIZE into efi_loader.h and converts
      the image loader to use it.
      Signed-off-by: NAlexander Graf <agraf@suse.de>
      89aea436
  3. 11 5月, 2018 1 次提交
  4. 04 4月, 2018 5 次提交
  5. 10 2月, 2018 1 次提交
  6. 20 9月, 2017 1 次提交
    • R
      efi_loader: efi variable support · ad644e7c
      Rob Clark 提交于
      Add EFI variable support, mapping to u-boot environment variables.
      Variables are pretty important for setting up boot order, among other
      things.  If the board supports saveenv, then it will be called in
      ExitBootServices() to persist variables set by the efi payload.  (For
      example, fallback.efi configuring BootOrder and BootXXXX load-option
      variables.)
      
      Variables are *not* currently exposed at runtime, post ExitBootServices.
      On boards without a dedicated device for storage, which the loaded OS
      is not trying to also use, this is rather tricky.  One idea, at least
      for boards that can persist RAM across reboot, is to keep a "journal"
      of modified variables in RAM, and then turn halt into a reboot into
      u-boot, plus store variables, plus halt.  Whatever the solution, it
      likely involves some per-board support.
      
      Mapping between EFI variables and u-boot variables:
      
        efi_$guid_$varname = {attributes}(type)value
      
      For example:
      
        efi_8be4df61-93ca-11d2-aa0d-00e098032b8c_OsIndicationsSupported=
           "{ro,boot,run}(blob)0000000000000000"
        efi_8be4df61-93ca-11d2-aa0d-00e098032b8c_BootOrder=
           "(blob)00010000"
      
      The attributes are a comma separated list of these possible
      attributes:
      
        + ro   - read-only
        + boot - boot-services access
        + run  - runtime access
      
      NOTE: with current implementation, no variables are available after
      ExitBootServices, and all are persisted (if possible).
      
      If not specified, the attributes default to "{boot}".
      
      The required type is one of:
      
        + utf8 - raw utf8 string
        + blob - arbitrary length hex string
      Signed-off-by: NRob Clark <robdclark@gmail.com>
      Signed-off-by: NAlexander Graf <agraf@suse.de>
      ad644e7c
  7. 19 9月, 2017 1 次提交
  8. 12 8月, 2017 1 次提交
  9. 19 10月, 2016 2 次提交
  10. 18 10月, 2016 1 次提交
    • A
      efi_loader: Allow boards to implement get_time and reset_system · 80a4800e
      Alexander Graf 提交于
      EFI allows an OS to leverage firmware drivers while the OS is running. In the
      generic code we so far had to stub those implementations out, because we would
      need board specific knowledge about MMIO setups for it.
      
      However, boards can easily implement those themselves. This patch provides the
      framework so that a board can implement its own versions of get_time and
      reset_system which would actually do something useful.
      
      While at it we also introduce a simple way for code to reserve MMIO pointers
      as runtime available.
      Signed-off-by: NAlexander Graf <agraf@suse.de>
      80a4800e
  11. 07 6月, 2016 1 次提交
    • A
      efi_loader: Move to normal debug infrastructure · edcef3ba
      Alexander Graf 提交于
      We introduced special "DEBUG_EFI" defines when the efi loader
      support was new. After giving it a bit of thought, turns out
      we really didn't have to - the normal #define DEBUG infrastructure
      works well enough for efi loader as well.
      
      So this patch switches to the common debug() and #define DEBUG
      way of printing debug information.
      Signed-off-by: NAlexander Graf <agraf@suse.de>
      edcef3ba
  12. 28 5月, 2016 1 次提交
    • A
      efi_loader: Clean up system table on exit · ae874405
      Alexander Graf 提交于
      We put the system table into our runtime services data section so that
      payloads may still access it after exit_boot_services. However, most fields
      in it are quite useless once we're in that state, so let's just patch them
      out.
      
      With this patch we don't get spurious warnings when running EFI binaries
      anymore.
      Signed-off-by: NAlexander Graf <agraf@suse.de>
      ae874405
  13. 19 4月, 2016 1 次提交
  14. 16 3月, 2016 1 次提交
    • A
      efi_loader: Add runtime services · 50149ea3
      Alexander Graf 提交于
      After booting has finished, EFI allows firmware to still interact with the OS
      using the "runtime services". These callbacks live in a separate address space,
      since they are available long after U-Boot has been overwritten by the OS.
      
      This patch adds enough framework for arbitrary code inside of U-Boot to become
      a runtime service with the right section attributes set. For now, we don't make
      use of it yet though.
      
      We could maybe in the future map U-boot environment variables to EFI variables
      here.
      Signed-off-by: NAlexander Graf <agraf@suse.de>
      Reviewed-by: NSimon Glass <sjg@chromium.org>
      Tested-by: NSimon Glass <sjg@chromium.org>
      50149ea3