arm/arm64: mmu: Stop mapping an assumed IO region
By providing a proper ioremap function, we can just rely on devices calling it for each region they need (as they already do) instead of mapping a big assumed I/O range. We don't require the MMU to be enabled at the time of the ioremap. In that case, we add the mapping to the identity map anyway. This allows us to call setup_vm after io_init. Why don't we just call setup_vm before io_init, I hear you ask? Well, that's because tests like sieve want to start with the MMU off, later call setup_vm, and all the while have working I/O. Some unit tests are just really demanding... While at it, ensure we map the I/O regions with XN (execute never), as suggested by Alexandru Elisei. Reviewed-by:Alexandru Elisei <alexandru.elisei@arm.com> Tested-by:
Alexandru Elisei <alexandru.elisei@arm.com> Signed-off-by:
Andrew Jones <drjones@redhat.com>
Loading
Please register or sign in to comment