[RFC] x86 XIP

From: Jim Kukunas
Date: Mon Mar 23 2015 - 03:57:57 EST



Hi Folks,

This patchset introduces eXecute-In-Place (XIP) support for x86. Right now only
minimal configurations are supported (32-bit only, no SMP, no PAE, and so on).
My goal is to increase the number of supported configurations in the future
based on what functionality is requested. This patchset only supports storage
configurations where the kernel text and read-only data will always be readable.

I didn't create a special Makefile target for building xip images, like how ARM
has xipImage. Instead, I'm just using the basic vmlinux ELF executable. The
kernel must be built with CONFIG_XIP_BASE set to the physical address of the
vmlinux file. Additionally, since the .text section is read-only, all of the
alternative instructions need to be resolved at build-time. To accomplish this,
the cpu features to enable are selected through a series of Kconfig options.
In order to boot, the bootloader just needs to fill out the zero page (whose
address startup_32() expects in esi), switch to 32-bit protected mode and then
jump into startup_32(), which will be at CONFIG_XIP_BASE plus one page.

Thanks.

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/