[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-devel] [RFC PATCH v2] xen: arm: move rambase definitions to Rules.mk
The reason of this pathch is the following - guest domain OS may use iomem mappings. It is a typical way to handle devices in domU. On some SoCs iomem starts from 0x40000000 base. Therefore it is almost impossible to use iomem mappings, because it conflicts with GUEST_RAM0_BASE pointer, which has similar value. Patch allows to configure this from compile command line. Verified on OMAP5 with the following settings: GUEST_CFG_RAM_BASE=0x80000000ULL GUEST_CFG_RAM_SIZE=0x80000000ULL Changes in v2: - GUEST_RAM0_BASE and GUEST_RAM0_SIZE definitions kept in public header Signed-off-by: Andrii Tseglytskyi <andrii.tseglytskyi@xxxxxxxxxxxxxxx> --- tools/Rules.mk | 9 +++++++++ xen/arch/arm/Rules.mk | 5 +++++ xen/include/public/arch-arm.h | 4 ++-- 3 files changed, 16 insertions(+), 2 deletions(-) diff --git a/tools/Rules.mk b/tools/Rules.mk index 5bac700..4cf3603 100644 --- a/tools/Rules.mk +++ b/tools/Rules.mk @@ -35,6 +35,15 @@ INSTALL_SHLIB = : install-shlib-unsupported-fail SYMLINK_SHLIB = : symlink-shlib-unsupported-fail endif +TOOLS_TARGET_ARCH := $(shell echo $(XEN_TARGET_ARCH) | \ + sed -e 's/x86.*/x86/' -e s'/arm\(32\|64\)/arm/g') +ifeq ($(TOOLS_TARGET_ARCH),arm) +GUEST_CFG_RAM_BASE ?= 0x40000000ULL +GUEST_CFG_RAM_SIZE ?= 0xc0000000ULL +CFLAGS += -DGUEST_CFG_RAM_BASE=$(GUEST_CFG_RAM_BASE) +CFLAGS += -DGUEST_CFG_RAM_SIZE=$(GUEST_CFG_RAM_SIZE) +endif + CFLAGS_libxenctrl = -I$(XEN_LIBXC) $(CFLAGS_xeninclude) LDLIBS_libxenctrl = $(XEN_LIBXC)/libxenctrl$(libextension) SHLIB_libxenctrl = -Wl,-rpath-link=$(XEN_LIBXC) diff --git a/xen/arch/arm/Rules.mk b/xen/arch/arm/Rules.mk index 8658176..f590f0a 100644 --- a/xen/arch/arm/Rules.mk +++ b/xen/arch/arm/Rules.mk @@ -104,6 +104,11 @@ ifneq ($(EARLY_PRINTK_INC),) EARLY_PRINTK := y endif +GUEST_CFG_RAM_BASE ?= 0x40000000ULL +GUEST_CFG_RAM_SIZE ?= 0xc0000000ULL +CFLAGS += -DGUEST_CFG_RAM_BASE=$(GUEST_CFG_RAM_BASE) +CFLAGS += -DGUEST_CFG_RAM_SIZE=$(GUEST_CFG_RAM_SIZE) + CFLAGS-$(EARLY_PRINTK) += -DCONFIG_EARLY_PRINTK CFLAGS-$(EARLY_PRINTK_INIT_UART) += -DEARLY_PRINTK_INIT_UART CFLAGS-$(EARLY_PRINTK) += -DEARLY_PRINTK_INC=\"debug-$(EARLY_PRINTK_INC).inc\" diff --git a/xen/include/public/arch-arm.h b/xen/include/public/arch-arm.h index ac54cd6..079da2a 100644 --- a/xen/include/public/arch-arm.h +++ b/xen/include/public/arch-arm.h @@ -380,8 +380,8 @@ typedef uint64_t xen_callback_t; #define GUEST_RAM_BANKS 2 -#define GUEST_RAM0_BASE 0x40000000ULL /* 3GB of low RAM @ 1GB */ -#define GUEST_RAM0_SIZE 0xc0000000ULL +#define GUEST_RAM0_BASE GUEST_CFG_RAM_BASE /* configured from command line */ +#define GUEST_RAM0_SIZE GUEST_CFG_RAM_SIZE #define GUEST_RAM1_BASE 0x0200000000ULL /* 1016GB of RAM @ 8GB */ #define GUEST_RAM1_SIZE 0xfe00000000ULL -- 1.9.1 _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxx http://lists.xen.org/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |