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

[xen master] xen/arm64: head: Rework PRINT() to work when the string is not withing +/- 1MB



commit 3460987c77b9b7efab07e1c538108d067590007e
Author:     Julien Grall <jgrall@xxxxxxxxxx>
AuthorDate: Thu Jun 29 20:56:18 2023 +0100
Commit:     Julien Grall <jgrall@xxxxxxxxxx>
CommitDate: Thu Jun 29 20:58:09 2023 +0100

    xen/arm64: head: Rework PRINT() to work when the string is not withing +/- 
1MB
    
    The instruction ADR is able to load an address of a symbol that is
    within the range +/- 1 MB of the instruction.
    
    While today Xen is quite small (~1MB), it could grow up to 2MB in the
    current setup. So there is no guarantee that the instruction can
    load the string address (stored in rodata).
    
    So replace the instruction ADR with the pseudo-instruction ADR_L
    which is able to handle symbol within the range +/- 4GB.
    
    Signed-off-by: Julien Grall <jgrall@xxxxxxxxxx>
    Reviewed-by: Michal Orzel <michal.orzel@xxxxxxx>
    Reviewed-by: Henry Wang <Henry.Wang@xxxxxxx>
---
 xen/arch/arm/arm64/head.S | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/xen/arch/arm/arm64/head.S b/xen/arch/arm/arm64/head.S
index f37133cf7c..c0e03755bb 100644
--- a/xen/arch/arm/arm64/head.S
+++ b/xen/arch/arm/arm64/head.S
@@ -90,7 +90,7 @@
  */
 #define PRINT(_s)          \
         mov   x3, lr ;     \
-        adr   x0, 98f ;    \
+        adr_l x0, 98f ;    \
         bl    puts    ;    \
         mov   lr, x3 ;     \
         RODATA_STR(98, _s)
--
generated by git-patchbot for /home/xen/git/xen.git#master



 


Rackspace

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