Hi all, I'm trying to port camkes-arm-vm to a different platform, that supports gic-v3 In the process, I hit a compilation error: Building C object kernel/CMakeFiles/kernel_all_pp_...rapper_temp_lib.dir/ kernel_all_pp_prune_wrapper_temp.c.obj FAILED: kernel/kernel_all_pp_prune_wrapper_temp.c In file included from /home/chris/camkes-tqma8xqp- vm/kernel/src/arch/arm/object/vcpu.c:15: /home/chris/camkes-tqma8xqp-vm/kernel/include/arch/arm/arch/machine/gic_v2.h:23: error: "IRQ_MASK" redefined [-Werror] 23 #define IRQ_MASK MASK(10u) In file included from kernel/gen_headers/plat/platform_gen.h:23, from /home/chris/camkes-tqma8xqp-vm/kernel/include/plat/ default/plat/machine.h:8, from /home/chris/camkes-tqma8xqp- vm/kernel/include/machine.h:9, from /home/chris/camkes-tqma8xqp- vm/kernel/include/api/syscall.h:10, from /home/chris/camkes-tqma8xqp- vm/kernel/src/api/faults.c:10: /home/chris/camkes-tqma8xqp-vm/kernel/include/arch/arm/arch/machine/gic_v3.h:30: note: this is the location of the previous definition 30 #define IRQ_MASK MASK(16u) which is an indicative that both gic_v3.h & gic_v2.h headers have been included, which is an error because said headers are not compatible: kernel/include/arch/arm/arch/machine/gic_v3.h:#define IRQ_MASK MASK(16u) kernel/include/arch/arm/arch/machine/gic_v2.h:#define IRQ_MASK MASK(10u) So my question is: how can I configure the build to avoid such a conflict? I can grepp the relevant configuration option in CMakeCache.txt: build_tqma8/CMakeCache.txt:CONFIGURE_INTERRUPT_CONTROLLER:INTERNAL=arch/machine/gic_v3.h but cannot see it in ccmake gui because it's "INTERNAL" What is the solution? - replace this option somehow to use gic_v2 and have my HW use gic v.2, or - change compilation options to use gic_v3 everywhere Thanks for any help, Chris.
Hi All, What is the status of virtualization support on ARM SOCs with GICv3? According to section “FAQ and Implementation Notes” of [1], seems it is still under development. Any plan or progress on this? Thank you very much. [1] https://docs.sel4.systems/projects/camkes-arm-vm/ Regards, Alex
Hello, Alex On 2021-07-08 11:01, alex.lin wrote:
What is the status of virtualization support on ARM SOCs with GICv3? According to section “FAQ and Implementation Notes” of [1], seems it is still under development. Any plan or progress on this? Thank you very much.
Second attempt to get it merged can be found here: https://github.com/seL4/seL4/pull/378 First attempt was in 2019: https://github.com/seL4/seL4/pull/145 Greetings, Indan
Hi Indan, Thanks for the info. I've tried to use https://github.com/seL4/seL4/pull/378. However, it seems there're something missing in projects/seL4_projects_libs/libsel4vm/src/arch/arm/vgic/vgic.c. Complete build output can be found at [1]. /home/nio/alex/seL4/build/camkes-vm-apps/projects/seL4_projects_libs/libsel4vm/src/arch/arm/vgic/vgic.c:86:2: error: #error "Unsupported platform for GIC" #error "Unsupported platform for GIC" ^~~~~ /home/nio/alex/seL4/build/camkes-vm-apps/projects/seL4_projects_libs/libsel4vm/src/arch/arm/vgic/vgic.c: In function ‘vgic_vcpu_iterator’: /home/nio/alex/seL4/build/camkes-vm-apps/projects/seL4_projects_libs/libsel4vm/src/arch/arm/vgic/vgic.c:98:31: error: ‘GIC_PADDR’ undeclared (first use in this function); did you mean ‘GIC_CPU_PADDR’? #define GIC_VCPU_PADDR (GIC_PADDR + 0x6000) ^ /home/nio/alex/seL4/build/camkes-vm-apps/projects/seL4_projects_libs/libsel4vm/src/arch/arm/vgic/vgic.c:1092:90: note: in expansion of macro ‘GIC_VCPU_PADDR’ err = vka_utspace_alloc_at(vm->vka, &frame, kobject_get_type(KOBJECT_FRAME, 12), 12, GIC_VCPU_PADDR, &vka_cookie); I take a look at vgic.c and it seems to me the definitions are for GICv2 only. #ifdef CONFIG_PLAT_QEMU_ARM_VIRT #define GIC_DIST_PADDR (GIC_PADDR) #define GIC_CPU_PADDR (GIC_PADDR + 0x00010000) #define GIC_VCPU_CNTR_PADDR (GIC_PADDR + 0x00030000) #define GIC_VCPU_PADDR (GIC_PADDR + 0x00040000) #else #define GIC_DIST_PADDR (GIC_PADDR + 0x1000) #define GIC_CPU_PADDR (GIC_PADDR + 0x2000) #define GIC_VCPU_CNTR_PADDR (GIC_PADDR + 0x4000) #define GIC_VCPU_PADDR (GIC_PADDR + 0x6000) #endif Do you know if anyone is working on GICv3 support in libsel4vm? Thanks. [1] https://pastebin.com/QmwfxDK3 Regards, Alex
Hi Indan, Thank you all the same. I find there's a branch https://github.com/seL4/seL4_projects_libs/compare/sylvain/gicv3 Regards, Alex
participants (4)
-
Alex Ling
-
alex.ling@nio.com
-
Chris Koziarz
-
Indan Zupancic