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: <49ef52b7-0269-898c-7cc2-096f2f1037fc@arm.com>
Date:   Thu, 6 Jul 2023 12:06:19 +0100
From:   Robin Murphy <robin.murphy@....com>
To:     Lucas Stach <l.stach@...gutronix.de>,
        Alexander Stein <alexander.stein@...tq-group.com>,
        suzuki.poulose@....com, coresight@...ts.linaro.org,
        imx@...ts.linux.dev, Rob Herring <robh+dt@...nel.org>,
        Krzysztof Kozlowski <krzysztof.kozlowski+dt@...aro.org>,
        Conor Dooley <conor+dt@...nel.org>,
        Shawn Guo <shawnguo@...nel.org>,
        Sascha Hauer <s.hauer@...gutronix.de>,
        Pengutronix Kernel Team <kernel@...gutronix.de>,
        Fabio Estevam <festevam@...il.com>,
        NXP Linux Team <linux-imx@....com>,
        Marek Vasut <marex@...x.de>, Peng Fan <peng.fan@....com>,
        Adam Ford <aford173@...il.com>,
        Laurent Pinchart <laurent.pinchart@...asonboard.com>,
        "open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS" 
        <devicetree@...r.kernel.org>,
        "moderated list:ARM/FREESCALE IMX / MXC ARM ARCHITECTURE" 
        <linux-arm-kernel@...ts.infradead.org>,
        open list <linux-kernel@...r.kernel.org>,
        Frank Li <Frank.Li@....com>
Subject: Re: [PATCH 1/1] arm64: dts: imx8mp: remove arm, primecell-periphid at
 etm nodes

On 2023-07-06 09:23, Lucas Stach wrote:
> Hi Alexander,
> 
> Am Donnerstag, dem 06.07.2023 um 07:06 +0200 schrieb Alexander Stein:
>> Hi Frank,
>>
>> Am Mittwoch, 5. Juli 2023, 22:59:53 CEST schrieb Frank Li:
>>> The reg size of etm nodes is incorrectly set to 64k instead of 4k. This
>>> leads to a crash when calling amba_read_periphid().  After corrected reg
>>> size, amba_read_periphid() retrieve the correct periphid.
>>> arm,primecell-periphid were removed from the etm nodes.
>>
>> So this means the reference manual is wrong here? It clearly states the size
>> is 64kiB. Reference Manual i.MX8MP Rev 1. 06/2021
>> On a side note: Is imx8mq affected by this as well? The DAP memory table lists
>> similar sizes in the RM .
>>
> Note that the 64K MMIO space per device is really an alignment thing.
> It's a recommendation from ARM to allow individual device MMIO regions
> to be mapped on kernels with 64K page size. Most of the time the real
> MMIO space occupied by the device is actually much smaller than 64K.

Indeed, it's quite common for TRM memory maps to be written in terms of 
the interconnect configuration, i.e. from the point of view of the 
interconnect itself, that whole range of address space is assigned to 
that peripheral, and it may even be true that the entire range is routed 
to the port where that peripheral is connected. However what's of more 
interest for DT is how much of that range the peripheral itself actually 
decodes.

Robin.

> 
> Regards,
> Lucas
> 
>> Best regards,
>> Alexander
>>
>>> Signed-off-by: Frank Li <Frank.Li@....com>
>>> ---
>>>   arch/arm64/boot/dts/freescale/imx8mp.dtsi | 12 ++++--------
>>>   1 file changed, 4 insertions(+), 8 deletions(-)
>>>
>>> diff --git a/arch/arm64/boot/dts/freescale/imx8mp.dtsi
>>> b/arch/arm64/boot/dts/freescale/imx8mp.dtsi index
>>> cc406bb338fe..e0ca82ff6f15 100644
>>> --- a/arch/arm64/boot/dts/freescale/imx8mp.dtsi
>>> +++ b/arch/arm64/boot/dts/freescale/imx8mp.dtsi
>>> @@ -306,8 +306,7 @@ soc: soc@0 {
>>>
>>>   		etm0: etm@...40000 {
>>>   			compatible = "arm,coresight-etm4x",
>> "arm,primecell";
>>> -			reg = <0x28440000 0x10000>;
>>> -			arm,primecell-periphid = <0xbb95d>;
>>> +			reg = <0x28440000 0x1000>;
>>>   			cpu = <&A53_0>;
>>>   			clocks = <&clk IMX8MP_CLK_MAIN_AXI>;
>>>   			clock-names = "apb_pclk";
>>> @@ -323,8 +322,7 @@ etm0_out_port: endpoint {
>>>
>>>   		etm1: etm@...40000 {
>>>   			compatible = "arm,coresight-etm4x",
>> "arm,primecell";
>>> -			reg = <0x28540000 0x10000>;
>>> -			arm,primecell-periphid = <0xbb95d>;
>>> +			reg = <0x28540000 0x1000>;
>>>   			cpu = <&A53_1>;
>>>   			clocks = <&clk IMX8MP_CLK_MAIN_AXI>;
>>>   			clock-names = "apb_pclk";
>>> @@ -340,8 +338,7 @@ etm1_out_port: endpoint {
>>>
>>>   		etm2: etm@...40000 {
>>>   			compatible = "arm,coresight-etm4x",
>> "arm,primecell";
>>> -			reg = <0x28640000 0x10000>;
>>> -			arm,primecell-periphid = <0xbb95d>;
>>> +			reg = <0x28640000 0x1000>;
>>>   			cpu = <&A53_2>;
>>>   			clocks = <&clk IMX8MP_CLK_MAIN_AXI>;
>>>   			clock-names = "apb_pclk";
>>> @@ -357,8 +354,7 @@ etm2_out_port: endpoint {
>>>
>>>   		etm3: etm@...40000 {
>>>   			compatible = "arm,coresight-etm4x",
>> "arm,primecell";
>>> -			reg = <0x28740000 0x10000>;
>>> -			arm,primecell-periphid = <0xbb95d>;
>>> +			reg = <0x28740000 0x1000>;
>>>   			cpu = <&A53_3>;
>>>   			clocks = <&clk IMX8MP_CLK_MAIN_AXI>;
>>>   			clock-names = "apb_pclk";
>>
>>
> 
> 
> _______________________________________________
> linux-arm-kernel mailing list
> linux-arm-kernel@...ts.infradead.org
> http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ