Skip to contentSkip to conversation

xen/arm64: Use virtual address when setting up early_printk fixmap

PATCH In review Chen Baozi 2 participants 3 messages Apr 7, 2015

lore
Share & tools
lore

Chen Baozi

author
#0 lore raw

PATCH 1/1 xen/arm64: Use virtual address when setting up early_printk fixmap

From: Chen Baozi <[email protected]>

We have already had the boot pagetable when reaching the point of early_printk fixmap setup. Thus there is no longer necessary to caculate physical address of xen_fixmap.

---
 xen/arch/arm/arm64/head.S | 1 -
 1 file changed, 1 deletion(-)
xen/arch/arm/arm64/head.S +0 -1
index 75b7ee1..a2ac2d4 100644
@@ -520,7 +520,6 @@ paging:
 
         /* Add UART to the fixmap table */
         ldr   x1, =xen_fixmap
-        add   x1, x1, x20            /* x1 := paddr (xen_fixmap) */
         lsr   x2, x23, #THIRD_SHIFT
         lsl   x2, x2, #THIRD_SHIFT   /* 4K aligned paddr of UART */
         mov   x3, #PT_DEV_L3
Signature · 1 line
2.1.4
#1 lore raw

Hi Chen,

Quoted 5 lines · Chen Baozi

From: Chen Baozi <[email protected]>

We have already had the boot pagetable when reaching the point of early_printk fixmap setup. Thus there is no longer necessary to caculate physical address of xen_fixmap.

s/caculate/calculate/

OOI, is it a bug or a clean up?

Quoted 11 lines
---
  xen/arch/arm/arm64/head.S | 1 -
  1 file changed, 1 deletion(-)
xen/arch/arm/arm64/head.S +0 -0
index 75b7ee1..a2ac2d4 100644

xen/arch/arm/arm64/head.S paging: · line 523

Quoted 4 lines
xen/arch/arm/arm64/head.S +0 -1
@@ -520,7 +520,6 @@ paging:
 
          /* Add UART to the fixmap table */
          ldr   x1, =xen_fixmap
-        add   x1, x1, x20            /* x1 := paddr (xen_fixmap) */

You need to add a comment on "ldr x1..." in order to explain what x1 contains. i.e /* x1 := vaddr (xen_fixmap) */

Regards,

Signature · 1 line
Julien Grall
author
#2 lore raw
Quoted 11 lines · Julien Grall

Hi Chen,

Quoted 5 lines · Chen Baozi

From: Chen Baozi <[email protected]>

We have already had the boot pagetable when reaching the point of early_printk fixmap setup. Thus there is no longer necessary to caculate physical address of xen_fixmap.

s/caculate/calculate/

Oops, ;-)

Quoted 2 lines

OOI, is it a bug or a clean up?

I think it should be a clean up. There is 1:1 mapping at early stage. So it is all right to access the 'physical' address.

Quoted 13 lines
Quoted 13 lines
---
 xen/arch/arm/arm64/head.S | 1 -
 1 file changed, 1 deletion(-)
xen/arch/arm/arm64/head.S +0 -0
index 75b7ee1..a2ac2d4 100644
@@ -520,7 +520,6 @@ paging:
 
Quoted 6 lines

xen/arch/arm/arm64/head.S paging: · line 523

Quoted 3 lines
xen/arch/arm/arm64/head.S +0 -1
         /* Add UART to the fixmap table */
         ldr   x1, =xen_fixmap
-        add   x1, x1, x20            /* x1 := paddr (xen_fixmap) */

You need to add a comment on "ldr x1..." in order to explain what x1 contains. i.e /* x1 := vaddr (xen_fixmap) */

Ok. I'll add it in V2.

Cheers,

Baozi.