schemas: chosen: Add 'boot-hart-id' property
PATCH 1/1 schemas: chosen: Add 'boot-hart-id' property
Add 'boot-hart-id' property to allow user to specify preferred cold boot HART in OpenSBI for StarFive JH7110 platform.
--- dtschema/schemas/chosen.yaml | 13 +++++++++++++ 1 file changed, 13 insertions(+)
dtschema/schemas/chosen.yaml +13 -0
@@ -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
Signature · 1 line
2.25.1
A message that is not in the archive (sent off-list or not yet received): 20230103032522.36353-1-weiliang.lim-bONrM45KWFOXmMXjJBpWqg@public.gmane.org
Quoted 2 lines · Wei Liang Lim
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.
Quoted 12 lines
Signed-off-by Wei Liang Lim <[email protected]>Reviewed-by Chee Hong Ang <[email protected]>Reviewed-by Jun Liang Tan <[email protected]>--- dtschema/schemas/chosen.yaml | 13 +++++++++++++ 1 file changed, 13 insertions(+)dtschema/schemas/chosen.yaml +0
-0
dtschema/schemas/chosen.yaml properties: · line 36
Quoted 6 lines
dtschema/schemas/chosen.yaml +3
-0@@ -31,6 +31,19 @@ properties: bootargs: $ref: types.yaml#/definitions/string + + boot-hart-id: + type: integer
Never the right type for a property.
dtschema/schemas/chosen.yaml properties: · line 39
Quoted 3 lines
dtschema/schemas/chosen.yaml +3
-0+ 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...
dtschema/schemas/chosen.yaml properties: · line 46
Quoted 7 lines
dtschema/schemas/chosen.yaml +7
-0+ will be used. e.g. + + /{ + chosen { + boot-hart-id = <1>; + }; + };
Drop the example.
Quoted 6 lines
dtschema/schemas/chosen.yaml +0
-1kaslr-seed: $ref: types.yaml#/definitions/uint64 --2.25.1
A message that is not in the archive (sent off-list or not yet received): CAL_JsqLaSS=TG23Xh1gPR1ooGBmAgia1c-p7JtAdvsUZskiqNw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org
Quoted 55 lines
-----Original Message-----
From: Rob Herring <[email protected]>
Sent: Tuesday, January 3, 2023 11:22 PM
To: WeiLiang Lim <[email protected]>
Cc: [email protected]; Cheehong Ang <[email protected]>; JunLiang Tan <[email protected]>
Subject: Re: [PATCH] schemas: chosen: Add 'boot-hart-id' propertyQuoted 2 lines · Wei Liang Lim
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.
Quoted 12 lines
Signed-off-by Wei Liang Lim <[email protected]>Reviewed-by Chee Hong Ang <[email protected]>Reviewed-by Jun Liang Tan <[email protected]>--- dtschema/schemas/chosen.yaml | 13 +++++++++++++ 1 file changed, 13 insertions(+)(quoted diff) +0
-0
b/dtschema/schemas/chosen.yamlindex 86194dd..f88feb5 100644dtschema/schemas/chosen.yaml properties: · line 36
Quoted 6 lines
dtschema/schemas/chosen.yaml +3
-0@@ -31,6 +31,19 @@ properties: bootargs: $ref: types.yaml#/definitions/string + + boot-hart-id: + type: integerNever the right type for a property.
dtschema/schemas/chosen.yaml properties: · line 38
Quoted 2 lines
dtschema/schemas/chosen.yaml +2
-0+ description: + This property allows user to specify preferred cold boot HART inOpenSBI
dtschema/schemas/chosen.yaml properties: · line 40
Quoted 2 lines
dtschema/schemas/chosen.yaml +2
-0+ for StarFive JH7110 platform. If unspecified, the existing + lottery mechanismSpecific 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?
Quoted 6 lines
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.
Quoted 16 lines
dtschema/schemas/chosen.yaml properties: · line 46
Quoted 7 lines
dtschema/schemas/chosen.yaml +7
-0+ will be used. e.g. + + /{ + chosen { + boot-hart-id = <1>; + }; + };Drop the example.
Quoted 6 lines
dtschema/schemas/chosen.yaml +0
-1kaslr-seed: $ref: types.yaml#/definitions/uint64 --2.25.1