2023-05-09 11:19:56

by Souradeep Chowdhury

[permalink] [raw]
Subject: [PATCH V6 0/3] soc: qcom: boot_stats: Add driver support for boot_stats

Qualcomm's proprietary Android boot-loaders capture boot time
stats, like the time when the bootloader started execution and at what
point the bootloader handed over control to the kernel etc. in the IMEM
region. This information is captured in a specific format by this driver
by mapping a structure to the IMEM memory region and then accessing the
members of the structure to log the information in a debugfs file.
This information is useful in verifying if existing boot KPIs have
regressed or not.

A sample log in SM8450(waipio) device is as follows:-

/sys/kernel/debug/qcom_boot_stats # cat abl_time
17898 ms
/sys/kernel/debug/qcom_boot_stats # cat pre_abl_time
2879 ms

The Module Power Manager(MPM) sleep counter starts ticking at the PBL
stage and the timestamp generated by the sleep counter is logged by
the Qualcomm proprietary bootloader(ABL) at two points-> First when it
starts execution which is logged here as "pre_abl_time" and the second
when it is about to load the kernel logged as "abl_time". Both these
values are read up by the driver from IMEM region and printed as above.

Changes in V6

*Implemented the comments on V4 and V5 of the patch

Souradeep Chowdhury (3):
dt-bindings: sram: qcom,imem: Add Boot Stat region within IMEM
soc: qcom: boot_stat: Add Driver Support for Boot Stats
MAINTAINERS: Add the entry for boot_stats driver support

.../ABI/testing/debugfs-driver-bootstat | 17 +++
.../devicetree/bindings/sram/qcom,imem.yaml | 22 ++++
MAINTAINERS | 7 ++
drivers/soc/qcom/Kconfig | 10 ++
drivers/soc/qcom/Makefile | 1 +
drivers/soc/qcom/boot_stats.c | 100 ++++++++++++++++++
6 files changed, 157 insertions(+)
create mode 100644 Documentation/ABI/testing/debugfs-driver-bootstat
create mode 100644 drivers/soc/qcom/boot_stats.c

--
2.17.1


2023-05-09 11:20:59

by Souradeep Chowdhury

[permalink] [raw]
Subject: [PATCH V6 1/3] dt-bindings: sram: qcom,imem: Add Boot Stat region within IMEM

All Qualcomm bootloaders log useful timestamp information related
to bootloader stats in the IMEM region. Add the child node within
IMEM for the boot stat region containing register address and
compatible string.

Signed-off-by: Souradeep Chowdhury <[email protected]>
Reviewed-by: Krzysztof Kozlowski <[email protected]>
---
.../devicetree/bindings/sram/qcom,imem.yaml | 22 +++++++++++++++++++
1 file changed, 22 insertions(+)

diff --git a/Documentation/devicetree/bindings/sram/qcom,imem.yaml b/Documentation/devicetree/bindings/sram/qcom,imem.yaml
index 0548e8e0d30b..bb884c5c8952 100644
--- a/Documentation/devicetree/bindings/sram/qcom,imem.yaml
+++ b/Documentation/devicetree/bindings/sram/qcom,imem.yaml
@@ -50,6 +50,28 @@ patternProperties:
$ref: /schemas/remoteproc/qcom,pil-info.yaml#
description: Peripheral image loader relocation region

+ "^stats@[0-9a-f]+$":
+ type: object
+ description:
+ Imem region dedicated for storing timestamps related
+ information regarding bootstats.
+
+ additionalProperties: false
+
+ properties:
+ compatible:
+ items:
+ - enum:
+ - qcom,sm8450-bootstats
+ - const: qcom,imem-bootstats
+
+ reg:
+ maxItems: 1
+
+ required:
+ - compatible
+ - reg
+
required:
- compatible
- reg
--
2.17.1

2023-05-09 11:56:16

by Dmitry Baryshkov

[permalink] [raw]
Subject: Re: [PATCH V6 1/3] dt-bindings: sram: qcom,imem: Add Boot Stat region within IMEM

On Tue, 9 May 2023 at 13:53, Souradeep Chowdhury
<[email protected]> wrote:
>
> All Qualcomm bootloaders log useful timestamp information related
> to bootloader stats in the IMEM region. Add the child node within
> IMEM for the boot stat region containing register address and
> compatible string.

I might have a minor vote here. Is there any reason why you have to
instantiate the device from DT?
It looks like a software interface. Ideally software should not be
described in DT (e.g. this can be instantiated from imem
driver-to-be).
Or we can follow the RPM master-stats approach, where the device is a
top-level device, having handle pointers to the sram regions.

>
> Signed-off-by: Souradeep Chowdhury <[email protected]>
> Reviewed-by: Krzysztof Kozlowski <[email protected]>
> ---
> .../devicetree/bindings/sram/qcom,imem.yaml | 22 +++++++++++++++++++
> 1 file changed, 22 insertions(+)
>
> diff --git a/Documentation/devicetree/bindings/sram/qcom,imem.yaml b/Documentation/devicetree/bindings/sram/qcom,imem.yaml
> index 0548e8e0d30b..bb884c5c8952 100644
> --- a/Documentation/devicetree/bindings/sram/qcom,imem.yaml
> +++ b/Documentation/devicetree/bindings/sram/qcom,imem.yaml
> @@ -50,6 +50,28 @@ patternProperties:
> $ref: /schemas/remoteproc/qcom,pil-info.yaml#
> description: Peripheral image loader relocation region
>
> + "^stats@[0-9a-f]+$":
> + type: object
> + description:
> + Imem region dedicated for storing timestamps related
> + information regarding bootstats.
> +
> + additionalProperties: false
> +
> + properties:
> + compatible:
> + items:
> + - enum:
> + - qcom,sm8450-bootstats
> + - const: qcom,imem-bootstats
> +
> + reg:
> + maxItems: 1
> +
> + required:
> + - compatible
> + - reg
> +
> required:
> - compatible
> - reg
> --
> 2.17.1
>


--
With best wishes
Dmitry

2023-05-09 12:27:42

by Souradeep Chowdhury

[permalink] [raw]
Subject: Re: [PATCH V6 1/3] dt-bindings: sram: qcom,imem: Add Boot Stat region within IMEM



On 5/9/2023 5:05 PM, Dmitry Baryshkov wrote:
> On Tue, 9 May 2023 at 13:53, Souradeep Chowdhury
> <[email protected]> wrote:
>>
>> All Qualcomm bootloaders log useful timestamp information related
>> to bootloader stats in the IMEM region. Add the child node within
>> IMEM for the boot stat region containing register address and
>> compatible string.
>
> I might have a minor vote here. Is there any reason why you have to
> instantiate the device from DT?
> It looks like a software interface. Ideally software should not be
> described in DT (e.g. this can be instantiated from imem
> driver-to-be).
> Or we can follow the RPM master-stats approach, where the device is a
> top-level device, having handle pointers to the sram regions.

This is a dedicated region of IMEM reserved for storing stats related
information. So it is represented as a child of IMEM, please
refer to Documentation/devicetree/bindings/sram/sram.yaml which
follows a similar philosophy. Also since this is a child of IMEM with
a specific purpose, does it not warrant a dedicated driver?

>
>>
>> Signed-off-by: Souradeep Chowdhury <[email protected]>
>> Reviewed-by: Krzysztof Kozlowski <[email protected]>
>> ---
>> .../devicetree/bindings/sram/qcom,imem.yaml | 22 +++++++++++++++++++
>> 1 file changed, 22 insertions(+)
>>
>> diff --git a/Documentation/devicetree/bindings/sram/qcom,imem.yaml b/Documentation/devicetree/bindings/sram/qcom,imem.yaml
>> index 0548e8e0d30b..bb884c5c8952 100644
>> --- a/Documentation/devicetree/bindings/sram/qcom,imem.yaml
>> +++ b/Documentation/devicetree/bindings/sram/qcom,imem.yaml
>> @@ -50,6 +50,28 @@ patternProperties:
>> $ref: /schemas/remoteproc/qcom,pil-info.yaml#
>> description: Peripheral image loader relocation region
>>
>> + "^stats@[0-9a-f]+$":
>> + type: object
>> + description:
>> + Imem region dedicated for storing timestamps related
>> + information regarding bootstats.
>> +
>> + additionalProperties: false
>> +
>> + properties:
>> + compatible:
>> + items:
>> + - enum:
>> + - qcom,sm8450-bootstats
>> + - const: qcom,imem-bootstats
>> +
>> + reg:
>> + maxItems: 1
>> +
>> + required:
>> + - compatible
>> + - reg
>> +
>> required:
>> - compatible
>> - reg
>> --
>> 2.17.1
>>
>
>

2023-05-09 13:17:23

by Dmitry Baryshkov

[permalink] [raw]
Subject: Re: [PATCH V6 1/3] dt-bindings: sram: qcom,imem: Add Boot Stat region within IMEM

On Tue, 9 May 2023 at 15:21, Souradeep Chowdhury
<[email protected]> wrote:
>
>
>
> On 5/9/2023 5:05 PM, Dmitry Baryshkov wrote:
> > On Tue, 9 May 2023 at 13:53, Souradeep Chowdhury
> > <[email protected]> wrote:
> >>
> >> All Qualcomm bootloaders log useful timestamp information related
> >> to bootloader stats in the IMEM region. Add the child node within
> >> IMEM for the boot stat region containing register address and
> >> compatible string.
> >
> > I might have a minor vote here. Is there any reason why you have to
> > instantiate the device from DT?
> > It looks like a software interface. Ideally software should not be
> > described in DT (e.g. this can be instantiated from imem
> > driver-to-be).
> > Or we can follow the RPM master-stats approach, where the device is a
> > top-level device, having handle pointers to the sram regions.
>
> This is a dedicated region of IMEM reserved for storing stats related
> information. So it is represented as a child of IMEM, please
> refer to Documentation/devicetree/bindings/sram/sram.yaml which
> follows a similar philosophy. Also since this is a child of IMEM with
> a specific purpose, does it not warrant a dedicated driver?

I do not question a dedicated driver. I was asking about the DT node.
Even the mentioned bindings file describes the SRAM regions inside the
SRAM, rather than a proper device to be instantiated in the SRAM node.
I'd point to the boot_stats discussions (present on the list in the
last several months).

>
> >
> >>
> >> Signed-off-by: Souradeep Chowdhury <[email protected]>
> >> Reviewed-by: Krzysztof Kozlowski <[email protected]>
> >> ---
> >> .../devicetree/bindings/sram/qcom,imem.yaml | 22 +++++++++++++++++++
> >> 1 file changed, 22 insertions(+)
> >>
> >> diff --git a/Documentation/devicetree/bindings/sram/qcom,imem.yaml b/Documentation/devicetree/bindings/sram/qcom,imem.yaml
> >> index 0548e8e0d30b..bb884c5c8952 100644
> >> --- a/Documentation/devicetree/bindings/sram/qcom,imem.yaml
> >> +++ b/Documentation/devicetree/bindings/sram/qcom,imem.yaml
> >> @@ -50,6 +50,28 @@ patternProperties:
> >> $ref: /schemas/remoteproc/qcom,pil-info.yaml#
> >> description: Peripheral image loader relocation region
> >>
> >> + "^stats@[0-9a-f]+$":
> >> + type: object
> >> + description:
> >> + Imem region dedicated for storing timestamps related
> >> + information regarding bootstats.
> >> +
> >> + additionalProperties: false
> >> +
> >> + properties:
> >> + compatible:
> >> + items:
> >> + - enum:
> >> + - qcom,sm8450-bootstats
> >> + - const: qcom,imem-bootstats
> >> +
> >> + reg:
> >> + maxItems: 1
> >> +
> >> + required:
> >> + - compatible
> >> + - reg
> >> +
> >> required:
> >> - compatible
> >> - reg
> >> --
> >> 2.17.1
> >>
> >
> >



--
With best wishes
Dmitry

2023-05-11 06:19:28

by Souradeep Chowdhury

[permalink] [raw]
Subject: Re: [PATCH V6 1/3] dt-bindings: sram: qcom,imem: Add Boot Stat region within IMEM



On 5/9/2023 6:35 PM, Dmitry Baryshkov wrote:
> On Tue, 9 May 2023 at 15:21, Souradeep Chowdhury
> <[email protected]> wrote:
>>
>>
>>
>> On 5/9/2023 5:05 PM, Dmitry Baryshkov wrote:
>>> On Tue, 9 May 2023 at 13:53, Souradeep Chowdhury
>>> <[email protected]> wrote:
>>>>
>>>> All Qualcomm bootloaders log useful timestamp information related
>>>> to bootloader stats in the IMEM region. Add the child node within
>>>> IMEM for the boot stat region containing register address and
>>>> compatible string.
>>>
>>> I might have a minor vote here. Is there any reason why you have to
>>> instantiate the device from DT?
>>> It looks like a software interface. Ideally software should not be
>>> described in DT (e.g. this can be instantiated from imem
>>> driver-to-be).
>>> Or we can follow the RPM master-stats approach, where the device is a
>>> top-level device, having handle pointers to the sram regions.
>>
>> This is a dedicated region of IMEM reserved for storing stats related
>> information. So it is represented as a child of IMEM, please
>> refer to Documentation/devicetree/bindings/sram/sram.yaml which
>> follows a similar philosophy. Also since this is a child of IMEM with
>> a specific purpose, does it not warrant a dedicated driver?
>
> I do not question a dedicated driver. I was asking about the DT node.
> Even the mentioned bindings file describes the SRAM regions inside the
> SRAM, rather than a proper device to be instantiated in the SRAM node.
> I'd point to the boot_stats discussions (present on the list in the
> last several months).
>

Ack. Will instantiate the device from the parent node in the driver and
access the stats region to print the boot_stats information.


>>
>>>
>>>>
>>>> Signed-off-by: Souradeep Chowdhury <[email protected]>
>>>> Reviewed-by: Krzysztof Kozlowski <[email protected]>
>>>> ---
>>>> .../devicetree/bindings/sram/qcom,imem.yaml | 22 +++++++++++++++++++
>>>> 1 file changed, 22 insertions(+)
>>>>
>>>> diff --git a/Documentation/devicetree/bindings/sram/qcom,imem.yaml b/Documentation/devicetree/bindings/sram/qcom,imem.yaml
>>>> index 0548e8e0d30b..bb884c5c8952 100644
>>>> --- a/Documentation/devicetree/bindings/sram/qcom,imem.yaml
>>>> +++ b/Documentation/devicetree/bindings/sram/qcom,imem.yaml
>>>> @@ -50,6 +50,28 @@ patternProperties:
>>>> $ref: /schemas/remoteproc/qcom,pil-info.yaml#
>>>> description: Peripheral image loader relocation region
>>>>
>>>> + "^stats@[0-9a-f]+$":
>>>> + type: object
>>>> + description:
>>>> + Imem region dedicated for storing timestamps related
>>>> + information regarding bootstats.
>>>> +
>>>> + additionalProperties: false
>>>> +
>>>> + properties:
>>>> + compatible:
>>>> + items:
>>>> + - enum:
>>>> + - qcom,sm8450-bootstats
>>>> + - const: qcom,imem-bootstats
>>>> +
>>>> + reg:
>>>> + maxItems: 1
>>>> +
>>>> + required:
>>>> + - compatible
>>>> + - reg
>>>> +
>>>> required:
>>>> - compatible
>>>> - reg
>>>> --
>>>> 2.17.1
>>>>
>>>
>>>
>
>
>

2023-05-16 08:35:24

by Arnd Bergmann

[permalink] [raw]
Subject: Re: [PATCH V6 1/3] dt-bindings: sram: qcom,imem: Add Boot Stat region within IMEM

On Tue, May 9, 2023, at 13:35, Dmitry Baryshkov wrote:
> On Tue, 9 May 2023 at 13:53, Souradeep Chowdhury
> <[email protected]> wrote:
>>
>> All Qualcomm bootloaders log useful timestamp information related
>> to bootloader stats in the IMEM region. Add the child node within
>> IMEM for the boot stat region containing register address and
>> compatible string.
>
> I might have a minor vote here. Is there any reason why you have to
> instantiate the device from DT?
> It looks like a software interface. Ideally software should not be
> described in DT (e.g. this can be instantiated from imem
> driver-to-be).

There is nothing wrong with describing firmware in DT, if that
firmware is part of the platform, we do that for a lot of
other bits of firmware.

However, in this specific case, many things are wrong with the
implementation, and neither the DT binding nor the driver
makes sense to me in its current state.

>> + "^stats@[0-9a-f]+$":
>> + type: object
>> + description:
>> + Imem region dedicated for storing timestamps related
>> + information regarding bootstats.
>> +
>> + additionalProperties: false
>> +
>> + properties:
>> + compatible:
>> + items:
>> + - enum:
>> + - qcom,sm8450-bootstats
>> + - const: qcom,imem-bootstats
>> +
>> + reg:
>> + maxItems: 1

If I understand this right, this "qcom,imem-bootstats"
device serves as an indirection to store additional
properties of the system in a memory area, but the description
of that area is more complex than its contents, which
makes no sense to me.

Just create a binding for a firmware node in the devicetree
itself, and put the values in properties of that. The first
stage firmware can still use the same interface, but the
actual loader that assembles the DT can get it out of that
and store it in the properties. With that done, there is also
no need for a kernel driver, as userspace can just get the
values from /sys/firmware/devicetree/ directly.

Arnd

2023-05-16 18:47:35

by Trilok Soni

[permalink] [raw]
Subject: Re: [PATCH V6 1/3] dt-bindings: sram: qcom,imem: Add Boot Stat region within IMEM

On 5/16/2023 1:16 AM, Arnd Bergmann wrote:
> On Tue, May 9, 2023, at 13:35, Dmitry Baryshkov wrote:
>> On Tue, 9 May 2023 at 13:53, Souradeep Chowdhury
>> <[email protected]> wrote:
>>>
>>> All Qualcomm bootloaders log useful timestamp information related
>>> to bootloader stats in the IMEM region. Add the child node within
>>> IMEM for the boot stat region containing register address and
>>> compatible string.
>>
>> I might have a minor vote here. Is there any reason why you have to
>> instantiate the device from DT?
>> It looks like a software interface. Ideally software should not be
>> described in DT (e.g. this can be instantiated from imem
>> driver-to-be).
>
> There is nothing wrong with describing firmware in DT, if that
> firmware is part of the platform, we do that for a lot of
> other bits of firmware.
>
> However, in this specific case, many things are wrong with the
> implementation, and neither the DT binding nor the driver
> makes sense to me in its current state.
>
>>> + "^stats@[0-9a-f]+$":
>>> + type: object
>>> + description:
>>> + Imem region dedicated for storing timestamps related
>>> + information regarding bootstats.
>>> +
>>> + additionalProperties: false
>>> +
>>> + properties:
>>> + compatible:
>>> + items:
>>> + - enum:
>>> + - qcom,sm8450-bootstats
>>> + - const: qcom,imem-bootstats
>>> +
>>> + reg:
>>> + maxItems: 1
>
> If I understand this right, this "qcom,imem-bootstats"
> device serves as an indirection to store additional
> properties of the system in a memory area, but the description
> of that area is more complex than its contents, which
> makes no sense to me.
>
> Just create a binding for a firmware node in the devicetree
> itself, and put the values in properties of that. The first
> stage firmware can still use the same interface, but the
> actual loader that assembles the DT can get it out of that
> and store it in the properties. With that done, there is also
> no need for a kernel driver, as userspace can just get the
> values from /sys/firmware/devicetree/ directly.
>

To understand bit better here, what you are suggesting here that
application bootloader (e.g., UEFI app for Linux) can read these
boot values from the IMEM and encode them into the devicetree properties
which can be later retrieved directly from the userspace.

I am fine with this approach as well and in this case we just
need to submit the bindings document, right?

---Trilok Soni


2023-05-16 19:02:03

by Arnd Bergmann

[permalink] [raw]
Subject: Re: [PATCH V6 1/3] dt-bindings: sram: qcom,imem: Add Boot Stat region within IMEM

On Tue, May 16, 2023, at 20:34, Trilok Soni wrote:
> On 5/16/2023 1:16 AM, Arnd Bergmann wrote:
>
> To understand bit better here, what you are suggesting here that
> application bootloader (e.g., UEFI app for Linux) can read these
> boot values from the IMEM and encode them into the devicetree properties
> which can be later retrieved directly from the userspace.

I'm not entirely sure I understand the concept of "application bootloader",
but in principle this can be anything that runs before the devicetree
is handed off from the final boot loader to the kernel.

> I am fine with this approach as well and in this case we just
> need to submit the bindings document, right?

Yes, exactly.

Arnd

2023-05-16 19:37:13

by Dmitry Baryshkov

[permalink] [raw]
Subject: Re: [PATCH V6 1/3] dt-bindings: sram: qcom,imem: Add Boot Stat region within IMEM

On Tue, 16 May 2023 at 11:16, Arnd Bergmann <[email protected]> wrote:
>
> On Tue, May 9, 2023, at 13:35, Dmitry Baryshkov wrote:
> > On Tue, 9 May 2023 at 13:53, Souradeep Chowdhury
> > <[email protected]> wrote:
> >>
> >> All Qualcomm bootloaders log useful timestamp information related
> >> to bootloader stats in the IMEM region. Add the child node within
> >> IMEM for the boot stat region containing register address and
> >> compatible string.
> >
> > I might have a minor vote here. Is there any reason why you have to
> > instantiate the device from DT?
> > It looks like a software interface. Ideally software should not be
> > described in DT (e.g. this can be instantiated from imem
> > driver-to-be).
>
> There is nothing wrong with describing firmware in DT, if that
> firmware is part of the platform, we do that for a lot of
> other bits of firmware.
>
> However, in this specific case, many things are wrong with the
> implementation, and neither the DT binding nor the driver
> makes sense to me in its current state.
>
> >> + "^stats@[0-9a-f]+$":
> >> + type: object
> >> + description:
> >> + Imem region dedicated for storing timestamps related
> >> + information regarding bootstats.
> >> +
> >> + additionalProperties: false
> >> +
> >> + properties:
> >> + compatible:
> >> + items:
> >> + - enum:
> >> + - qcom,sm8450-bootstats
> >> + - const: qcom,imem-bootstats
> >> +
> >> + reg:
> >> + maxItems: 1
>
> If I understand this right, this "qcom,imem-bootstats"
> device serves as an indirection to store additional
> properties of the system in a memory area, but the description
> of that area is more complex than its contents, which
> makes no sense to me.
>
> Just create a binding for a firmware node in the devicetree
> itself, and put the values in properties of that. The first
> stage firmware can still use the same interface, but the
> actual loader that assembles the DT can get it out of that
> and store it in the properties. With that done, there is also
> no need for a kernel driver, as userspace can just get the
> values from /sys/firmware/devicetree/ directly.

This sounds good, except the always-present issue of the devices which
have already been released. Usually we can not expect a bootloader
update for these devices.

--
With best wishes
Dmitry

2023-05-16 22:24:42

by Trilok Soni

[permalink] [raw]
Subject: Re: [PATCH V6 1/3] dt-bindings: sram: qcom,imem: Add Boot Stat region within IMEM

On 5/16/2023 12:17 PM, Dmitry Baryshkov wrote:
> On Tue, 16 May 2023 at 11:16, Arnd Bergmann <[email protected]> wrote:
>>
>> On Tue, May 9, 2023, at 13:35, Dmitry Baryshkov wrote:
>>> On Tue, 9 May 2023 at 13:53, Souradeep Chowdhury
>>> <[email protected]> wrote:
>>>>
>>>> All Qualcomm bootloaders log useful timestamp information related
>>>> to bootloader stats in the IMEM region. Add the child node within
>>>> IMEM for the boot stat region containing register address and
>>>> compatible string.
>>>
>>> I might have a minor vote here. Is there any reason why you have to
>>> instantiate the device from DT?
>>> It looks like a software interface. Ideally software should not be
>>> described in DT (e.g. this can be instantiated from imem
>>> driver-to-be).
>>
>> There is nothing wrong with describing firmware in DT, if that
>> firmware is part of the platform, we do that for a lot of
>> other bits of firmware.
>>
>> However, in this specific case, many things are wrong with the
>> implementation, and neither the DT binding nor the driver
>> makes sense to me in its current state.
>>
>>>> + "^stats@[0-9a-f]+$":
>>>> + type: object
>>>> + description:
>>>> + Imem region dedicated for storing timestamps related
>>>> + information regarding bootstats.
>>>> +
>>>> + additionalProperties: false
>>>> +
>>>> + properties:
>>>> + compatible:
>>>> + items:
>>>> + - enum:
>>>> + - qcom,sm8450-bootstats
>>>> + - const: qcom,imem-bootstats
>>>> +
>>>> + reg:
>>>> + maxItems: 1
>>
>> If I understand this right, this "qcom,imem-bootstats"
>> device serves as an indirection to store additional
>> properties of the system in a memory area, but the description
>> of that area is more complex than its contents, which
>> makes no sense to me.
>>
>> Just create a binding for a firmware node in the devicetree
>> itself, and put the values in properties of that. The first
>> stage firmware can still use the same interface, but the
>> actual loader that assembles the DT can get it out of that
>> and store it in the properties. With that done, there is also
>> no need for a kernel driver, as userspace can just get the
>> values from /sys/firmware/devicetree/ directly.
>
> This sounds good, except the always-present issue of the devices which
> have already been released. Usually we can not expect a bootloader
> update for these devices.

Valid point. I don't expect current SOCs supported at upstream to update
with the newer bootloader having this feature done through bootloader.

---Trilok Soni