- 27 9月, 2022 3 次提交
-
-
由 Ard Biesheuvel 提交于
Remove some goto cruft that serves no purpose and obfuscates the code. Signed-off-by: NArd Biesheuvel <ardb@kernel.org>
-
由 Ard Biesheuvel 提交于
Currently, struct efi_boot_memmap is a struct that is passed around between callers of efi_get_memory_map() and the users of the resulting data, and which carries pointers to various variables whose values are provided by the EFI GetMemoryMap() boot service. This is overly complex, and it is much easier to carry these values in the struct itself. So turn the struct into one that carries these data items directly, including a flex array for the variable number of EFI memory descriptors that the boot service may return. Signed-off-by: NArd Biesheuvel <ardb@kernel.org>
-
由 Ard Biesheuvel 提交于
The virt map is a set of efi_memory_desc_t descriptors that are passed to SetVirtualAddressMap() to inform the firmware about the desired virtual mapping of the regions marked as EFI_MEMORY_RUNTIME. The only reason we currently call the efi_get_memory_map() helper is that it gives us an allocation that is guaranteed to be of sufficient size. However, efi_get_memory_map() has grown some additional complexity over the years, and today, we're actually better off calling the EFI boot service directly with a zero size, which tells us how much memory should be enough for the virt map. While at it, avoid creating the VA map allocation if we will not be using it anyway, i.e., if efi_novamap is true. Signed-off-by: NArd Biesheuvel <ardb@kernel.org>
-
- 21 9月, 2022 1 次提交
-
-
由 Ard Biesheuvel 提交于
Currently, the non-x86 stub code calls get_memory_map() redundantly, given that the data it returns is never used anywhere. So drop the call. Cc: <stable@vger.kernel.org> # v4.14+ Fixes: 24d7c494 ("efi/arm-stub: Round up FDT allocation to mapping size") Signed-off-by: NArd Biesheuvel <ardb@kernel.org>
-
- 06 9月, 2022 1 次提交
-
-
由 Huacai Chen 提交于
This patch adds efistub booting support, which is the standard UEFI boot protocol for LoongArch to use. We use generic efistub, which means we can pass boot information (i.e., system table, memory map, kernel command line, initrd) via a light FDT and drop a lot of non-standard code. We use a flat mapping to map the efi runtime in the kernel's address space. In efi, VA = PA; in kernel, VA = PA + PAGE_OFFSET. As a result, flat mapping is not identity mapping, SetVirtualAddressMap() is still needed for the efi runtime. Tested-by: NXi Ruoyao <xry111@xry111.site> Signed-off-by: NHuacai Chen <chenhuacai@loongson.cn> [ardb: change fpic to fpie as suggested by Xi Ruoyao] Signed-off-by: NArd Biesheuvel <ardb@kernel.org>
-
- 22 7月, 2022 2 次提交
-
-
由 Charles Keepax 提交于
Add helpers that can be layered on top of a buffer read from or to be written to the DSP to faciliate accessing datastructures within the DSP memory. These functions handle adding the padding bytes for the DSP, converting to big endian, and packing arbitrary length data. Signed-off-by: NCharles Keepax <ckeepax@opensource.cirrus.com> Link: https://lore.kernel.org/r/20220722094851.92521-2-ckeepax@opensource.cirrus.comSigned-off-by: NMark Brown <broonie@kernel.org>
-
由 Charles Keepax 提交于
The code already has a post_stop callback, add a matching pre_stop callback to the client_ops that is called before execution is stopped. This callback provides a convenient place for the client code to communicate with the DSP before it is stopped. Signed-off-by: NCharles Keepax <ckeepax@opensource.cirrus.com> Link: https://lore.kernel.org/r/20220722094851.92521-1-ckeepax@opensource.cirrus.comSigned-off-by: NMark Brown <broonie@kernel.org>
-
- 20 7月, 2022 1 次提交
-
-
由 Sunil V L 提交于
The boot-hartid can be a 64bit value on RV64 platforms but the "boot-hartid" in DT is assumed to be 32bit only. Detect the size of the "boot-hartid" in DT and use 32bit or 64bit read appropriately. Signed-off-by: NSunil V L <sunilvl@ventanamicro.com> Link: https://lore.kernel.org/r/20220527051743.2829940-6-sunilvl@ventanamicro.comSigned-off-by: NPalmer Dabbelt <palmer@rivosinc.com>
-
- 16 7月, 2022 1 次提交
-
-
由 Lukasz Luba 提交于
In SCMI v3.1 the power scale can be in micro-Watts. The upper layers, e.g. cpufreq and EM should handle received power values properly (upscale when needed). Thus, provide an interface which allows to check what is the scale for power values. The old interface allowed to distinguish between bogo-Watts and milli-Watts only (which was good for older SCMI spec). Acked-by: NSudeep Holla <sudeep.holla@arm.com> Signed-off-by: NLukasz Luba <lukasz.luba@arm.com> Signed-off-by: NRafael J. Wysocki <rafael.j.wysocki@intel.com>
-
- 14 7月, 2022 6 次提交
-
-
由 Ang Tien Sung 提交于
We are to support a new SMC Command of hexadecimal 0x200 that returns the ATF Firmware major and minor version. Signed-off-by: NAng Tien Sung <tien.sung.ang@intel.com> Signed-off-by: NDinh Nguyen <dinguyen@kernel.org> Link: https://lore.kernel.org/r/20220711223140.2307945-6-dinguyen@kernel.orgSigned-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
由 Kah Jing Lee 提交于
Extend Intel Stratix10 service layer driver to support new RSU DCMF status reporting. The status of each DCMF is reported. The currently used DCMF is used as reference, while the other three are compared against it to determine if they are corrupted. DCMF = Decision Configuration Management Firmware RSU = Remote System Update Signed-off-by: NRadu Bacrau <radu.bacrau@intel.com> Signed-off-by: NAng Tien Sung <tien.sung.ang@intel.com> Signed-off-by: NKah Jing Lee <kah.jing.lee@intel.com> Signed-off-by: NDinh Nguyen <dinguyen@kernel.org> Link: https://lore.kernel.org/r/20220711223140.2307945-5-dinguyen@kernel.orgSigned-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
由 Kah Jing Lee 提交于
Extend RSU driver to get DCMF status. The status of each DCMF is reported. The currently used DCMF is used as reference, while the other three are compared against it to determine if they are corrupted. DCMF = Decision Configuration Management Firmware. RSU = Remote System Update Signed-off-by: NRadu Bacrau <radu.bacrau@intel.com> Signed-off-by: NKah Jing Lee <kah.jing.lee@intel.com> Signed-off-by: NDinh Nguyen <dinguyen@kernel.org> Link: https://lore.kernel.org/r/20220711223140.2307945-4-dinguyen@kernel.orgSigned-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
由 Ang Tien Sung 提交于
Extending the fpga svc driver to support 6 new FPGA Crypto Service(FCS) commands. We are adding FCS SDOS data encryption and decryption, random number generator, image validation request, reading the data provision and certificate validation. Signed-off-by: NAng Tien Sung <tien.sung.ang@intel.com> Signed-off-by: NDinh Nguyen <dinguyen@kernel.org> Link: https://lore.kernel.org/r/20220711223140.2307945-3-dinguyen@kernel.orgSigned-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
由 Ang Tien Sung 提交于
Introduce a new SMC command INTEL_SIP_SMC_FUNCID_SERVICE_COMPLETED that polls if a previous asynchronous command was completed. This SMC command is used by the new FPGA Crypto Service (FCS). A basic example is that the FCS sends an AES data encryption call to the secure device manager(SDM) and waits for the completion of the operation by continuously polling the results with the new command. Signed-off-by: NAng Tien Sung <tien.sung.ang@intel.com> Signed-off-by: NDinh Nguyen <dinguyen@kernel.org> Link: https://lore.kernel.org/r/20220711223140.2307945-2-dinguyen@kernel.orgSigned-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
由 Ang Tien Sung 提交于
Extend Intel service layer driver to support FPGA Crypto service(FCS) features on Intel Soc platforms. Adding an additional channel and FCS platform driver ("intel_fcs") as part of the probe method. FCS driver uses the driver to send crypto operations' commands to the secure device manager(SDM) on Intel Soc platforms Stratix10 and Agilex. Signed-off-by: NAng Tien Sung <tien.sung.ang@intel.com> Signed-off-by: NDinh Nguyen <dinguyen@kernel.org> Link: https://lore.kernel.org/r/20220711223140.2307945-1-dinguyen@kernel.orgSigned-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
- 10 7月, 2022 2 次提交
-
-
由 Hans de Goede 提交于
Commit 98f30d0e ("ACPI: power: Switch to sys-off handler API") switched the ACPI sleep code from directly setting the old global pm_power_off handler to using the new register_sys_off_handler() mechanism with a priority of SYS_OFF_PRIO_FIRMWARE. This is a problem when the old global pm_power_off handler would later be overwritten, such as done by the late_initcall(efi_shutdown_init): if (efi_poweroff_required()) pm_power_off = efi_power_off; The old global pm_power_off handler gets run with a priority of SYS_OFF_PRIO_DEFAULT which is lower then SYS_OFF_PRIO_FIRMWARE, causing acpi_power_off() to run first, changing the behavior from before the ACPI sleep code switched to the new register_sys_off_handler(). Switch the registering of efi_power_off over to register_sys_off_handler() with a priority of SYS_OFF_PRIO_FIRMWARE + 1 so that it will run before acpi_power_off() as before. Note since the new sys-off-handler code will try all handlers in priority order, there is no more need for the EFI code to store and call the original pm_power_off handler. Fixes: 98f30d0e ("ACPI: power: Switch to sys-off handler API") Cc: Dmitry Osipenko <dmitry.osipenko@collabora.com> Signed-off-by: NHans de Goede <hdegoede@redhat.com> Acked-by: NArd Biesheuvel <ardb@kernel.org> Link: https://lore.kernel.org/r/20220708131412.81078-3-hdegoede@redhat.com
-
由 Hans de Goede 提交于
Commit 98f30d0e ("ACPI: power: Switch to sys-off handler API") switched the ACPI sleep code from directly setting the old global pm_power_off handler to using the new register_sys_off_handler() mechanism with a priority of SYS_OFF_PRIO_FIRMWARE. This is a problem when the old global pm_power_off handler would later be overwritten, such as done by the late_initcall(efi_shutdown_init): if (efi_poweroff_required()) pm_power_off = efi_power_off; The old global pm_power_off handler gets run with a priority of SYS_OFF_PRIO_DEFAULT which is lower then SYS_OFF_PRIO_FIRMWARE, causing acpi_power_off() to run first, changing the behavior from before the ACPI sleep code switched to the new register_sys_off_handler(). Switch the registering of efi_power_off over to register_sys_off_handler() with a priority of SYS_OFF_PRIO_FIRMWARE + 1 so that it will run before acpi_power_off() as before. Note since the new sys-off-handler code will try all handlers in priority order, there is no more need for the EFI code to store and call the original pm_power_off handler. Fixes: 98f30d0e ("ACPI: power: Switch to sys-off handler API") Cc: Dmitry Osipenko <dmitry.osipenko@collabora.com> Signed-off-by: NHans de Goede <hdegoede@redhat.com> Acked-by: NArd Biesheuvel <ardb@kernel.org> Link: https://lore.kernel.org/r/20220708131412.81078-3-hdegoede@redhat.com
-
- 08 7月, 2022 1 次提交
-
-
由 Lv Ruyi 提交于
If an error occurs, debugfs_create_file() will return ERR_PTR(-ERROR), so use IS_ERR() to check it. Reported-by: NZeal Robot <zealci@zte.com.cn> Signed-off-by: NLv Ruyi <lv.ruyi@zte.com.cn> Signed-off-by: NThierry Reding <treding@nvidia.com>
-
- 04 7月, 2022 10 次提交
-
-
由 Cristian Marussi 提交于
Make use of SCMI fast channel event tracing. Link: https://lore.kernel.org/r/20220704102241.2988447-7-cristian.marussi@arm.comSigned-off-by: NCristian Marussi <cristian.marussi@arm.com> Signed-off-by: NSudeep Holla <sudeep.holla@arm.com>
-
由 Cristian Marussi 提交于
Add SCMIv3.1 powercap protocol fast channel support using common helpers provided by the SCMI core with scmi_proto_helpers_ops operations. Link: https://lore.kernel.org/r/20220704102241.2988447-5-cristian.marussi@arm.comSigned-off-by: NCristian Marussi <cristian.marussi@arm.com> Signed-off-by: NSudeep Holla <sudeep.holla@arm.com>
-
由 Cristian Marussi 提交于
Generalize existing fast channel support used in the perf protocol and make it available to possibly any protocol refactoring the common code into a couple of new scmi_proto_helpers_ops routines. Make perf protocol use this new infrastructure. No functional change. Link: https://lore.kernel.org/r/20220704102241.2988447-4-cristian.marussi@arm.comSigned-off-by: NCristian Marussi <cristian.marussi@arm.com> Signed-off-by: NSudeep Holla <sudeep.holla@arm.com>
-
由 Cristian Marussi 提交于
Add support for SCMI v3.1 powercap protocol, with the exception of powercap fast channels, exposing all the new related powercap protocol operations as usual in include/linux/scmi_protocol.h. Link: https://lore.kernel.org/r/20220704102241.2988447-3-cristian.marussi@arm.comSigned-off-by: NCristian Marussi <cristian.marussi@arm.com> Signed-off-by: NSudeep Holla <sudeep.holla@arm.com>
-
由 Cristian Marussi 提交于
Add an SCMI System Power control driver to handle platform's requests carried by SYSTEM_POWER_STATE_NOTIFIER notifications: such platform requested system-wide power state transitions are handled accordingly, gracefully or forcefully, depending on the notifications' message flags. Graceful requests are relayed to userspace using the same Kernel API used to handle ACPI Shutdown bus events. Link: https://lore.kernel.org/r/20220704101933.2981635-5-cristian.marussi@arm.comReviewed-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org> Signed-off-by: NCristian Marussi <cristian.marussi@arm.com> Signed-off-by: NSudeep Holla <sudeep.holla@arm.com>
-
由 Cristian Marussi 提交于
Add a method to get hold of a protocol, causing it to be initialized and its resource accounting updated, without getting access to its operations and handle. Some protocols, like SCMI SystemPower, do not expose any protocol ops to the kernel OSPM agent but still need to be at least initialized. This helper avoids the need to invoke a full devm_get_protocol() only to get the protocol initialized while throwing away unused the protocol ops and handle. Link: https://lore.kernel.org/r/20220704101933.2981635-4-cristian.marussi@arm.comSigned-off-by: NCristian Marussi <cristian.marussi@arm.com> Signed-off-by: NSudeep Holla <sudeep.holla@arm.com>
-
由 Cristian Marussi 提交于
Add support for SCMIv3.1 System Power optional timeout field while dispatching SYSTEM_POWER_STATE_NOTIFIER notification. Link: https://lore.kernel.org/r/20220704101933.2981635-3-cristian.marussi@arm.comSigned-off-by: NCristian Marussi <cristian.marussi@arm.com> Signed-off-by: NSudeep Holla <sudeep.holla@arm.com>
-
由 Cristian Marussi 提交于
In order to minimize SCMI platform fw-side complexity, only one single SCMI platform should be in charge of SCMI SystemPower protocol communications with the OSPM. Enforce the existence of one single unique device associated with SystemPower protocol across any possible number of SCMI platforms, and warn if a system tries to register different SystemPower devices from multiple platforms. Link: https://lore.kernel.org/r/20220704101933.2981635-2-cristian.marussi@arm.comSigned-off-by: NCristian Marussi <cristian.marussi@arm.com> Signed-off-by: NSudeep Holla <sudeep.holla@arm.com>
-
由 Cristian Marussi 提交于
Add full message tracing for all transmitted and successfully received SCMI commands, replies and notifications. Link: https://lore.kernel.org/r/20220630173135.2086631-3-cristian.marussi@arm.comSigned-off-by: NCristian Marussi <cristian.marussi@arm.com> Signed-off-by: NSudeep Holla <sudeep.holla@arm.com>
-
由 Sudeep Holla 提交于
When scpi probe fails, at any point, we need to ensure that the scpi_info is not set and will remain NULL until the probe succeeds. If it is not taken care, then it could result use-after-free as the value is exported via get_scpi_ops() and could refer to a memory allocated via devm_kzalloc() but freed when the probe fails. Link: https://lore.kernel.org/r/20220701160310.148344-1-sudeep.holla@arm.com Cc: stable@vger.kernel.org # 4.19+ Reported-by: Nhuhai <huhai@kylinos.cn> Reviewed-by: NJackie Liu <liuyun01@kylinos.cn> Signed-off-by: NSudeep Holla <sudeep.holla@arm.com>
-
- 30 6月, 2022 1 次提交
-
-
由 Sibi Sankar 提交于
The SMC calls required by remoteproc PAS driver on SM8450 SoCs get a performance benefit from having a max vote to the crypto->ddr path. Add support for bandwidth (bw) voting for those SMC calls when the interconnects property is specified. Signed-off-by: NSibi Sankar <quic_sibis@quicinc.com> Signed-off-by: NBjorn Andersson <bjorn.andersson@linaro.org> Link: https://lore.kernel.org/r/1653289258-17699-3-git-send-email-quic_sibis@quicinc.com
-
- 29 6月, 2022 4 次提交
-
-
由 Tanmay Shah 提交于
SGI interrupt register and reset is performed by EEMI ioctl IOCTL_REGISTER_SGI. However, this is not correct use of EEMI call. SGI registration functionality does not qualify as energy management activity and so shouldn't be mapped to EEMI call. This new call will replace IOCTL_REGISTER_SGI and will be handled by TF-A specific handler in TF-A. To maintain backward compatibility for a while firmware driver will still use IOCTL_REGISTER_SGI as fallback strategy if new call fails or is not supported by TF-A. This new design also helps to make TF-A as pass through layer for EEMI calls. So we don't have to maintain PM_IOCTL as EEMI API ID in TF-A. Signed-off-by: NTanmay Shah <tanmay.shah@xilinx.com> Acked-by: NMichal Simek <michal.simek@amd.com> Link: https://lore.kernel.org/r/20220607224253.54919-1-tanmay.shah@xilinx.comSigned-off-by: NMichal Simek <michal.simek@amd.com>
-
由 Javier Martinez Canillas 提交于
This can be used by subsystems to unregister a platform device registered by sysfb and also to disable future platform device registration in sysfb. Suggested-by: NDaniel Vetter <daniel.vetter@ffwll.ch> Signed-off-by: NJavier Martinez Canillas <javierm@redhat.com> Reviewed-by: NDaniel Vetter <daniel.vetter@ffwll.ch> Link: https://patchwork.freedesktop.org/patch/msgid/20220607182338.344270-3-javierm@redhat.com
-
由 Javier Martinez Canillas 提交于
This function just returned 0 on success or an errno code on error, but it could be useful for sysfb_init() callers to have a pointer to the device. Signed-off-by: NJavier Martinez Canillas <javierm@redhat.com> Reviewed-by: NDaniel Vetter <daniel.vetter@ffwll.ch> Reviewed-by: NThomas Zimmermann <tzimmermann@suse.de> Link: https://patchwork.freedesktop.org/patch/msgid/20220607182338.344270-2-javierm@redhat.com
-
由 Zheng Zhi Yuan 提交于
This patch fixes the spelling error in firmware/efi/memmap.c, changing it to the correct word. Signed-off-by: NZheng Zhi Yuan <kevinjone25@g.ncu.edu.tw> Signed-off-by: NArd Biesheuvel <ardb@kernel.org>
-
- 27 6月, 2022 2 次提交
-
-
由 Bo Liu 提交于
Replace the deprecated ida_simple_{get,remove} with ida_{alloc,free}. Link: https://lore.kernel.org/r/20220616055052.4559-1-liubo03@inspur.comSigned-off-by: NBo Liu <liubo03@inspur.com> [sudeep.holla: Replace ida_alloc_min with ida_alloc as suggested by Cristian] Signed-off-by: NSudeep Holla <sudeep.holla@arm.com>
-
由 Vincent Guittot 提交于
Some protocols check the response size with the expected value but optee shared memory doesn't return such size whereas it is available in the optee output buffer. As an example, the base protocol compares the response size with the expected result when requesting the list of protocol which triggers a warning with optee shared memory: arm-scmi firmware:scmi0: Malformed reply - real_sz:116 calc_sz:4 (loop_num_ret:4) Save the output buffer length and use it when fetching the answer. Link: https://lore.kernel.org/r/20220624074549.3298-1-vincent.guittot@linaro.orgReviewed-by: NEtienne Carriere <etienne.carriere@linaro.org> Reviewed-by: NCristian Marussi <cristian.marussi@arm.com> Signed-off-by: NVincent Guittot <vincent.guittot@linaro.org> Signed-off-by: NSudeep Holla <sudeep.holla@arm.com>
-
- 26 6月, 2022 2 次提交
-
-
由 Krzysztof Kozlowski 提交于
Correct kerneldoc warnings like: drivers/firmware/qcom_scm-legacy.c:133: warning: Function parameter or member 'dev' not described in 'scm_legacy_call' Signed-off-by: NKrzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Reviewed-by: NStephen Boyd <sboyd@kernel.org> Signed-off-by: NBjorn Andersson <bjorn.andersson@linaro.org> Link: https://lore.kernel.org/r/20220519073410.7358-1-krzysztof.kozlowski@linaro.org
-
由 Jiang Jian 提交于
there is an unexpected word "the" in the comments that need to be dropped > * will cause the the boot stages to enter download mode, unless Signed-off-by: NJiang Jian <jiangjian@cdjrlc.com> Signed-off-by: NBjorn Andersson <bjorn.andersson@linaro.org> Link: https://lore.kernel.org/r/20220621094924.83135-1-jiangjian@cdjrlc.com
-
- 25 6月, 2022 3 次提交
-
-
由 Ard Biesheuvel 提交于
Move the fiddly bits of the efivar layer into its only remaining user, efivarfs, and confine its use to that particular module. All other uses of the EFI variable store have no need for this additional layer of complexity, given that they either only read variables, or read and write variables into a separate GUIDed namespace, and cannot be used to manipulate EFI variables that are covered by the EFI spec and/or affect the boot flow. Signed-off-by: NArd Biesheuvel <ardb@kernel.org>
-
由 Ard Biesheuvel 提交于
__efivar_entry_iter() uses a list iterator in a dubious way, i.e., it assumes that the iteration variable always points to an object of the appropriate type, even if the list traversal exhausts the list completely, in which case it will point somewhere in the vicinity of the list's anchor instead. Fortunately, we no longer use this function so we can just get rid of it entirely. Signed-off-by: NArd Biesheuvel <ardb@kernel.org>
-
由 Ard Biesheuvel 提交于
Switch the caching linked-list efivars layer implementation to the newly introduced efivar get/set variable wrappers, instead of accessing the lock and the ops pointer directly. This will permit us to move this code out of the public efivars API, and into efivarfs once the obsolete sysfs access method is finally removed. Signed-off-by: NArd Biesheuvel <ardb@kernel.org>
-