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: <CAH1PCMZ1YUC9SLOSEuCL3oUhYN23UOL+kLrOk8fbJ+EG-w3Umg@mail.gmail.com>
Date: Tue, 24 Jun 2025 20:21:11 +0800
From: Guodong Xu <guodong@...cstar.com>
To: Vivian Wang <wangruikang@...as.ac.cn>
Cc: Yixun Lan <dlan@...too.org>, Ze Huang <huangze@...t.edu.cn>, 
	Alex Elder <elder@...cstar.com>, spacemit@...ts.linux.dev, 
	Rob Herring <robh@...nel.org>, Krzysztof Kozlowski <krzk+dt@...nel.org>, Conor Dooley <conor+dt@...nel.org>, 
	Paul Walmsley <paul.walmsley@...ive.com>, Palmer Dabbelt <palmer@...belt.com>, 
	Albert Ou <aou@...s.berkeley.edu>, Alexandre Ghiti <alex@...ti.fr>, Vivian Wang <uwu@...m.page>, 
	devicetree@...r.kernel.org, linux-riscv@...ts.infradead.org, 
	linux-kernel@...r.kernel.org
Subject: Re: [PATCH 2/3] riscv: dts: spacemit: Move UARTs under dma-bus for K1

On Mon, Jun 23, 2025 at 6:04 PM Vivian Wang <wangruikang@...as.ac.cn> wrote:
>
> UART devices in Spacemit K1 use dma-bus DMA translations. Move these
> nodes under dma-bus to reflect this fact.
>
> Signed-off-by: Vivian Wang <wangruikang@...as.ac.cn>
> ---
>  arch/riscv/boot/dts/spacemit/k1.dtsi | 246 ++++++++++++++++++-----------------
>  1 file changed, 128 insertions(+), 118 deletions(-)
>
> diff --git a/arch/riscv/boot/dts/spacemit/k1.dtsi b/arch/riscv/boot/dts/spacemit/k1.dtsi
> index 99c76997b367f733c9dda2c30dd85817294ef9b7..0d41694699851e672a833601b62c2b2ad3daae79 100644
> --- a/arch/riscv/boot/dts/spacemit/k1.dtsi
> +++ b/arch/riscv/boot/dts/spacemit/k1.dtsi
> @@ -357,114 +357,6 @@ syscon_apbc: system-controller@...15000 {
>                         #reset-cells = <1>;
>                 };
>
> -               uart0: serial@...17000 {
> -                       compatible = "spacemit,k1-uart", "intel,xscale-uart";
> -                       reg = <0x0 0xd4017000 0x0 0x100>;
> -                       clocks = <&syscon_apbc CLK_UART0>,
> -                                <&syscon_apbc CLK_UART0_BUS>;
> -                       clock-names = "core", "bus";
> -                       interrupts = <42>;
> -                       reg-shift = <2>;
> -                       reg-io-width = <4>;
> -                       status = "disabled";
> -               };
> -
> -               uart2: serial@...17100 {
> -                       compatible = "spacemit,k1-uart", "intel,xscale-uart";
> -                       reg = <0x0 0xd4017100 0x0 0x100>;
> -                       clocks = <&syscon_apbc CLK_UART2>,
> -                                <&syscon_apbc CLK_UART2_BUS>;
> -                       clock-names = "core", "bus";
> -                       interrupts = <44>;
> -                       reg-shift = <2>;
> -                       reg-io-width = <4>;
> -                       status = "disabled";
> -               };
> -
> -               uart3: serial@...17200 {
> -                       compatible = "spacemit,k1-uart", "intel,xscale-uart";
> -                       reg = <0x0 0xd4017200 0x0 0x100>;
> -                       clocks = <&syscon_apbc CLK_UART3>,
> -                                <&syscon_apbc CLK_UART3_BUS>;
> -                       clock-names = "core", "bus";
> -                       interrupts = <45>;
> -                       reg-shift = <2>;
> -                       reg-io-width = <4>;
> -                       status = "disabled";
> -               };
> -
> -               uart4: serial@...17300 {
> -                       compatible = "spacemit,k1-uart", "intel,xscale-uart";
> -                       reg = <0x0 0xd4017300 0x0 0x100>;
> -                       clocks = <&syscon_apbc CLK_UART4>,
> -                                <&syscon_apbc CLK_UART4_BUS>;
> -                       clock-names = "core", "bus";
> -                       interrupts = <46>;
> -                       reg-shift = <2>;
> -                       reg-io-width = <4>;
> -                       status = "disabled";
> -               };
> -
> -               uart5: serial@...17400 {
> -                       compatible = "spacemit,k1-uart", "intel,xscale-uart";
> -                       reg = <0x0 0xd4017400 0x0 0x100>;
> -                       clocks = <&syscon_apbc CLK_UART5>,
> -                                <&syscon_apbc CLK_UART5_BUS>;
> -                       clock-names = "core", "bus";
> -                       interrupts = <47>;
> -                       reg-shift = <2>;
> -                       reg-io-width = <4>;
> -                       status = "disabled";
> -               };
> -
> -               uart6: serial@...17500 {
> -                       compatible = "spacemit,k1-uart", "intel,xscale-uart";
> -                       reg = <0x0 0xd4017500 0x0 0x100>;
> -                       clocks = <&syscon_apbc CLK_UART6>,
> -                                <&syscon_apbc CLK_UART6_BUS>;
> -                       clock-names = "core", "bus";
> -                       interrupts = <48>;
> -                       reg-shift = <2>;
> -                       reg-io-width = <4>;
> -                       status = "disabled";
> -               };
> -
> -               uart7: serial@...17600 {
> -                       compatible = "spacemit,k1-uart", "intel,xscale-uart";
> -                       reg = <0x0 0xd4017600 0x0 0x100>;
> -                       clocks = <&syscon_apbc CLK_UART7>,
> -                                <&syscon_apbc CLK_UART7_BUS>;
> -                       clock-names = "core", "bus";
> -                       interrupts = <49>;
> -                       reg-shift = <2>;
> -                       reg-io-width = <4>;
> -                       status = "disabled";
> -               };
> -
> -               uart8: serial@...17700 {
> -                       compatible = "spacemit,k1-uart", "intel,xscale-uart";
> -                       reg = <0x0 0xd4017700 0x0 0x100>;
> -                       clocks = <&syscon_apbc CLK_UART8>,
> -                                <&syscon_apbc CLK_UART8_BUS>;
> -                       clock-names = "core", "bus";
> -                       interrupts = <50>;
> -                       reg-shift = <2>;
> -                       reg-io-width = <4>;
> -                       status = "disabled";
> -               };
> -
> -               uart9: serial@...17800 {
> -                       compatible = "spacemit,k1-uart", "intel,xscale-uart";
> -                       reg = <0x0 0xd4017800 0x0 0x100>;
> -                       clocks = <&syscon_apbc CLK_UART9>,
> -                                <&syscon_apbc CLK_UART9_BUS>;
> -                       clock-names = "core", "bus";
> -                       interrupts = <51>;
> -                       reg-shift = <2>;
> -                       reg-io-width = <4>;
> -                       status = "disabled";
> -               };
> -
>                 gpio: gpio@...19000 {
>                         compatible = "spacemit,k1-gpio";
>                         reg = <0x0 0xd4019000 0x0 0x100>;
> @@ -562,16 +454,6 @@ clint: timer@...00000 {
>                                               <&cpu7_intc 3>, <&cpu7_intc 7>;
>                 };
>
> -               sec_uart1: serial@...12000 {
> -                       compatible = "spacemit,k1-uart", "intel,xscale-uart";
> -                       reg = <0x0 0xf0612000 0x0 0x100>;
> -                       interrupts = <43>;
> -                       clock-frequency = <14857000>;
> -                       reg-shift = <2>;
> -                       reg-io-width = <4>;
> -                       status = "reserved"; /* for TEE usage */
> -               };
> -

Are you sure sec_uart1 should be placed under the dma_bus? Please double
check. If sec_uart1 and other peripherals supported by the secure DMA
(base address: 0xF0600000) share the same address mapping as dma_bus, and
if they can be accessed by the linux kernel in some cases (as saying
'reserved'), then that makes sense. If not, better not move them.

--
Guodong

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ