Re: Getting ACRN to work


Chen, Zide
 

Hi Dubravko,

Did you boot ACRN from acrn.efi (UEFI) or acrn.bin (SBL), or acrn.32.out (Grub)? RELOC is enabled for acrn.efi, but not others.

For the init_percpu_lapic_init() issue, it's highly possibly that the user defined MAX_PCPU_NUM is less than the physical CPU number from ACPI table.

Other than that, probably you need to debug the parse_madt() and see if it can't find MADT table or corrupted MADT so that it finds 0 pcpus.

BTW, you can pull this PR to your code which may help your bring-up since it enables early panic() and other pr_err() messages.
https://github.com/projectacrn/acrn-hypervisor/pull/4381

Best Regards,
Zide

On 2/10/20 5:13 AM, Dubravko Moravski | Exor Embedded S.r.l. wrote:
Hi Zide,
Thank you very much, you were right. I've had RELOC already enabled, but apparently one also need to have CONFIG_HV_RAM_START 2MB aligned. I've set it to 0x1400 0000 and now my hypervisor manages to execute entire init_paging() function.
... but now it crashes in cpu.c, init_percpu_lapic_id(). A block of code from init_pcpu_pre():
printf("aaaaaaa7\n");
if (!init_percpu_lapic_id()) {
panic("failed to init_percpu_lapic_id!");
}
printf("aaaaaaa8\n");
"7" gets printed out, neither "8" nor panic does.
I guess something is wrong with the interrupts? If it means anything, I've made no particular modifications related to interrupts, and our board generally works well with Linux.
Best regards,
Dubravko
*Dubravko Moravski*
/SW engineering/
*Exor Embedded S.r.l.*
p: +38 512455659 <tel:+38 512455659>  m:+38 5915402413 <tel:+38 5915402413>
a: Slavonska avenija, 50, Zagreb, Croatia, 10000
w: exorint.com <https://exorint.com/>

 Prima di stampare pensa ai costi ambientali. Please consider the environment before printing this email.
Privacy <https://www.exorint.com/it/privacy>
--------------------------------------------------------------------------------------------------------------------------
*From:* acrn-users@... <acrn-users@...> on behalf of Chen, Zide via Lists.Projectacrn.Org <zide.chen=intel.com@...>
*Sent:* Saturday, February 8, 2020 6:33 AM
*To:* acrn-users@... <acrn-users@...>
*Subject:* Re: [acrn-users] Getting ACRN to work
Hi Dubravko,
Host MMU page size is 2MB in ACRN hypervisor. It seems to me that the direct cause for crash could be CONFIG_HV_RAM_START(0x13151000) is not 2MB aligned.
Did you disable relocation (RELOC in Kconfig)? By default RELOC is enabled and it allocates memory from EFI and overwrites the user defined CONFIG_HV_RAM_START, which is supposed to be able to avoid the 2MB alignment issue.
In case of you prefer to disable hypervisor relocation, you may need to make sure that CONFIG_HV_RAM_START is configured to the memory that is of EfiConventionalMemory(7) type. You may find out the available memory by calling dump_e820() in misc/efi-stub/boot.c, before emalloc_reserved_aligned().
Best Regards,
Zide

Join {acrn-users@lists.projectacrn.org to automatically receive all group messages.