All of lore.kernel.org
 help / color / mirror / Atom feed
From: Andrii Tseglytskyi <andrii.tseglytskyi@globallogic.com>
To: xen-devel@lists.xen.org, Ian Campbell <ian.campbell@citrix.com>,
	Stefano Stabellini <stefano.stabellini@citrix.com>,
	Tim Deegan <tim@xen.org>
Subject: [RFC PATCH] xen: arm: move rambase definitions to Rules.mk
Date: Fri, 22 Aug 2014 13:05:55 +0300	[thread overview]
Message-ID: <1408701955-26902-1-git-send-email-andrii.tseglytskyi@globallogic.com> (raw)

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.

Signed-off-by: Andrii Tseglytskyi <andrii.tseglytskyi@globallogic.com>
---
 tools/Rules.mk                | 9 +++++++++
 xen/arch/arm/Rules.mk         | 5 +++++
 xen/include/public/arch-arm.h | 3 ---
 3 files changed, 14 insertions(+), 3 deletions(-)

diff --git a/tools/Rules.mk b/tools/Rules.mk
index 5bac700..ebc1324 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_RAM0_BASE ?= 0x40000000ULL
+GUEST_RAM0_SIZE ?= 0xc0000000ULL
+CFLAGS += -DGUEST_RAM0_BASE=$(GUEST_RAM0_BASE)
+CFLAGS += -DGUEST_RAM0_SIZE=$(GUEST_RAM0_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..ba7dbb8 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_RAM0_BASE ?= 0x40000000ULL
+GUEST_RAM0_SIZE ?= 0xc0000000ULL
+CFLAGS += -DGUEST_RAM0_BASE=$(GUEST_RAM0_BASE)
+CFLAGS += -DGUEST_RAM0_SIZE=$(GUEST_RAM0_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..a31ed72 100644
--- a/xen/include/public/arch-arm.h
+++ b/xen/include/public/arch-arm.h
@@ -380,9 +380,6 @@ 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_RAM1_BASE   0x0200000000ULL /* 1016GB of RAM @ 8GB */
 #define GUEST_RAM1_SIZE   0xfe00000000ULL
 
-- 
1.9.1

             reply	other threads:[~2014-08-22 10:05 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-08-22 10:05 Andrii Tseglytskyi [this message]
2014-08-22 10:14 ` [RFC PATCH] xen: arm: move rambase definitions to Rules.mk Tamas K Lengyel
2014-08-22 10:22   ` Andrii Tseglytskyi
2014-08-22 10:27     ` Tamas K Lengyel
2014-08-22 10:30       ` Andrii Tseglytskyi

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1408701955-26902-1-git-send-email-andrii.tseglytskyi@globallogic.com \
    --to=andrii.tseglytskyi@globallogic.com \
    --cc=ian.campbell@citrix.com \
    --cc=stefano.stabellini@citrix.com \
    --cc=tim@xen.org \
    --cc=xen-devel@lists.xen.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.