[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-devel] [PATCH] xen/arm: skip first page when RAM starts at 0x0



Xen assumes that RAM starts at addresses greater than 0x0 in a few
places. The PDX code is one of them but there are more.

For now, skip the first page in memory when the start addess is 0x0.

Signed-off-by: Stefano Stabellini <stefanos@xxxxxxxxxx>
---
 xen/arch/arm/bootfdt.c | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/xen/arch/arm/bootfdt.c b/xen/arch/arm/bootfdt.c
index 891b4b6..2ae4238 100644
--- a/xen/arch/arm/bootfdt.c
+++ b/xen/arch/arm/bootfdt.c
@@ -157,6 +157,13 @@ static void __init process_memory_node(const void *fdt, 
int node,
         device_tree_get_reg(&cell, address_cells, size_cells, &start, &size);
         if ( !size )
             continue;
+
+        /*
+         * Xen cannot deal with memory starting at 0x0. Burn the first
+         * page.
+         */
+        if ( start == 0 )
+            start += PAGE_SIZE;
         bootinfo.mem.bank[bootinfo.mem.nr_banks].start = start;
         bootinfo.mem.bank[bootinfo.mem.nr_banks].size = size;
         bootinfo.mem.nr_banks++;
-- 
1.9.1


_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxxx
https://lists.xenproject.org/mailman/listinfo/xen-devel

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.