Spread Spectrum Enable in plug in with secure boot

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Spread Spectrum Enable in plug in with secure boot

764 Views
asmaa
Contributor V

Hello Everyone,

I am trying to enable Spread Spectrum in our board which is running uboot version: U-Boot 2018.03-00038-g34c3d6bfa9-dirty and kernel version: 4.19.35-04790-ga5119fdf76b3-dirty also I am using OPTEE revision 3.2 (062c5f78).

i have made following changes to enable SS:

1.Set CONFIG_USE_IMXIMG_PLUGIN=y in our defconfig


2. added plugin.s file as we did not use before(contents of plugin.s), following document https://community.nxp.com/docs/DOC-100036 

.macro imx6ul_ddr3_arm2_setting
ldr r0, =CCM_BASE_ADDR
ldr r1, [r0,#0x18]
ldr r3, [r0,#0x18]
/* set periph_clik2_sel to select OSC_CLK */
and r1, r1, #0xffffcfff
orr r1, r1, #0x00001000
str r1, [r0,#0x18]
/* set periph_clk_set to switch to OSC_CLK */
ldr r1, [r0,#0x14]
ldr r2, [r0,#0x14]
orr r1, r1, #0x02000000
str r1, [r0,#0x14]
/* power down PLL2 */
ldr r0, =0x020c8000
ldr r1, [r0,#0x30]
orr r1, r1, #0x00010000
str r1, [r0,#0x30]
/* enable spread spectrum & configure */
ldr r1, =0x00001770
str r1, [r0,#0x60]
ldr r1, =0x05dc8006
str r1, [r0,#0x40]

ldr r1, [r0,#0x30]
and r1, r1, #0xFFFEFFFF
str r1, [r0,#0x30]
/* need delay short time before switch PLL2 it back */
ldr r4, =0x0
pu_delay:
add r4, r4, #0x1
cmp r4, #0x200000
bne pu_delay
/* recovery the previous PLL source setting */
ldr r0, =CCM_BASE_ADDR
str r2, [r0,#0x14]
str r3, [r0,#0x18]
.endm

macro imx6_ddr_setting
#if defined (CONFIG_TARGET_MX6UL)
imx6ul_ddr3_arm2_setting
#else
#error "SOC not configured"
#endif
.endm

/* include the common plugin code here */
#include <asm/arch/mx6_plugin.S>

when I compile uboot its giving me following error:

AS board/freescale/mx6ul/plugin.o
arm-poky-linux-gnueabi-objcopy -O binary --gap-fill 0xff board/freescale/mx6ul/plugin.o board/freescale/mx6ul/plugin.bin
MKIMAGE u-boot-dtb.imx
Error: Header v2: SECURE_BOOT is only supported in DCD mode!arch/arm/mach-imx/Makefile:144: recipe for target 'u-boot-dtb.imx' failed
make[1]: *** [u-boot-dtb.imx] Error 1
Makefile:912: recipe for target 'u-boot-dtb.imx' failed
make: *** [u-boot-dtb.imx] Error 2
/home/asmas/imx-dev/cst-dev/sign
/home/asmas/imx-dev/cst-dev/sign/uboot-qt850 has invalid IVT (self)
cp: cannot stat '/home/asmas/imx-dev/cst-dev/sign/uboot-qt850.hab': No such file or directory

My question is:

1.Is it possible to use SECURE_BOOT and Spread spectrum plugin together?

2. If SECURE_BOOT and plug in cannot be used together, what is the other method to enable spread spectrum?

Thanks in advance for any help.

Regards,

Asma

Labels (1)
Tags (1)
0 Kudos
2 Replies

630 Views
igorpadykov
NXP Employee
NXP Employee

Hi Asma

>1.Is it possible to use SECURE_BOOT and Spread spectrum plugin together?

in general yes, additional files were sent via mail. Note, Plugin support is no longer available

as it is deemed to be less secure compared to DCD method. Thus plugin authentication is

not recommended in i.MX chipsets.

>2. If SECURE_BOOT and plug in cannot be used together, what is the other method to enable

>spread spectrum?

one can try to enable spread spectrum in codes running from OCRAM, then copy uboot to ddr memory.

Best regards
igor
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

0 Kudos

630 Views
asmaa
Contributor V

Thank you for the quick reply. It seems I cant use plugin method because of security related issues with plugins.

Could you please point me any document on how to do programming for OCRAM for imx6ul?

basically I want to write Spread spectrum code in OCRAM. I dont know how to do it in OCRAM, could you please provide some pointers?

Thanks,

Asma

0 Kudos