diff options
| author | Gabriel Somlo <somlo@cmu.edu> | 2016-01-28 09:23:11 -0500 |
|---|---|---|
| committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2016-02-09 20:37:39 -0500 |
| commit | 75f3e8e47f381074801d0034874d20c638d9e3d9 (patch) | |
| tree | b6d6e20113c38b04c126747144a162055f7e7a69 /drivers/firmware/Kconfig | |
| parent | 2fe829aca9d7bed5fd6b49c6a1452e5e486b6cc3 (diff) | |
firmware: introduce sysfs driver for QEMU's fw_cfg device
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: Gabriel Somlo <somlo@cmu.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/firmware/Kconfig')
| -rw-r--r-- | drivers/firmware/Kconfig | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/drivers/firmware/Kconfig b/drivers/firmware/Kconfig index 49a3a1185bb6..5130f74ae3bd 100644 --- a/drivers/firmware/Kconfig +++ b/drivers/firmware/Kconfig | |||
| @@ -161,6 +161,25 @@ config RASPBERRYPI_FIRMWARE | |||
| 161 | This option enables support for communicating with the firmware on the | 161 | This option enables support for communicating with the firmware on the |
| 162 | Raspberry Pi. | 162 | Raspberry Pi. |
| 163 | 163 | ||
| 164 | config FW_CFG_SYSFS | ||
| 165 | tristate "QEMU fw_cfg device support in sysfs" | ||
| 166 | depends on SYSFS && (ARM || ARM64 || PPC_PMAC || SPARC || X86) | ||
| 167 | default n | ||
| 168 | help | ||
| 169 | Say Y or M here to enable the exporting of the QEMU firmware | ||
| 170 | configuration (fw_cfg) file entries via sysfs. Entries are | ||
| 171 | found under /sys/firmware/fw_cfg when this option is enabled | ||
| 172 | and loaded. | ||
| 173 | |||
| 174 | config FW_CFG_SYSFS_CMDLINE | ||
| 175 | bool "QEMU fw_cfg device parameter parsing" | ||
| 176 | depends on FW_CFG_SYSFS | ||
| 177 | help | ||
| 178 | Allow the qemu_fw_cfg device to be initialized via the kernel | ||
| 179 | command line or using a module parameter. | ||
| 180 | WARNING: Using incorrect parameters (base address in particular) | ||
| 181 | may crash your system. | ||
| 182 | |||
| 164 | config QCOM_SCM | 183 | config QCOM_SCM |
| 165 | bool | 184 | bool |
| 166 | depends on ARM || ARM64 | 185 | depends on ARM || ARM64 |
