* [PATCH] schemas: chosen: Add 'boot-hart-id' property
@ 2023-01-03 3:25 Wei Liang Lim
[not found] ` <20230103032522.36353-1-weiliang.lim-bONrM45KWFOXmMXjJBpWqg@public.gmane.org>
0 siblings, 1 reply; 3+ messages in thread
From: Wei Liang Lim @ 2023-01-03 3:25 UTC (permalink / raw)
To: devicetree-spec-u79uwXL29TY76Z2rM5mHXA
Cc: cheehong.ang-bONrM45KWFOXmMXjJBpWqg,
junliang.tan-bONrM45KWFOXmMXjJBpWqg,
weiliang.lim-bONrM45KWFOXmMXjJBpWqg
Add 'boot-hart-id' property to allow user to specify preferred cold boot HART in OpenSBI for StarFive JH7110 platform.
Signed-off-by: Wei Liang Lim <weiliang.lim-bONrM45KWFOXmMXjJBpWqg@public.gmane.org>
Reviewed-by: Chee Hong Ang <cheehong.ang-bONrM45KWFOXmMXjJBpWqg@public.gmane.org>
Reviewed-by: Jun Liang Tan <junliang.tan-bONrM45KWFOXmMXjJBpWqg@public.gmane.org>
---
dtschema/schemas/chosen.yaml | 13 +++++++++++++
1 file changed, 13 insertions(+)
diff --git a/dtschema/schemas/chosen.yaml b/dtschema/schemas/chosen.yaml
index 86194dd..f88feb5 100644
--- a/dtschema/schemas/chosen.yaml
+++ b/dtschema/schemas/chosen.yaml
@@ -31,6 +31,19 @@ properties:
bootargs:
$ref: types.yaml#/definitions/string
+
+ boot-hart-id:
+ type: integer
+ description:
+ This property allows user to specify preferred cold boot HART in OpenSBI
+ for StarFive JH7110 platform. If unspecified, the existing lottery mechanism
+ will be used. e.g.
+
+ /{
+ chosen {
+ boot-hart-id = <1>;
+ };
+ };
kaslr-seed:
$ref: types.yaml#/definitions/uint64
--
2.25.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] schemas: chosen: Add 'boot-hart-id' property
[not found] ` <20230103032522.36353-1-weiliang.lim-bONrM45KWFOXmMXjJBpWqg@public.gmane.org>
@ 2023-01-03 15:22 ` Rob Herring
[not found] ` <CAL_JsqLaSS=TG23Xh1gPR1ooGBmAgia1c-p7JtAdvsUZskiqNw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
0 siblings, 1 reply; 3+ messages in thread
From: Rob Herring @ 2023-01-03 15:22 UTC (permalink / raw)
To: Wei Liang Lim
Cc: devicetree-spec-u79uwXL29TY76Z2rM5mHXA,
cheehong.ang-bONrM45KWFOXmMXjJBpWqg,
junliang.tan-bONrM45KWFOXmMXjJBpWqg
On Mon, Jan 2, 2023 at 9:25 PM Wei Liang Lim
<weiliang.lim-bONrM45KWFOXmMXjJBpWqg@public.gmane.org> wrote:
>
> Add 'boot-hart-id' property to allow user to specify preferred cold boot HART in OpenSBI for StarFive JH7110 platform.
The commit message should answer why is this needed, not what is the
change. Present the problem you are trying to solve with this change,
not just the solution you came up with.
> Signed-off-by: Wei Liang Lim <weiliang.lim-bONrM45KWFOXmMXjJBpWqg@public.gmane.org>
> Reviewed-by: Chee Hong Ang <cheehong.ang-bONrM45KWFOXmMXjJBpWqg@public.gmane.org>
> Reviewed-by: Jun Liang Tan <junliang.tan-bONrM45KWFOXmMXjJBpWqg@public.gmane.org>
> ---
> dtschema/schemas/chosen.yaml | 13 +++++++++++++
> 1 file changed, 13 insertions(+)
>
> diff --git a/dtschema/schemas/chosen.yaml b/dtschema/schemas/chosen.yaml
> index 86194dd..f88feb5 100644
> --- a/dtschema/schemas/chosen.yaml
> +++ b/dtschema/schemas/chosen.yaml
> @@ -31,6 +31,19 @@ properties:
>
> bootargs:
> $ref: types.yaml#/definitions/string
> +
> + boot-hart-id:
> + type: integer
Never the right type for a property.
> + description:
> + This property allows user to specify preferred cold boot HART in OpenSBI
> + for StarFive JH7110 platform. If unspecified, the existing lottery mechanism
Specific to StarFive JH7110?
A HART in DT terms is just a CPU, so I think whatever we have should
be generic. Possibly other arches could use this.
Who consumes this? /chosen is consumed by the OS. When you boot into
the OS, you already know the boot CPU because it is the one you are
running on. So this is meant to be consumed by OpenSBI firmware?
Also, read how 'status' is supposed to work for CPUs in the DT spec.
That didn't get followed for Arm, but could possibly work here. The DT
passed to OpenSBI has all but the boot CPU disabled and OpenSBI can
enable the other CPUs. Just guessing since you've given no details of
the problem this solves...
> + will be used. e.g.
> +
> + /{
> + chosen {
> + boot-hart-id = <1>;
> + };
> + };
Drop the example.
>
> kaslr-seed:
> $ref: types.yaml#/definitions/uint64
> --
> 2.25.1
>
^ permalink raw reply [flat|nested] 3+ messages in thread
* RE: [PATCH] schemas: chosen: Add 'boot-hart-id' property
[not found] ` <CAL_JsqLaSS=TG23Xh1gPR1ooGBmAgia1c-p7JtAdvsUZskiqNw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
@ 2023-01-05 2:06 ` WeiLiang Lim
0 siblings, 0 replies; 3+ messages in thread
From: WeiLiang Lim @ 2023-01-05 2:06 UTC (permalink / raw)
To: Rob Herring
Cc: devicetree-spec-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
Cheehong Ang, JunLiang Tan
> -----Original Message-----
> From: Rob Herring <robh@kernel.org>
> Sent: Tuesday, January 3, 2023 11:22 PM
> To: WeiLiang Lim <weiliang.lim@starfivetech.com>
> Cc: devicetree-spec@vger.kernel.org; Cheehong Ang
> <cheehong.ang@starfivetech.com>; JunLiang Tan
> <junliang.tan@starfivetech.com>
> Subject: Re: [PATCH] schemas: chosen: Add 'boot-hart-id' property
>
> On Mon, Jan 2, 2023 at 9:25 PM Wei Liang Lim
> <weiliang.lim@starfivetech.com> wrote:
> >
> > Add 'boot-hart-id' property to allow user to specify preferred cold boot HART
> in OpenSBI for StarFive JH7110 platform.
>
> The commit message should answer why is this needed, not what is the
> change. Present the problem you are trying to solve with this change, not just
> the solution you came up with.
>
> > Signed-off-by: Wei Liang Lim <weiliang.lim@starfivetech.com>
> > Reviewed-by: Chee Hong Ang <cheehong.ang@starfivetech.com>
> > Reviewed-by: Jun Liang Tan <junliang.tan@starfivetech.com>
> > ---
> > dtschema/schemas/chosen.yaml | 13 +++++++++++++
> > 1 file changed, 13 insertions(+)
> >
> > diff --git a/dtschema/schemas/chosen.yaml
> > b/dtschema/schemas/chosen.yaml index 86194dd..f88feb5 100644
> > --- a/dtschema/schemas/chosen.yaml
> > +++ b/dtschema/schemas/chosen.yaml
> > @@ -31,6 +31,19 @@ properties:
> >
> > bootargs:
> > $ref: types.yaml#/definitions/string
> > +
> > + boot-hart-id:
> > + type: integer
>
> Never the right type for a property.
>
> > + description:
> > + This property allows user to specify preferred cold boot HART in
> OpenSBI
> > + for StarFive JH7110 platform. If unspecified, the existing
> > + lottery mechanism
>
> Specific to StarFive JH7110?
>
> A HART in DT terms is just a CPU, so I think whatever we have should be
> generic. Possibly other arches could use this.
>
> Who consumes this? /chosen is consumed by the OS. When you boot into the
> OS, you already know the boot CPU because it is the one you are running on.
> So this is meant to be consumed by OpenSBI firmware?
>
> Also, read how 'status' is supposed to work for CPUs in the DT spec.
> That didn't get followed for Arm, but could possibly work here. The DT passed
> to OpenSBI has all but the boot CPU disabled and OpenSBI can enable the
> other CPUs. Just guessing since you've given no details of the problem this
> solves...
>
This change is targeted for RISC-V platform which the boot hart is randomly selected through a lottery mechanism by default in OpenSBI (TF-A equivalent on ARM platform). This property is an option for user to select preferred cold boot hart. If unspecified, the default lottery mechanism will be used.
This is mainly to solve some product requirements which a preferred cold boot hart is required.
> > + will be used. e.g.
> > +
> > + /{
> > + chosen {
> > + boot-hart-id = <1>;
> > + };
> > + };
>
> Drop the example.
>
> >
> > kaslr-seed:
> > $ref: types.yaml#/definitions/uint64
> > --
> > 2.25.1
> >
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2023-01-05 2:06 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-01-03 3:25 [PATCH] schemas: chosen: Add 'boot-hart-id' property Wei Liang Lim
[not found] ` <20230103032522.36353-1-weiliang.lim-bONrM45KWFOXmMXjJBpWqg@public.gmane.org>
2023-01-03 15:22 ` Rob Herring
[not found] ` <CAL_JsqLaSS=TG23Xh1gPR1ooGBmAgia1c-p7JtAdvsUZskiqNw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2023-01-05 2:06 ` WeiLiang Lim
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).