Wednesday, December 7, 2011

Booting Linux on core 1 while uboot on core 0

In uboot --

Change the existing line

123 theKernel (0, machid, bd->bi_boot_params);

To the below

122 #if 0
123 theKernel (0, machid, bd->bi_boot_params);
124 /* does not return */
125 #else
126 // addr = CORE1_DEST_DOWN_ADDR;
127 #define SPRMC_CPU_ID 1
128 #define IRQ_AP_START 3
129 addr = 0x8000;
130 *(volatile unsigned long *)(SCRATCH_REG_BASE) = (unsigned long)addr;
131 printf ("## machid: %x, Starting yw at 0x%8x ...\n",machid, addr);
132 REG_WRITE(MPCORE_GIC_IntEnable(IRQ_AP_START), BIT(IRQ_AP_START));
133 REG_WRITE(MPCORE_GIC_Control, INT_CONTROL_ENABLE);
134 do_send_ipi_linux(IRQ_AP_START, 1< 135 #endif


In kernel ---
arch/arm/kernel/head.S
in kernel startup entry point.
add machid to r1

Disclaimer:
I need to confirm this. have taken from somebody