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

Re: [RFCv4,28/35] plat/kvm/arm: Add a memory hole at the beginning 128M



This patch looks good to me, I've only found a problem with a comment:

@@ -83,14 +87,29 @@  ENTRY(create_pagetables)
        bl  link_l0_pagetable
 
        /*
-        * Using 1GiB block to map device address space (0x0 ~ 0x3fffffff)

I think the comment below should become "Using 1GiB block to map the hole 
memory (0x0 ~ 0x7ffffff) and device
address space (0x8000000 ~ 0x3fffffff)", since the device address space doesn't 
start at 0x0 anymore.

+        * Using 1GiB block to map the hole memory (0x0 ~ 0x7ffffff) and device
+        * address space (0x0 ~ 0x3fffffff)
         */
-       add x6, x14, #L1_TABLE_OFFSET
+       /* Build a L2 block pagetable */
+       add x6, x14, #L2_TABLE_OFFSET
+       ldr x7, =0 /* NONE ATTR*/
+       mov x8, #HOLE_START
+       mov x9, x8
+       ldr x10, =HOLE_MEM_ENTRIES
+       bl  build_l2_block_pagetable
+
+       add x6, x14, #L2_TABLE_OFFSET
        ldr x7, =SECT_ATTR_DEVICE_nGnRE
        mov x8, #DEVICE_ADDR_START
        mov x9, x8
-       mov x10, #1
-       bl  build_l1_block_pagetable
+       ldr x10, =DEVICE_ENTRIES
+       bl  build_l2_block_pagetable
+
+       /* Link this L2 block pagetable to L1 entry */
+       add x6, x14, #L1_TABLE_OFFSET
+       mov x8, #HOLE_START
+       add x9, x14, #L2_TABLE_OFFSET
+       bl  link_l1_pagetable

Reviewed-by: Razvan Virtan <virtanrazvan@xxxxxxxxx>



 


Rackspace

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