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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAHAQgRDLmKJQ1sp76q4s7P4E_=nYuw199ceGCR0LYeq3331tLQ@mail.gmail.com>
Date:   Thu, 21 Sep 2023 18:27:09 +0800
From:   Chen Wang <unicornxw@...il.com>
To:     Conor Dooley <conor@...nel.org>
Cc:     Conor Dooley <conor.dooley@...rochip.com>, aou@...s.berkeley.edu,
        chao.wei@...hgo.com, devicetree@...r.kernel.org,
        emil.renner.berthing@...onical.com, guoren@...nel.org,
        jszhang@...nel.org, krzysztof.kozlowski+dt@...aro.org,
        linux-kernel@...r.kernel.org, linux-riscv@...ts.infradead.org,
        palmer@...belt.com, paul.walmsley@...ive.com, robh+dt@...nel.org,
        xiaoguang.xing@...hgo.com, Chen Wang <wangchen20@...as.ac.cn>,
        Inochi Amaoto <inochiama@...look.com>
Subject: Re: [PATCH v2 09/11] riscv: dts: add initial SOPHGO SG2042 SoC device tree

Regards,

unicornx

Conor Dooley <conor@...nel.org> 于2023年9月21日周四 18:15写道:
>
> On Thu, Sep 21, 2023 at 05:56:28PM +0800, Chen Wang wrote:
> > Regards,
> >
> > unicornx
> >
......
> > > > +
> > > > +/ {
> > > > +     compatible = "sophgo,sg2042";
> > > > +     #address-cells = <2>;
> > > > +     #size-cells = <2>;
> > > > +     dma-noncoherent;
> > > > +
> > > > +     aliases {
> > > > +             serial0 = &uart0;
> > > > +     };
> > > > +
> > > > +     /* the mem node will be updated by ZSBL. */
> > >
> > > huh? So these are random numbers below? Either put something useful here
> > > or delete it please.
> >
> > The memory for SG2042 is not fixed, the bootloader will detect memory
> > installed on board during booting and fill the actual address and size
> > in the memory node. The comment " /* the mem node will be updated by
> > ZSBL. */" is telling this.
>
> Yes, I read the comment!
>
> > We write memory nodes like this to make them act just as placeholders
> > and the value is by default written as zero.
>
> Why knowingly add something that is wrong, rather than omitting them
> entirely?
>
> Thanks,
> Conor.
>

We learn this from arch/arm64/boot/dts/hisilicon/hi3660-hikey960.dts,
it writes DTS as following:

```
        memory@0 {
                device_type = "memory";
                /* rewrite this at bootloader */
                reg = <0x0 0x0 0x0 0x0>;
        };
```
So you mean we can totally remove the memory nodes in DTS and make
bootloader add it by itself? That sounds a good idea, I will have a
try. I used to think memory nodes are must-have in DTS.


> >
> >
> > >
> > > > +     memory@0 {
> > > > +             device_type = "memory";
> > > > +             reg = <0x00000000 0x00000000 0x00000000 0x00000000>;
> > > > +     };
> > > > +

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ