cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Highlighted
Adventurer
Adventurer
1,007 Views
Registered: ‎05-03-2012

Cannot change CSU Multi Boot address from U-Boot

Jump to solution

Hi,

we want to change the Multiboot address (csu_multi_boot) from U-Boot to start a golden image (e.g. if the user wants a recovery update) but we cannot access the CSU registers.

As far as I understand is the problem the wrong Exception Level (EL). Is there an easier way to start a fallback BOOT.BIN from U-Boot? We don't want to skip loading ATF(bl31.elf) in the bootsequence.

By the way, in Linux the change of the desired register works fine:

echo 0xffca0010 0xff 0xA0 > /sys/firmware/zynqmp/config_reg

[running with Petalinux 2019.1]

Thanks & Regards,
H.

0 Kudos
1 Solution

Accepted Solutions
Highlighted
Observer
Observer
868 Views
Registered: ‎05-07-2018

@hbachmann Sorry i missed out one point previously.

We need to add Multi boot register access in PMU as below, along with the above U-Boot change.

 File: pm_mmio_access.c, in pmAccessTable add the below entry.

-------------

/* CSU Mulitboot register */
{
.startAddr = PM_MMIO_CSU_BASE + 0x10, //0xFFCA0010,
.endAddr = PM_MMIO_CSU_BASE + 0x10,
.access = MMIO_ACCESS_RW(IPI_PMU_0_IER_APU_MASK |
IPI_PMU_0_IER_RPU_0_MASK |
IPI_PMU_0_IER_RPU_1_MASK),
},

--------------

Rebuild PMUFW, flash bootbin.

Regards,

Sudhakar

View solution in original post

5 Replies
Xilinx Employee
Xilinx Employee
941 Views
Registered: ‎04-15-2011
@hbachmann , Yes, you understanding is correct. U-boot is running at EL2 Non-Secure that cannot access the secure register(PMU/CSU) .
And I am not aware of an easy way to program multiboot register from u-boot unless you hack into u-boot and PMUFW to enable access to this register.
-------------------------------------------------------------------------
Don't forget to reply, kudo, and accept as solution.
-------------------------------------------------------------------------
0 Kudos
Highlighted
Observer
Observer
931 Views
Registered: ‎05-07-2018

To update Multi Boot register from u-boot, try below option.

Try using "zynqmp_mmio_read" and "zynqmp_mmio_write", include "#include <asm/arch/sys_proto.h>"

 

0 Kudos
Highlighted
Adventurer
Adventurer
911 Views
Registered: ‎05-03-2012

#include <asm/arch/sys_proto.h>
#define REGISTER_MULTIBOOT_ADDR 0xFFCA0010
zynqmp_mmio_write(REGISTER_MULTIBOOT_ADDR,0xFF,0xA0);

Regards,

H.

0 Kudos
Highlighted
Observer
Observer
869 Views
Registered: ‎05-07-2018

@hbachmann Sorry i missed out one point previously.

We need to add Multi boot register access in PMU as below, along with the above U-Boot change.

 File: pm_mmio_access.c, in pmAccessTable add the below entry.

-------------

/* CSU Mulitboot register */
{
.startAddr = PM_MMIO_CSU_BASE + 0x10, //0xFFCA0010,
.endAddr = PM_MMIO_CSU_BASE + 0x10,
.access = MMIO_ACCESS_RW(IPI_PMU_0_IER_APU_MASK |
IPI_PMU_0_IER_RPU_0_MASK |
IPI_PMU_0_IER_RPU_1_MASK),
},

--------------

Rebuild PMUFW, flash bootbin.

Regards,

Sudhakar

View solution in original post

Highlighted
Adventurer
Adventurer
812 Views
Registered: ‎05-03-2012

Thanks Sudhakar!

 

0 Kudos