lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <912f90ee-0816-43ae-bc6f-a9a9a3e33d8a@linaro.org>
Date:   Wed, 13 Sep 2023 11:06:40 +0200
From:   Konrad Dybcio <konrad.dybcio@...aro.org>
To:     Stephan Gerhold <stephan@...hold.net>,
        Bjorn Andersson <andersson@...nel.org>
Cc:     Andy Gross <agross@...nel.org>, linux-arm-msm@...r.kernel.org,
        devicetree@...r.kernel.org, linux-kernel@...r.kernel.org,
        Bryan O'Donoghue <bryan.odonoghue@...aro.org>
Subject: Re: [PATCH 4/9] arm64: dts: qcom: msm8916: Reserve firmware memory
 dynamically

On 11.09.2023 19:41, Stephan Gerhold wrote:
> Most of the reserved firmware memory on MSM8916 can be relocated when
> respecting the required alignment. To avoid having to precompute the
> reserved memory regions in every board DT, describe the actual
> requirements (size, alignment, alloc-ranges) using the dynamic reserved
> memory allocation.
> 
> This approach has several advantages:
> 
>  1. We can define "templates" for the reserved memory regions in
>     msm8916.dtsi and keep only device-specific details in the board DT.
>     This is useful for the "mpss" region size for example, which varies
>     from device to device. It is no longer necessary to redefine all
>     firmware regions to shift their addresses.
> 
>  2. When some of the functionality (e.g. WCNSS, Modem, Venus) is not
>     enabled or needed for a device, the reserved memory can stay
>     disabled, freeing up the unused reservation for Linux.
> 
>  3. Devices with special requirements for one of the firmware regions
>     are handled automatically. For example, msm8916-longcheer-l8150
>     has non-relocatable "wcnss" firmware that must be loaded exactly
>     at address 0x8b600000. When this is defined as a static region,
>     the other dynamic allocations automatically adjust to a different
>     place with suitable alignment.
> 
> All in all this approach significantly reduces the boilerplate necessary
> to define the different firmware regions, and makes it easier to enable
> functionality on the different devices.
> 
> Signed-off-by: Stephan Gerhold <stephan@...hold.net>
> ---
[...]

>  
>  		mpss_mem: mpss@...00000 {
> +			/*
> +			 * The memory region for the mpss firmware is generally
> +			 * relocatable and could be allocated dynamically.
> +			 * However, many firmware versions tend to fail when
> +			 * loaded to some special addresses, so it is hard to
> +			 * define reliable alloc-ranges.
> +			 *
> +			 * alignment = <0x0 0x400000>;
> +			 * alloc-ranges = <0x0 0x86800000 0x0 0x8000000>;
> +			 */
Do we know of any devices that this would actually work on?

Konrad

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ