Sel4test CACHEFLUSH0004 failure

I ran sel4test (12.1.0 kernel, latest sel4test) on an Armv8-A (aarch64) machine with SMP and Hyp mode on, and all tests passed except for CACHEFLUSH0004 [sel4test/cache.c at master · seL4/sel4test · GitHub]. The value of *ptr2 after the frame was deleted and remapped does not return 0, but C0FFEE still (as before the frame was deleted).

Should there be a Page Clean in place before *ptr2 is accessed? (or maybe it’s platform-dependent, though in CI this test passed for all platforms present)

Adding a page clean makes the test pass in my case.

This doesn’t make sense since the memory reserved for the frame is set to “non-cacheable”. Cache maintenance operations shouldn’t be needed.

This indicates a problem in the kernel, i.e. some assumption it makes about caching that is broken for this platform. The equivalent of page clean needs to happen in the kernel.

I think you might be hitting issue #481 which is fixed in the development version, but not in 12.1.0 yet.

Updating clearMemory to do a PoC clean did indeed fix the issue on my platform. Thanks!

1 Like