zephyr/cmake
Stephanos Ioannidis 04e874485b x86: intel64: Split 'locore' and 'main' kernel images for QEMU
This commit splits the 'locore' and 'main' memory regions into
separate executable images and specifies the 'locore' as the boot
kernel, in order to prevent the QEMU direct multiboot kernel loader
from overwriting the BIOS and option ROM areas located in between
the two memory regions.

The Zephyr x86-64 kernel image consists of two discontiguous load
memory regions: 'locore' at 0x8000 and 'main' at 0x100000, but the
QEMU treats these as single contiguous memory region starting at
0x8000 and ending at (0x100000 + MAIN_IMAGE_SIZE - 1).

This results in the direct multiboot kernel loader overwriting the
BIOS and option ROM areas as part of the kernel loading process, and
causes any writable system regions to be corrupted (e.g. KVMVAPIC ROM).

By splitting the two discontiguous memory regions into separate images
and specifying only the boot image (i.e. 'locore') as the '-kernel',
it is possible to work around the QEMU direct kernel loading design
limitation.

This workaround is required to support the QEMU v4.2.0 and above.

For more details, refer to the issue zephyrproject-rtos/sdk-ng#168.

Signed-off-by: Stephanos Ioannidis <root@stephanos.io>
2020-01-08 07:49:24 -06:00
..
app cmake: app mem partion flexibility 2019-11-05 08:44:26 -08:00
backports cmake: Fixed a bug where python 3.8 was not detected on Windows 2019-11-04 14:32:41 +01:00
bintools
compiler cmake: toolchain: Fix 'host' toolchain variant 2020-01-07 13:25:47 -05:00
emu x86: intel64: Split 'locore' and 'main' kernel images for QEMU 2020-01-08 07:49:24 -06:00
flash cmake: Don't test whether the installed west is the bootstrapper 2019-11-05 17:43:50 +01:00
ide
linker/ld cmake: ld: use linker prefix for undefined symbols 2020-01-07 17:09:38 +01:00
reports
toolchain toolchain: xcc: use Clang if exists 2020-01-07 17:09:38 +01:00
usage
util
boards.cmake
ccache.cmake
cfb.cmake
dts.cmake cmake: dts fixups 2019-12-18 21:42:43 +01:00
extensions.cmake cmake: Add sorting of linker snippets by key 2019-12-20 08:54:53 -05:00
extra_flags.cmake cmake: extra_flags: fix EXTRA_CPPFLAGS being applied as macros 2019-12-13 13:23:40 -05:00
gcc-m-cpu.cmake
generic_toolchain.cmake
git.cmake
hex.cmake
host-tools.cmake cmake: -fmacro-prefix-map=${WEST_TOPDIR}=WEST_TOPDIR 2019-11-06 21:17:56 +01:00
kconfig.cmake cmake: make shield list available to Kconfig 2020-01-02 17:02:41 -05:00
kobj.cmake
pristine.cmake
python.cmake cmake: require python 3.6 or later 2019-12-18 10:15:45 +01:00
target_toolchain.cmake
version.cmake
zephyr_module.cmake