Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Elfloader crashes on ARMv7 platforms with external L2 Cache controller #131

Open
kent-mcleod opened this issue Nov 12, 2021 · 0 comments
Open

Comments

@kent-mcleod
Copy link
Member

The Elfloader doesn't currently implement any L2 cache flushing operations for ARMv7 platforms where the architectural flushing operations don't also flush external caches such as the PL310. This means that on platforms with an external cache controller if the previous bootloader has enabled caches and starts the Elfloader with them enabled, the Elfloader will crash when trying to enable the MMU.

The Elfloader assumes that when it is loaded and started that caches are already disabled which seemed to be generally true for older u-boot versions. Newer U-Boot versions tend to enable the caches and only disable them when loading a uImage that declares itself as a Linux kernel via bootm. In order to use alternative image file formats such as ELF, Raw binary or EFI, first the L2 Cache must be flushed and disabled before starting the elfloader if it was previously enabled.

Ideally the elfloader should be able to handle the case where it is started with caches enabled and be able to flush external caches when disabling them.

See seL4/seL4#631 for more context.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant