1. 19 1月, 2018 1 次提交
  2. 12 10月, 2017 1 次提交
    • B
      firmware: qcom: scm: Expose download-mode control · 8c1b7dc9
      Bjorn Andersson 提交于
      In order to aid post-mortem debugging the Qualcomm platforms provide a
      "memory download mode", where the boot loader will provide an interface
      for custom tools to "download" the content of RAM to a host machine.
      
      The mode is triggered by writing a magic value somewhere in RAM, that is
      read in the boot code path after a warm-restart. Two mechanism for
      setting this magic value are supported in modern platforms; a direct SCM
      call to enable the mode or through a secure io write of a magic value.
      
      In order for a normal reboot not to trigger "download mode" the magic
      must be cleared during a clean reboot.
      
      Download mode has to be enabled by including qcom_scm.download_mode=1 on
      the command line.
      Reviewed-by: NStephen Boyd <sboyd@codeaurora.org>
      Signed-off-by: NBjorn Andersson <bjorn.andersson@linaro.org>
      Signed-off-by: NAndy Gross <andy.gross@linaro.org>
      8c1b7dc9
  3. 31 1月, 2017 1 次提交
  4. 26 11月, 2016 1 次提交
    • K
      drivers: psci: PSCI checker module · ea8b1c4a
      Kevin Brodsky 提交于
      On arm and arm64, PSCI is one of the possible firmware interfaces
      used for power management. This includes both turning CPUs on and off,
      and suspending them (entering idle states).
      
      This patch adds a PSCI checker module that enables basic testing of
      PSCI operations during startup. There are two main tests: CPU
      hotplugging and suspending.
      
      In the hotplug tests, the hotplug API is used to turn off and on again
      all CPUs in the system, and then all CPUs in each cluster, checking
      the consistency of the return codes.
      
      In the suspend tests, a high-priority thread is created on each core
      and uses low-level cpuidle functionalities to enter suspend, in all
      the possible states and multiple times. This should allow a maximum
      number of CPUs to enter the same sleep state at the same or slightly
      different time.
      
      In essence, the suspend tests use a principle similar to that of the
      intel_powerclamp driver (drivers/thermal/intel_powerclamp.c), but the
      threads are only kept for the duration of the test (they are already
      gone when userspace is started) and it does not require to stop/start
      the tick.
      
      While in theory power management PSCI functions (CPU_{ON,OFF,SUSPEND})
      could be directly called, this proved too difficult as it would imply
      the duplication of all the logic used by the kernel to allow for a
      clean shutdown/bringup/suspend of the CPU (the deepest sleep states
      implying potentially the shutdown of the CPU).
      
      Note that this file cannot be compiled as a loadable module, since it
      uses a number of non-exported identifiers (essentially for
      PSCI-specific checks and direct use of cpuidle) and relies on the
      absence of userspace to avoid races when calling hotplug and cpuidle
      functions.
      
      For now at least, CONFIG_PSCI_CHECKER is mutually exclusive with
      CONFIG_TORTURE_TEST, because torture tests may also use hotplug and
      cause false positives in the hotplug tests.
      
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Cc: Kevin Hilman <khilman@kernel.org>
      Cc: "Rafael J. Wysocki" <rjw@rjwysocki.net>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: "Paul E. McKenney" <paulmck@linux.vnet.ibm.com>
      Cc: James Morse <james.morse@arm.com>
      Cc: Sudeep Holla <sudeep.holla@arm.com>
      Cc: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>
      Cc: Mark Rutland <mark.rutland@arm.com>
      Acked-by: "Paul E. McKenney" <paulmck@linux.vnet.ibm.com> [torture test config]
      Signed-off-by: NKevin Brodsky <kevin.brodsky@arm.com>
      [lpieralisi: added cpuidle locking, reworded commit log/kconfig entry]
      Signed-off-by: NLorenzo Pieralisi <lorenzo.pieralisi@arm.com>
      Signed-off-by: NArnd Bergmann <arnd@arndb.de>
      ea8b1c4a
  5. 18 11月, 2016 1 次提交
    • T
      firmware: tegra: Add IVC library · ca791d7f
      Thierry Reding 提交于
      The Inter-VM communication (IVC) is a communication protocol which is
      designed for interprocessor communication (IPC) or the communication
      between the hypervisor and the virtual machine with a guest OS.
      
      Message channels are used to communicate between processors. They are
      backed by DRAM or SRAM, so care must be taken to maintain coherence of
      data.
      
      The IVC library maintains memory-based descriptors for the transmission
      and reception channels as well as the data coherence of the counter and
      payload. Clients, such as the driver for the BPMP firmware, can use the
      library to exchange messages with remote processors.
      
      Based on work by Peter Newman <pnewman@nvidia.com> and Joseph Lo
      <josephl@nvidia.com>.
      Signed-off-by: NThierry Reding <treding@nvidia.com>
      ca791d7f
  6. 27 10月, 2016 1 次提交
    • N
      firmware: Add basic support for TI System Control Interface (TI-SCI) protocol · aa276781
      Nishanth Menon 提交于
      Texas Instrument's System Control Interface (TI-SCI) Message Protocol
      is used in Texas Instrument's System on Chip (SoC) such as those
      in keystone family K2G SoC to communicate between various compute
      processors with a central system controller entity.
      
      TI-SCI message protocol provides support for management of various
      hardware entities within the SoC. Add support driver to allow
      communication with system controller entity within the SoC using the
      mailbox client.
      
      We introduce the basic registration and query capability for the
      driver protocol as part of this change. Subsequent patches add in
      functionality specific to the TI-SCI features.
      Signed-off-by: NNishanth Menon <nm@ti.com>
      Signed-off-by: NTero Kristo <t-kristo@ti.com>
      aa276781
  7. 02 9月, 2016 1 次提交
  8. 07 7月, 2016 1 次提交
    • A
      firmware: scpi: add CONFIG_OF dependency · e517dfe6
      Arnd Bergmann 提交于
      We get a harmless warning if the ARM_SCPI_POWER_DOMAIN driver is enabled
      without CONFIG_OF during compile testing:
      
      warning: (ARM_SCPI_POWER_DOMAIN) selects PM_GENERIC_DOMAINS_OF which has unmet direct dependencies (PM_GENERIC_DOMAINS && OF)
      
      There is no need to select PM_GENERIC_DOMAINS_OF if OF is set, so we can
      replace the 'select' with a dependency.
      Signed-off-by: NArnd Bergmann <arnd@arndb.de>
      Fixes: 8bec4337 ("firmware: scpi: add device power domain support using genpd")
      Acked-by: NSudeep Holla <sudeep.holla@arm.com>
      e517dfe6
  9. 25 6月, 2016 1 次提交
  10. 21 6月, 2016 1 次提交
  11. 13 6月, 2016 1 次提交
  12. 12 2月, 2016 1 次提交
    • A
      firmware: qemu config needs I/O ports · 28c09ec4
      Arnd Bergmann 提交于
      Not all machines have PCI style I/O port memory, or they do not allow
      mapping it using the ioport_map() function, whcih results in a
      build error with the newly added qemu firmware code:
      
      drivers/firmware/built-in.o: In function `fw_cfg_io_cleanup':
      qemu_fw_cfg.c:(.text+0x144): undefined reference to `ioport_unmap'
      drivers/firmware/built-in.o: In function `fw_cfg_sysfs_probe':
      qemu_fw_cfg.c:(.text+0xb18): undefined reference to `ioport_map'
      
      This adds a Kconfig dependency to ensure the driver can only
      be built on platforms that support it.
      Signed-off-by: NArnd Bergmann <arnd@arndb.de>
      Fixes: 75f3e8e4 ("firmware: introduce sysfs driver for QEMU's fw_cfg device")
      Acked-by: NGabriel Somlo <somlo@cmu.edu>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      28c09ec4
  13. 10 2月, 2016 1 次提交
    • G
      firmware: introduce sysfs driver for QEMU's fw_cfg device · 75f3e8e4
      Gabriel Somlo 提交于
      Make fw_cfg entries of type "file" available via sysfs. Entries
      are listed under /sys/firmware/qemu_fw_cfg/by_key, in folders
      named after each entry's selector key. Filename, selector value,
      and size read-only attributes are included for each entry. Also,
      a "raw" attribute allows retrieval of the full binary content of
      each entry.
      
      The fw_cfg device can be instantiated automatically from ACPI or
      the Device Tree, or manually by using a kernel module (or command
      line) parameter, with a syntax outlined in the documentation file.
      Signed-off-by: NGabriel Somlo <somlo@cmu.edu>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      75f3e8e4
  14. 05 1月, 2016 1 次提交
  15. 15 10月, 2015 1 次提交
  16. 28 9月, 2015 1 次提交
    • S
      firmware: add support for ARM System Control and Power Interface(SCPI) protocol · 8cb7cf56
      Sudeep Holla 提交于
      This patch adds support for System Control and Power Interface (SCPI)
      Message Protocol used between the Application Cores(AP) and the System
      Control Processor(SCP). The MHU peripheral provides a mechanism for
      inter-processor communication between SCP's M3 processor and AP.
      
      SCP offers control and management of the core/cluster power states,
      various power domain DVFS including the core/cluster, certain system
      clocks configuration, thermal sensors and many others.
      
      This protocol driver provides interface for all the client drivers using
      SCPI to make use of the features offered by the SCP.
      Signed-off-by: NSudeep Holla <sudeep.holla@arm.com>
      Reviewed-by: NJon Medhurst (Tixy) <tixy@linaro.org>
      Cc: Jassi Brar <jassisinghbrar@gmail.com>
      Cc: Liviu Dudau <Liviu.Dudau@arm.com>
      Cc: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>
      8cb7cf56
  17. 24 9月, 2015 1 次提交
  18. 03 8月, 2015 1 次提交
  19. 22 6月, 2015 1 次提交
    • R
      MIPS: BCM47xx: Move NVRAM driver to the drivers/firmware/ · f6e734a8
      Rafał Miłecki 提交于
      After Broadcom switched from MIPS to ARM for their home routers we need
      to have NVRAM driver in some common place (not arch/mips/). As explained
      in Kconfig, this driver is responsible for parsing SoC configuration
      data that is passed to the kernel in flash from the bootloader firmware
      called "CFE".
      
      We were thinking about putting it in bus directory, however there are
      two possible buses for MIPS: drivers/ssb/ and drivers/bcma/. So this
      won't fit there and this is why I would like to move this driver to the
      drivers/firmware/.
      Signed-off-by: NRafał Miłecki <zajec5@gmail.com>
      Reviewed-by: NPaul Walmsley <paul@pwsan.com>
      Cc: linux-mips@linux-mips.org
      Cc: Hauke Mehrtens <hauke@hauke-m.de>
      Cc: Seiji Aguchi <seiji.aguchi@hds.com>
      Cc: Greg Kroah-Hartman <gregkh@suse.de>
      Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org>
      Cc: Mike Waychison <mikew@google.com>
      Cc: Roy Franz <roy.franz@linaro.org>
      Cc: Matt Fleming <matt.fleming@intel.com>
      Cc: Linus Torvalds <torvalds@linux-foundation.org>
      Patchwork: https://patchwork.linux-mips.org/patch/10544/Signed-off-by: NRalf Baechle <ralf@linux-mips.org>
      f6e734a8
  20. 12 3月, 2015 1 次提交
  21. 24 1月, 2014 1 次提交
  22. 07 12月, 2013 1 次提交
    • L
      ACPI / IBFT: Fix incorrect <acpi/acpi.h> inclusion in iSCSI boot firmware module · 9d24622c
      Lv Zheng 提交于
      To avoid build problems and breaking dependencies between ACPI header
      files, <acpi/acpi.h> should not be included directly by code outside
      of the ACPI core subsystem, but this is done by the ACPI iSCSI
      Boot Firmware code.
      
      The iBFT specification doesn't mention whether or not it can appear
      on a non-ACPI platform, but is says that ACPI 3.0b defines the
      mechanism.  The current CONFIG_ISCSI_IBFT_FIND code doesn't use the
      ACPI tables API to locate the table, so it doesn't rely on CONFIG_ACPI
      directly.
      
      However, since iBFT is is an ACPI-based mechanism (please refer to
      the documentation link below for more information), it should be
      correct to make CONFIG_ISCSI_IBFT_FIND depend on CONFIG_ACPI (even
      though the table location can be implemented without using ACPI
      tables API).
      
      After that change, include/linux/iscsi_ibft.h can be modified to
      include <linux/acpi.h> instead of <acpi/acpi.h> as appropriate.
      
      References: http://www.microsoft.com/whdc/system/platform/firmware/ibft.mspx
      Cc: Konrad Rzeszutek Wilk <konrad@kernel.org>
      Cc: Peter Jones <pjones@redhat.com>
      Signed-off-by: NLv Zheng <lv.zheng@intel.com>
      [rjw: Subject and changelog]
      Signed-off-by: NRafael J. Wysocki <rafael.j.wysocki@intel.com>
      9d24622c
  23. 04 6月, 2013 1 次提交
  24. 17 4月, 2013 1 次提交
    • M
      efivars: Move pstore code into the new EFI directory · 04851772
      Matt Fleming 提交于
      efivars.c has grown far too large and needs to be divided up. Create a
      new directory and move the persistence storage code to efi-pstore.c now
      that it uses the new efivar API. This helps us to greatly reduce the
      size of efivars.c and paves the way for moving other code out of
      efivars.c.
      
      Note that because CONFIG_EFI_VARS can be built as a module efi-pstore
      must also include support for building as a module.
      Reviewed-by: NTom Gundersen <teg@jklm.no>
      Tested-by: NTom Gundersen <teg@jklm.no>
      Cc: Seiji Aguchi <seiji.aguchi@hds.com>
      Cc: Anton Vorontsov <cbouatmailru@gmail.com>
      Cc: Colin Cross <ccross@android.com>
      Cc: Kees Cook <keescook@chromium.org>
      Cc: Matthew Garrett <mjg59@srcf.ucam.org>
      Cc: Tony Luck <tony.luck@intel.com>
      Signed-off-by: NMatt Fleming <matt.fleming@intel.com>
      04851772
  25. 16 4月, 2013 1 次提交
  26. 21 3月, 2013 2 次提交
    • S
      efivars: Add module parameter to disable use as a pstore backend · ec0971ba
      Seth Forshee 提交于
      We know that with some firmware implementations writing too much data to
      UEFI variables can lead to bricking machines. Recent changes attempt to
      address this issue, but for some it may still be prudent to avoid
      writing large amounts of data until the solution has been proven on a
      wide variety of hardware.
      
      Crash dumps or other data from pstore can potentially be a large data
      source. Add a pstore_module parameter to efivars to allow disabling its
      use as a backend for pstore. Also add a config option,
      CONFIG_EFI_VARS_PSTORE_DEFAULT_DISABLE, to allow setting the default
      value of this paramter to true (i.e. disabled by default).
      Signed-off-by: NSeth Forshee <seth.forshee@canonical.com>
      Cc: Josh Boyer <jwboyer@redhat.com>
      Cc: Matthew Garrett <mjg59@srcf.ucam.org>
      Cc: Seiji Aguchi <seiji.aguchi@hds.com>
      Cc: Tony Luck <tony.luck@intel.com>
      Cc: <stable@vger.kernel.org>
      Signed-off-by: NMatt Fleming <matt.fleming@intel.com>
      ec0971ba
    • S
      efivars: Allow disabling use as a pstore backend · ed9dc8ce
      Seth Forshee 提交于
      Add a new option, CONFIG_EFI_VARS_PSTORE, which can be set to N to
      avoid using efivars as a backend to pstore, as some users may want to
      compile out the code completely.
      
      Set the default to Y to maintain backwards compatability, since this
      feature has always been enabled until now.
      Signed-off-by: NSeth Forshee <seth.forshee@canonical.com>
      Cc: Josh Boyer <jwboyer@redhat.com>
      Cc: Matthew Garrett <mjg59@srcf.ucam.org>
      Cc: Seiji Aguchi <seiji.aguchi@hds.com>
      Cc: Tony Luck <tony.luck@intel.com>
      Cc: <stable@vger.kernel.org>
      Signed-off-by: NMatt Fleming <matt.fleming@intel.com>
      ed9dc8ce
  27. 29 11月, 2011 1 次提交
  28. 30 4月, 2011 1 次提交
    • M
      driver: Google EFI SMI · 74c5b31c
      Mike Waychison 提交于
      The "gsmi" driver bridges userland with firmware specific routines for
      accessing hardware.
      
      Currently, this driver only supports NVRAM and eventlog information.
      Deprecated functions have been removed from the driver, though their
      op-codes are left in place so that they are not re-used.
      
      This driver works by trampolining into the firmware via the smi_command
      outlined in the FADT table.  Three protocols are used due to various
      limitations over time, but all are included herein.
      
      This driver should only ever load on Google boards, identified by either
      a "Google, Inc." board vendor string in DMI, or "GOOGLE" in the OEM
      strings of the FADT ACPI table.  This logic happens in
      gsmi_system_valid().
      Signed-off-by: NDuncan Laurie <dlaurie@google.com>
      Signed-off-by: NAaron Durbin <adurbin@google.com>
      Signed-off-by: NMike Waychison <mikew@google.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      74c5b31c
  29. 23 3月, 2011 1 次提交
  30. 26 2月, 2011 1 次提交
    • M
      firmware: Basic dmi-sysfs support · 948af1f0
      Mike Waychison 提交于
      Introduce a new module "dmi-sysfs" that exports the broken out entries
      of the DMI table through sysfs.
      
      Entries are enumerated via dmi_walk() on module load, and are populated
      as kobjects rooted at /sys/firmware/dmi/entries.
      
      Entries are named "<type>-<instance>", where:
         <type>	: is the type of the entry, and
         <instance>	: is the ordinal count within the DMI table of that
      		  entry type.  This instance is used in lieu the DMI
      		  entry's handle as no assurances are made by the kernel
      		  that handles are unique.
      
      All entries export the following attributes:
         length	: The length of the formatted portion of the entry
         handle	: The handle given to this entry by the firmware
         raw		: The raw bytes of the entire entry, including the
      		  formatted portion, the unformatted (strings) portion,
      		  and the two terminating nul characters.
         type		: The DMI entry type
         instance	: The ordinal instance of this entry given its type.
         position	: The position ordinal of the entry within the table in
      		  its entirety.
      
      Entries in dmi-sysfs are kobject backed members called "struct
      dmi_sysfs_entry" and belong to dmi_kset.  They are threaded through
      entry_list (protected by entry_list_lock) so that we can find them at
      cleanup time.
      Signed-off-by: NMike Waychison <mikew@google.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      948af1f0
  31. 21 1月, 2011 1 次提交
    • D
      kconfig: rename CONFIG_EMBEDDED to CONFIG_EXPERT · 6a108a14
      David Rientjes 提交于
      The meaning of CONFIG_EMBEDDED has long since been obsoleted; the option
      is used to configure any non-standard kernel with a much larger scope than
      only small devices.
      
      This patch renames the option to CONFIG_EXPERT in init/Kconfig and fixes
      references to the option throughout the kernel.  A new CONFIG_EMBEDDED
      option is added that automatically selects CONFIG_EXPERT when enabled and
      can be used in the future to isolate options that should only be
      considered for embedded systems (RISC architectures, SLOB, etc).
      
      Calling the option "EXPERT" more accurately represents its intention: only
      expert users who understand the impact of the configuration changes they
      are making should enable it.
      Reviewed-by: NIngo Molnar <mingo@elte.hu>
      Acked-by: NDavid Woodhouse <david.woodhouse@intel.com>
      Signed-off-by: NDavid Rientjes <rientjes@google.com>
      Cc: Greg KH <gregkh@suse.de>
      Cc: "David S. Miller" <davem@davemloft.net>
      Cc: Jens Axboe <axboe@kernel.dk>
      Cc: Arnd Bergmann <arnd@arndb.de>
      Cc: Robin Holt <holt@sgi.com>
      Cc: <linux-arch@vger.kernel.org>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      6a108a14
  32. 18 10月, 2010 1 次提交
  33. 14 10月, 2010 1 次提交
  34. 12 8月, 2010 1 次提交
    • R
      firmware: ibft depends on SCSI · 4cde7525
      Randy Dunlap 提交于
      Prevent build errors when SCSI is not enabled:
      
      iscsi_ibft.c:(.init.text+0x548d): undefined reference to `iscsi_boot_create_initiator'
      iscsi_ibft.c:(.init.text+0x54a9): undefined reference to `iscsi_boot_create_ethernet'
      iscsi_ibft.c:(.init.text+0x54c5): undefined reference to `iscsi_boot_create_target'
      iscsi_ibft.c:(.init.text+0x55ff): undefined reference to `iscsi_boot_destroy_kset'
      iscsi_ibft.c:(.init.text+0x561e): undefined reference to `iscsi_boot_create_kset'
      iscsi_ibft.c:(.exit.text+0xe2c): undefined reference to `iscsi_boot_destroy_kset'
      Signed-off-by: NRandy Dunlap <randy.dunlap@oracle.com>
      Signed-off-by: NPeter Jones <pjones@redhat.com>
      Signed-off-by: NKonrad Rzeszutek Wilk <konrad@kernel.org>
      4cde7525
  35. 06 8月, 2010 1 次提交
  36. 12 5月, 2010 2 次提交
  37. 16 12月, 2009 1 次提交
  38. 08 7月, 2008 1 次提交
    • B
      sysfs: add /sys/firmware/memmap · 69ac9cd6
      Bernhard Walle 提交于
      This patch adds /sys/firmware/memmap interface that represents the BIOS
      (or Firmware) provided memory map. The tree looks like:
      
          /sys/firmware/memmap/0/start   (hex number)
                                 end     (hex number)
                                 type    (string)
          ...                 /1/start
                                 end
                                 type
      
      With the following shell snippet one can print the memory map in the same form
      the kernel prints itself when booting on x86 (the E820 map).
      
        --------- 8< --------------------------
          #!/bin/sh
          cd /sys/firmware/memmap
          for dir in * ; do
              start=$(cat $dir/start)
              end=$(cat $dir/end)
              type=$(cat $dir/type)
              printf "%016x-%016x (%s)\n" $start $[ $end +1] "$type"
          done
        --------- >8 --------------------------
      
      That patch only provides the needed interface:
      
       1. The sysfs interface.
       2. The structure and enumeration definition.
       3. The function firmware_map_add() and firmware_map_add_early()
          that should be called from architecture code (E820/EFI, for
          example) to add the contents to the interface.
      
      If the kernel is compiled without CONFIG_FIRMWARE_MEMMAP, the interface does
      nothing without cluttering the architecture-specific code with #ifdef's.
      
      The purpose of the new interface is kexec: While /proc/iomem represents
      the *used* memory map (e.g. modified via kernel parameters like 'memmap'
      and 'mem'), the /sys/firmware/memmap tree represents the unmodified memory
      map provided via the firmware. So kexec can:
      
       - use the original memory map for rebooting,
       - use the /proc/iomem for setting up the ELF core headers for kdump
         case that should only represent the memory of the system.
      
      The patch has been tested on i386 and x86_64.
      Signed-off-by: NBernhard Walle <bwalle@suse.de>
      Acked-by: NGreg KH <gregkh@suse.de>
      Acked-by: NVivek Goyal <vgoyal@redhat.com>
      Cc: kexec@lists.infradead.org
      Cc: yhlu.kernel@gmail.com
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      69ac9cd6