This allows us to load inmates to arbitrary locations. This patch preserves the current default behaviour.
Signed-off-by: Ralf Ramsauer <[email protected]> --- inmates/Makefile | 2 +- inmates/lib/arm/inmate.lds.S | 10 ++++++++-- inmates/lib/arm64/inmate.lds.S | 10 ++++++++-- 3 files changed, 17 insertions(+), 5 deletions(-) diff --git a/inmates/Makefile b/inmates/Makefile index b5fa016e..507d364f 100644 --- a/inmates/Makefile +++ b/inmates/Makefile @@ -23,7 +23,7 @@ ifeq ($(subst arm64,arm,$(SRCARCH)),arm) INCLUDES += -I$(src)/../hypervisor/arch/arm-common/include endif -LINUXINCLUDE := +LINUXINCLUDE := -I$(src)/../hypervisor/include KBUILD_AFLAGS += $(INCLUDES) KBUILD_CFLAGS := -g -Os -Wall -Wstrict-prototypes -Wtype-limits \ -Wmissing-declarations -Wmissing-prototypes \ diff --git a/inmates/lib/arm/inmate.lds.S b/inmates/lib/arm/inmate.lds.S index fe132532..21649475 100644 --- a/inmates/lib/arm/inmate.lds.S +++ b/inmates/lib/arm/inmate.lds.S @@ -12,11 +12,17 @@ * the COPYING file in the top-level directory. */ +#include <jailhouse/config.h> + +#ifndef CONFIG_INMATE_BASE +#define CONFIG_INMATE_BASE 0x0 +#endif + SECTIONS { - . = 0; + . = CONFIG_INMATE_BASE; .boot : { *(.boot) } - . = 0x100; + . = CONFIG_INMATE_BASE + 0x100; .cmdline : { *(.cmdline) BYTE(0); /* empty string in case no buffer is provided */ diff --git a/inmates/lib/arm64/inmate.lds.S b/inmates/lib/arm64/inmate.lds.S index 01ba5f54..d6fb3285 100644 --- a/inmates/lib/arm64/inmate.lds.S +++ b/inmates/lib/arm64/inmate.lds.S @@ -10,11 +10,17 @@ * the COPYING file in the top-level directory. */ +#include <jailhouse/config.h> + +#ifndef CONFIG_INMATE_BASE +#define CONFIG_INMATE_BASE 0x0 +#endif + SECTIONS { - . = 0; + . = CONFIG_INMATE_BASE; .boot : { *(.boot) } - . = 0x1000; + . = CONFIG_INMATE_BASE + 0x1000; .cmdline : { *(.cmdline) BYTE(0); /* empty string in case no buffer is provided */ -- 2.12.2 -- You received this message because you are subscribed to the Google Groups "Jailhouse" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/d/optout.
