diff mbox

[Xen-devel,v2,4/8] tools: arm: rearrange guest physical address space to increase max RAM

Message ID 1398424967-9306-4-git-send-email-ian.campbell@citrix.com
State New
Headers show

Commit Message

Ian Campbell April 25, 2014, 11:22 a.m. UTC
By switching things around we can manage to expose up to 3GB of RAM to guests.

I deliberately didn't place the RAM at address 0 to avoid coming to rely on
this, so the various peripherals, MMIO and magic pages etc all live in the
lower 1GB leaving the upper 3GB available for RAM.

It would likely have been possible to reduce the space used by the peripherals
etc and allow for 3.5 or 3.75GB but I decided to keep things simple and will
handle >3GB memory in a subsequent patch.

Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
---
 xen/include/public/arch-arm.h |   18 +++++++++---------
 1 file changed, 9 insertions(+), 9 deletions(-)

Comments

Julien Grall April 25, 2014, 12:14 p.m. UTC | #1
Hi Ian,

On 25/04/14 12:22, Ian Campbell wrote:
> By switching things around we can manage to expose up to 3GB of RAM to guests.
>
> I deliberately didn't place the RAM at address 0 to avoid coming to rely on
> this, so the various peripherals, MMIO and magic pages etc all live in the
> lower 1GB leaving the upper 3GB available for RAM.
>
> It would likely have been possible to reduce the space used by the peripherals
> etc and allow for 3.5 or 3.75GB but I decided to keep things simple and will
> handle >3GB memory in a subsequent patch.

I guess I will have to rework the layout when device assignment will be 
added.

In any case:

Acked-by: Julien Grall <julien.grall@linaro.org>


> Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
> ---
>   xen/include/public/arch-arm.h |   18 +++++++++---------
>   1 file changed, 9 insertions(+), 9 deletions(-)
>
> diff --git a/xen/include/public/arch-arm.h b/xen/include/public/arch-arm.h
> index a94d16b..4149d6f 100644
> --- a/xen/include/public/arch-arm.h
> +++ b/xen/include/public/arch-arm.h
> @@ -364,18 +364,18 @@ typedef uint64_t xen_callback_t;
>    */
>
>   /* Physical Address Space */
> -#define GUEST_GICD_BASE   0x2c001000ULL
> -#define GUEST_GICD_SIZE   0x1000ULL
> -#define GUEST_GICC_BASE   0x2c002000ULL
> -#define GUEST_GICC_SIZE   0x100ULL
> +#define GUEST_GICD_BASE   0x03001000ULL
> +#define GUEST_GICD_SIZE   0x00001000ULL
> +#define GUEST_GICC_BASE   0x03002000ULL
> +#define GUEST_GICC_SIZE   0x00000100ULL
>
> -#define GUEST_RAM_BASE    0x80000000ULL /* 768M @ 2GB */
> -#define GUEST_RAM_SIZE    0x30000000ULL
> -
> -#define GUEST_GNTTAB_BASE 0xb0000000ULL
> +#define GUEST_GNTTAB_BASE 0x38000000ULL
>   #define GUEST_GNTTAB_SIZE 0x00020000ULL
>
> -#define GUEST_MAGIC_BASE  0xc0000000ULL
> +#define GUEST_MAGIC_BASE  0x39000000ULL
> +
> +#define GUEST_RAM_BASE    0x40000000ULL /* 3GB of RAM @ 1GB */
> +#define GUEST_RAM_SIZE    0xc0000000ULL
>
>   /* Interrupts */
>   #define GUEST_TIMER_VIRT_PPI    27
>
diff mbox

Patch

diff --git a/xen/include/public/arch-arm.h b/xen/include/public/arch-arm.h
index a94d16b..4149d6f 100644
--- a/xen/include/public/arch-arm.h
+++ b/xen/include/public/arch-arm.h
@@ -364,18 +364,18 @@  typedef uint64_t xen_callback_t;
  */
 
 /* Physical Address Space */
-#define GUEST_GICD_BASE   0x2c001000ULL
-#define GUEST_GICD_SIZE   0x1000ULL
-#define GUEST_GICC_BASE   0x2c002000ULL
-#define GUEST_GICC_SIZE   0x100ULL
+#define GUEST_GICD_BASE   0x03001000ULL
+#define GUEST_GICD_SIZE   0x00001000ULL
+#define GUEST_GICC_BASE   0x03002000ULL
+#define GUEST_GICC_SIZE   0x00000100ULL
 
-#define GUEST_RAM_BASE    0x80000000ULL /* 768M @ 2GB */
-#define GUEST_RAM_SIZE    0x30000000ULL
-
-#define GUEST_GNTTAB_BASE 0xb0000000ULL
+#define GUEST_GNTTAB_BASE 0x38000000ULL
 #define GUEST_GNTTAB_SIZE 0x00020000ULL
 
-#define GUEST_MAGIC_BASE  0xc0000000ULL
+#define GUEST_MAGIC_BASE  0x39000000ULL
+
+#define GUEST_RAM_BASE    0x40000000ULL /* 3GB of RAM @ 1GB */
+#define GUEST_RAM_SIZE    0xc0000000ULL
 
 /* Interrupts */
 #define GUEST_TIMER_VIRT_PPI    27