Dear Adam,
thanks for your reply!
I'm not sure about the QEMU part (works fine for me)
For the record, this is what I did:
(1) Start with the vanilla base 21.07.0 snapshot.
(2) Manually update the respective components (i.e. src/fiasco, src/l4/mk, src/l4/pkg/bootstrap, etc.) from the respective GitHub repositories. Maybe I've missed something, but I was unable to find any integration repository that would just point to the other repos as submodules or something in that style. And I don't know where is the upstream of things like bin/setup.d and alike.
(3) Compile the resulting composition for arm64-virt-el2. The compilation finishes OK.
(4) Run the compilation output in QEMU. See the log attached. The UART still echoes the input, thus I believe the kernel does not crash, but there is no forward progress.
I am sure that I would be able to find and fix the problem eventually. But I simply prefer a working baseline before doing some development and therefore I have stuck to the vanilla snapshot :)
but on the HiKey my guess would be that the cache on those cores is not enabled? Could you check this?
Like I have written before, I have tried to confirm that the memory is mapped with the correct attributes. The JTAG debugger reports that the memory region where _tramp_mp_spinlock is located in a memory region that is inner shareable, inner write-back, outer write-back, read allocate, write allocate, non-transient.
I have also tried to confirm this from the code:
(a) MAIR_EL2 is set to 0x00ff4400. Which means that the attribute index 2 represents normal cacheable memory.
(b) TCR_EL2 is set to 0x80853510. Which means that the memory is inner shareable, normal outer write-back read allocate write allocate, normal inner write-back read allocate write allocate.
(c) SCTLR_EL2 is set to 0x30c51835. Which means that the instruction cache, the data cache and the memory translation are enabled.
(d) I must say that the code in kern/arm/paging-arm.cpp is extremely hard to understand and analyze (compared to most kernels I've ever seen), not just because it is plagued by non-symbolic constants. But I still believe that the value of 0x008 on the line 835 translates to using the attribute index 2 (see above).
Am I missing something?
Best regards
Martin Decky