mail archive of the barebox mailing list
 help / color / mirror / Atom feed
* [PATCH] arch: arm: mach-imx: document field return in CSF template
@ 2022-02-25 10:03 Bastian Krause
  2022-02-25 10:25 ` Marc Kleine-Budde
  2022-02-28  9:30 ` Sascha Hauer
  0 siblings, 2 replies; 5+ messages in thread
From: Bastian Krause @ 2022-02-25 10:03 UTC (permalink / raw)
  To: barebox; +Cc: Bastian Krause

Activating the field return configuration returns a locked-down board
(nearly) to its open state. In order to burn the FIELD_RETURN fuse, the
CSF must contain a specific unlock command with the device's UID.

Signed-off-by: Bastian Krause <bst@pengutronix.de>
---
 .../include/mach/habv4-imx6-gencsf-template.h        | 12 ++++++++++++
 1 file changed, 12 insertions(+)

diff --git a/arch/arm/mach-imx/include/mach/habv4-imx6-gencsf-template.h b/arch/arm/mach-imx/include/mach/habv4-imx6-gencsf-template.h
index a60b485292..45da2981cb 100644
--- a/arch/arm/mach-imx/include/mach/habv4-imx6-gencsf-template.h
+++ b/arch/arm/mach-imx/include/mach/habv4-imx6-gencsf-template.h
@@ -39,6 +39,18 @@ hab Engine = SETUP_HABV4_ENGINE
 hab Features = SETUP_HABV4_FEATURES
 #endif
 
+/*
+// allow fusing FIELD_RETURN
+// # ocotp0.permanent_write_enable=1
+// # mw -l -d /dev/imx-ocotp 0xb8 0x1
+hab [Unlock]
+hab Engine = OCOTP
+hab Features = FIELD RETURN
+// device-specific UID:
+// $ dd if=/sys/bus/nvmem/devices/imx-ocotp0/nvmem bs=4 skip=1 count=2 status=none | hexdump -ve '1/1 "0x%.2x, "' | sed 's/, $//'
+hab UID = 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08
+*/
+
 hab [Install Key]
 /* verification key index in key store (0, 2...4) */
 hab Verification index = 0
-- 
2.30.2


_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] arch: arm: mach-imx: document field return in CSF template
  2022-02-25 10:03 [PATCH] arch: arm: mach-imx: document field return in CSF template Bastian Krause
@ 2022-02-25 10:25 ` Marc Kleine-Budde
  2022-02-25 10:46   ` Bastian Krause
  2022-02-28  9:30 ` Sascha Hauer
  1 sibling, 1 reply; 5+ messages in thread
From: Marc Kleine-Budde @ 2022-02-25 10:25 UTC (permalink / raw)
  To: Bastian Krause; +Cc: barebox


[-- Attachment #1.1: Type: text/plain, Size: 1779 bytes --]

On 25.02.2022 11:03:44, Bastian Krause wrote:
> Activating the field return configuration returns a locked-down board
> (nearly) to its open state. In order to burn the FIELD_RETURN fuse, the
> CSF must contain a specific unlock command with the device's UID.
> 
> Signed-off-by: Bastian Krause <bst@pengutronix.de>
> ---
>  .../include/mach/habv4-imx6-gencsf-template.h        | 12 ++++++++++++
>  1 file changed, 12 insertions(+)
> 
> diff --git a/arch/arm/mach-imx/include/mach/habv4-imx6-gencsf-template.h b/arch/arm/mach-imx/include/mach/habv4-imx6-gencsf-template.h
> index a60b485292..45da2981cb 100644
> --- a/arch/arm/mach-imx/include/mach/habv4-imx6-gencsf-template.h
> +++ b/arch/arm/mach-imx/include/mach/habv4-imx6-gencsf-template.h
> @@ -39,6 +39,18 @@ hab Engine = SETUP_HABV4_ENGINE
>  hab Features = SETUP_HABV4_FEATURES
>  #endif
>  
> +/*
> +// allow fusing FIELD_RETURN
> +// # ocotp0.permanent_write_enable=1
> +// # mw -l -d /dev/imx-ocotp 0xb8 0x1
> +hab [Unlock]
> +hab Engine = OCOTP
> +hab Features = FIELD RETURN
> +// device-specific UID:
> +// $ dd if=/sys/bus/nvmem/devices/imx-ocotp0/nvmem bs=4 skip=1 count=2 status=none | hexdump -ve '1/1 "0x%.2x, "' | sed 's/, $//'
> +hab UID = 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08

You probably want to comment this all out in the template...

> +*/
> +
>  hab [Install Key]
>  /* verification key index in key store (0, 2...4) */
>  hab Verification index = 0
> -- 
> 2.30.2
> 
>

Marc

-- 
Pengutronix e.K.                 | Marc Kleine-Budde           |
Embedded Linux                   | https://www.pengutronix.de  |
Vertretung West/Dortmund         | Phone: +49-231-2826-924     |
Amtsgericht Hildesheim, HRA 2686 | Fax:   +49-5121-206917-5555 |

[-- Attachment #1.2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

[-- Attachment #2: Type: text/plain, Size: 149 bytes --]

_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] arch: arm: mach-imx: document field return in CSF template
  2022-02-25 10:25 ` Marc Kleine-Budde
@ 2022-02-25 10:46   ` Bastian Krause
  2022-02-25 10:55     ` Marc Kleine-Budde
  0 siblings, 1 reply; 5+ messages in thread
From: Bastian Krause @ 2022-02-25 10:46 UTC (permalink / raw)
  To: Marc Kleine-Budde; +Cc: barebox

On 2/25/22 11:25, Marc Kleine-Budde wrote:
> On 25.02.2022 11:03:44, Bastian Krause wrote:
>> Activating the field return configuration returns a locked-down board
>> (nearly) to its open state. In order to burn the FIELD_RETURN fuse, the
>> CSF must contain a specific unlock command with the device's UID.
>>
>> Signed-off-by: Bastian Krause <bst@pengutronix.de>
>> ---
>>   .../include/mach/habv4-imx6-gencsf-template.h        | 12 ++++++++++++
>>   1 file changed, 12 insertions(+)
>>
>> diff --git a/arch/arm/mach-imx/include/mach/habv4-imx6-gencsf-template.h b/arch/arm/mach-imx/include/mach/habv4-imx6-gencsf-template.h
>> index a60b485292..45da2981cb 100644
>> --- a/arch/arm/mach-imx/include/mach/habv4-imx6-gencsf-template.h
>> +++ b/arch/arm/mach-imx/include/mach/habv4-imx6-gencsf-template.h
>> @@ -39,6 +39,18 @@ hab Engine = SETUP_HABV4_ENGINE
>>   hab Features = SETUP_HABV4_FEATURES
>>   #endif
>>   
>> +/*
>> +// allow fusing FIELD_RETURN
>> +// # ocotp0.permanent_write_enable=1
>> +// # mw -l -d /dev/imx-ocotp 0xb8 0x1
>> +hab [Unlock]
>> +hab Engine = OCOTP
>> +hab Features = FIELD RETURN
>> +// device-specific UID:
>> +// $ dd if=/sys/bus/nvmem/devices/imx-ocotp0/nvmem bs=4 skip=1 count=2 status=none | hexdump -ve '1/1 "0x%.2x, "' | sed 's/, $//'
>> +hab UID = 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08
> 
> You probably want to comment this all out in the template...

I don't get it, that's all inside the /* commented section */.

Bastian

> 
>> +*/
>> +
>>   hab [Install Key]
>>   /* verification key index in key store (0, 2...4) */
>>   hab Verification index = 0
>> -- 
>> 2.30.2
>>
>>

-- 
Pengutronix e.K.                           |                             |
Steuerwalder Str. 21                       | http://www.pengutronix.de/  |
31137 Hildesheim, Germany                  | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] arch: arm: mach-imx: document field return in CSF template
  2022-02-25 10:46   ` Bastian Krause
@ 2022-02-25 10:55     ` Marc Kleine-Budde
  0 siblings, 0 replies; 5+ messages in thread
From: Marc Kleine-Budde @ 2022-02-25 10:55 UTC (permalink / raw)
  To: Bastian Krause; +Cc: barebox


[-- Attachment #1.1: Type: text/plain, Size: 1917 bytes --]

On 25.02.2022 11:46:04, Bastian Krause wrote:
> On 2/25/22 11:25, Marc Kleine-Budde wrote:
> > On 25.02.2022 11:03:44, Bastian Krause wrote:
> > > Activating the field return configuration returns a locked-down board
> > > (nearly) to its open state. In order to burn the FIELD_RETURN fuse, the
> > > CSF must contain a specific unlock command with the device's UID.
> > > 
> > > Signed-off-by: Bastian Krause <bst@pengutronix.de>
> > > ---
> > >   .../include/mach/habv4-imx6-gencsf-template.h        | 12 ++++++++++++
> > >   1 file changed, 12 insertions(+)
> > > 
> > > diff --git a/arch/arm/mach-imx/include/mach/habv4-imx6-gencsf-template.h b/arch/arm/mach-imx/include/mach/habv4-imx6-gencsf-template.h
> > > index a60b485292..45da2981cb 100644
> > > --- a/arch/arm/mach-imx/include/mach/habv4-imx6-gencsf-template.h
> > > +++ b/arch/arm/mach-imx/include/mach/habv4-imx6-gencsf-template.h
> > > @@ -39,6 +39,18 @@ hab Engine = SETUP_HABV4_ENGINE
> > >   hab Features = SETUP_HABV4_FEATURES
> > >   #endif
> > > +/*
> > > +// allow fusing FIELD_RETURN
> > > +// # ocotp0.permanent_write_enable=1
> > > +// # mw -l -d /dev/imx-ocotp 0xb8 0x1
> > > +hab [Unlock]
> > > +hab Engine = OCOTP
> > > +hab Features = FIELD RETURN
> > > +// device-specific UID:
> > > +// $ dd if=/sys/bus/nvmem/devices/imx-ocotp0/nvmem bs=4 skip=1 count=2 status=none | hexdump -ve '1/1 "0x%.2x, "' | sed 's/, $//'
> > > +hab UID = 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08
> > 
> > You probably want to comment this all out in the template...
> 
> I don't get it, that's all inside the /* commented section */.

Doh!

Marc

-- 
Pengutronix e.K.                 | Marc Kleine-Budde           |
Embedded Linux                   | https://www.pengutronix.de  |
Vertretung West/Dortmund         | Phone: +49-231-2826-924     |
Amtsgericht Hildesheim, HRA 2686 | Fax:   +49-5121-206917-5555 |

[-- Attachment #1.2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

[-- Attachment #2: Type: text/plain, Size: 149 bytes --]

_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] arch: arm: mach-imx: document field return in CSF template
  2022-02-25 10:03 [PATCH] arch: arm: mach-imx: document field return in CSF template Bastian Krause
  2022-02-25 10:25 ` Marc Kleine-Budde
@ 2022-02-28  9:30 ` Sascha Hauer
  1 sibling, 0 replies; 5+ messages in thread
From: Sascha Hauer @ 2022-02-28  9:30 UTC (permalink / raw)
  To: Bastian Krause; +Cc: barebox

On Fri, Feb 25, 2022 at 11:03:44AM +0100, Bastian Krause wrote:
> Activating the field return configuration returns a locked-down board
> (nearly) to its open state. In order to burn the FIELD_RETURN fuse, the
> CSF must contain a specific unlock command with the device's UID.
> 
> Signed-off-by: Bastian Krause <bst@pengutronix.de>
> ---
>  .../include/mach/habv4-imx6-gencsf-template.h        | 12 ++++++++++++
>  1 file changed, 12 insertions(+)

Applied, thanks

Sascha

> 
> diff --git a/arch/arm/mach-imx/include/mach/habv4-imx6-gencsf-template.h b/arch/arm/mach-imx/include/mach/habv4-imx6-gencsf-template.h
> index a60b485292..45da2981cb 100644
> --- a/arch/arm/mach-imx/include/mach/habv4-imx6-gencsf-template.h
> +++ b/arch/arm/mach-imx/include/mach/habv4-imx6-gencsf-template.h
> @@ -39,6 +39,18 @@ hab Engine = SETUP_HABV4_ENGINE
>  hab Features = SETUP_HABV4_FEATURES
>  #endif
>  
> +/*
> +// allow fusing FIELD_RETURN
> +// # ocotp0.permanent_write_enable=1
> +// # mw -l -d /dev/imx-ocotp 0xb8 0x1
> +hab [Unlock]
> +hab Engine = OCOTP
> +hab Features = FIELD RETURN
> +// device-specific UID:
> +// $ dd if=/sys/bus/nvmem/devices/imx-ocotp0/nvmem bs=4 skip=1 count=2 status=none | hexdump -ve '1/1 "0x%.2x, "' | sed 's/, $//'
> +hab UID = 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08
> +*/
> +
>  hab [Install Key]
>  /* verification key index in key store (0, 2...4) */
>  hab Verification index = 0
> -- 
> 2.30.2
> 
> 
> _______________________________________________
> barebox mailing list
> barebox@lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/barebox
> 

-- 
Pengutronix e.K.                           |                             |
Steuerwalder Str. 21                       | http://www.pengutronix.de/  |
31137 Hildesheim, Germany                  | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2022-02-28  9:32 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-02-25 10:03 [PATCH] arch: arm: mach-imx: document field return in CSF template Bastian Krause
2022-02-25 10:25 ` Marc Kleine-Budde
2022-02-25 10:46   ` Bastian Krause
2022-02-25 10:55     ` Marc Kleine-Budde
2022-02-28  9:30 ` Sascha Hauer

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox