Hi Ralf,
Thanks you for the quick response.

On 06/12/2019 03:12 PM, Ralf Ramsauer wrote:
Hi Vitaly,

On 6/12/19 8:45 PM, Vitaly Andrianov wrote:
Hi Jan, Ralf,

More than a year ago I was working on Jailhouse support for TI AM572x
SOC. That time we used v0.8 and everything worked fine. Presently I
started to port that support to v0.10 version and found a lot of new
features. The mane "feature" that you removed "mach-..." and introduced
"units". Because am57xx requires to have custom init and cell exit
functions I think I need to create am57xx unit.

Hehe, upstream first! :)

I will as soon as I get it working. I don't want to do porting work for every 
new version :)



If you remember, the am57xx had its own:

int mach_init(void),
void mach_cell_exit(struct cell *cell) and
int arch_handle_smc(struct trap_context *ctx)

so, I have to implement the corresponding am57xx_init() and
am57xx_cell_exit().

Here is the old mach_cell_exit function, but many of the functions it
uses disappeared in the v0.10 version.

void mach_cell_exit(struct cell *cell)
{
        unsigned int cpu;

        for_each_cpu(cpu, cell->cpu_set) {
                per_cpu(cpu)->cpu_on_entry =
                        mmio_read32(wkupgen_base + OMAP_AUX_CORE_BOOT_0 +
                                    cpu * 4);
                per_cpu(cpu)->cpu_on_context = 0;
                arch_suspend_cpu(cpu);
                arch_reset_cpu(cpu);
        }
}

Please could you help me to find a example of similar function for other
platforms I can use to implement the am57xx_cell_exit function. W/o it I
cannot bring the second CPU after a cell destroy.

Almost exactly a year ago, I removed vexpress support. Vexpress used to
have a similar pattern. Before I removed it, Jan converted it to a unit.
This should give you an example how you can use it.

Have a look at aa9a67d63f326a89294781acb7b1562f54b0538e. Does that help?
Actually does not. This commit removes vexpress support. It would help if it converts vexpress to use unit framework.

I think I have an issue with SMC. After I destroy a cell on CPU1 the CPU is 
sitting on wfi loop.
But CPU0 cannot wake it up. I'm debugging that path now.

In v0.10 there is no arch_suspend_cpu(). Does my am57xx_cell_exit() need to call some equivalent of that function @v0.10? If yes, than what is it?

Thanks,
-Vitaly


   Ralf


Thanks,
-Vitaly




--
You received this message because you are subscribed to the Google Groups 
"Jailhouse" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jailhouse-dev/27491b3c-0b03-0ba4-da94-6a8cadb28006%40ti.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to