]> xenbits.xensource.com Git - unikraft/unikraft.git/commitdiff
plat/kvm/arm: Enable enumerating secondary cores through `ACPI`
authorSergiu Moga <sergiu.moga@protonmail.com>
Sun, 21 May 2023 13:22:40 +0000 (16:22 +0300)
committerUnikraft <monkey@unikraft.io>
Fri, 11 Aug 2023 16:42:01 +0000 (16:42 +0000)
Allow the existence of two ways to enumerate secondary cores:
`ACPI` and `Devicetree`.

Signed-off-by: Sergiu Moga <sergiu.moga@protonmail.com>
Reviewed-by: Razvan Virtan <virtanrazvan@gmail.com>
Reviewed-by: Michalis Pappas <michalis@unikraft.io>
Approved-by: Razvan Deaconescu <razvand@unikraft.io>
Tested-by: Unikraft CI <monkey@unikraft.io>
GitHub-Closes: #912

plat/kvm/arm/setup.c

index a4821d03000ce2c9667bf95450faf3116887de40..4975fdc4af5d8898a506cf8dd3de0fc4dd2d4783 100644 (file)
@@ -24,6 +24,7 @@
 #include <libfdt.h>
 #include <uk/plat/common/sections.h>
 #include <uk/plat/common/bootinfo.h>
+#include <uk/plat/common/acpi.h>
 #include <uk/plat/lcpu.h>
 #include <uk/plat/common/lcpu.h>
 #include <uart/pl011.h>
@@ -181,6 +182,12 @@ void __no_pauth _ukplat_entry(struct ukplat_bootinfo *bi)
        pl031_init_rtc(fdt);
 #endif /* CONFIG_RTC_PL031 */
 
+#if defined(CONFIG_UKPLAT_ACPI)
+       rc = acpi_init();
+       if (unlikely(rc < 0))
+               uk_pr_err("ACPI init failed: %d\n", rc);
+#endif /* CONFIG_UKPLAT_ACPI */
+
        /* Initialize interrupt controller */
        intctrl_init();