On 24.06.19 15:29, Vitaly Andrianov wrote:
On 06/24/2019 09:23 AM, Jan Kiszka wrote:
On 24.06.19 14:27, Vitaly Andrianov wrote:
Hi Jan, Ralf,

On 06/12/2019 03:27 PM, 'Vitaly Andrianov' via Jailhouse wrote:
Hi Ralf,
Thanks you for the quick response.


[skip]


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);
        }
}


I have implemented the am57xx unit. At the am57xx_cell_exit() I set cpu_on_entry to omap5_secondary_hyp_startup() - physical address. That was in the working v0.8 mach_cell_exit().
But I'm not sure what shall I do with the remaining 3 calls:

                  per_cpu(cpu)->cpu_on_context = 0;
                  arch_suspend_cpu(cpu);
                  arch_reset_cpu(cpu);

When I execute "jailhouse cell destroy 1" the kernel cannot bring cpu1 online and it still in the hypervisor's WFI loop.

Any advise?

Can you share the code?

But, again, we will likely need more redesign anyway because the previous approach was already hacky. E.g. it was rather fishy to pass through the WakeupGen page and issuing smc calls.

Can you describe the CPU boot flow from OS perspective, or refer to a description? Back then, I implemented it via Linux reverse engineering.

Jan


I just made suspend_cpu() not static and called from am57xx_exit_cell(). I got cpu_up() working after that. Now I have the both uart-demo and git-demo working now. Let me clean the code and I push it to the temporally branch to TI external git repo. After that we can discuss what I need to do to implement the correct way.


OK, sounds good!

Jan

--
Siemens AG, Corporate Technology, CT RDA IOT SES-DE
Corporate Competence Center Embedded Linux

--
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/cb3304a1-b322-7f87-a67f-3c6f11fe3d7c%40siemens.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to