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

[PATCH 1/3] xen/arm64: head: Move earlyprintk 'hex' string to .rodata.str


  • To: <xen-devel@xxxxxxxxxxxxxxxxxxxx>
  • From: Michal Orzel <michal.orzel@xxxxxxx>
  • Date: Tue, 21 Nov 2023 10:45:14 +0100
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 165.204.84.17) smtp.rcpttodomain=lists.xenproject.org smtp.mailfrom=amd.com; dmarc=pass (p=quarantine sp=quarantine pct=100) action=none header.from=amd.com; dkim=none (message not signed); arc=none (0)
  • Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=eX7gUvzVwKqyo6vs+snwslITqoB77c3y+bXgXNG97pE=; b=fUv2utuoY5zp9EJKtfb6Qt3UOuW0jN7bwunLfVms//Xw+0cdWBNBGTsubbjDAbmCniJPGzrCv+FLfwmBT2EzOG3ECtwaRCeAFJOi8IAwzLOwOsepVjYZQezI9b8EcRqF5cAyDRPFdieH7MbAr2obHvDl2X2+SRKZQgCbY0Y/TEdJeSZEs0skfze3gjPd6iU5dxAMh6Wj8LuTj0mdzRyfqdLMf5XgL7GonTX1RW03mIcFp/qoOcLRh3tOmIyefxyg6peDq2y2FRQnwfC38QXnrW2vPxEzXz1i3DGPpT7qW0oqJFaKGv/5OWr9fAbprtrxv7AdyN1B3sN38diibOIcLw==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=NgwMNT0fEu8IPCKtGfYxM6WHbTPe2AnrlDZbhLrcAZ3iZOSZEMPzZyDpMGSfuAo5312y2dBXReOhdqCSmbo3rSRkheoRevFBwPB8zGgn+lmV894Dm1EL91vJc5D0C74Hd9mrCPUlpP/2j0hmWFus/pXd6qHRir2zpMOtkSA6ZXIM5sQ3zxjsrr2r5h2mRkANvZCgI15GC5NTCGHDxlT/1IFWzewrebbCz04IFpwv/sPkd4/dD4Ep6AkmJCVXpqoWM3fuK6JpNE9f2wtV11QpApjmED6YcpcrCNbWJoAdfsGko3qqSJ4bpFzYMLjtJGvTv0DKJHuS3U3r7EImJrF1TQ==
  • Cc: Michal Orzel <michal.orzel@xxxxxxx>, Stefano Stabellini <sstabellini@xxxxxxxxxx>, Julien Grall <julien@xxxxxxx>, Bertrand Marquis <bertrand.marquis@xxxxxxx>, Volodymyr Babchuk <Volodymyr_Babchuk@xxxxxxxx>
  • Delivery-date: Tue, 21 Nov 2023 09:45:49 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

At the moment, the 'hex' string is placed right after the 'putn'
function in the .text section. This is because of the limited range
(+/- 1MB) of PC relative 'adr' instruction 'putn' uses. Modify it to use
'adr_l' instead (range extended to +/- 4GB) and move the string to
.rodata.str. This way all the earlyprintk messages will be part of .rodata
and the behavior will be consistent with what we already do on arm32.

Signed-off-by: Michal Orzel <michal.orzel@xxxxxxx>
---
 xen/arch/arm/arm64/head.S | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/xen/arch/arm/arm64/head.S b/xen/arch/arm/arm64/head.S
index 8dbd3300d89f..b6111399e766 100644
--- a/xen/arch/arm/arm64/head.S
+++ b/xen/arch/arm/arm64/head.S
@@ -498,7 +498,7 @@ ENDPROC(asm_puts)
  * Clobbers x0-x3
  */
 putn:
-        adr   x1, hex
+        adr_l x1, hex
         mov   x3, #16
 1:
         early_uart_ready x23, 2
@@ -512,8 +512,7 @@ putn:
         ret
 ENDPROC(putn)
 
-hex:    .ascii "0123456789abcdef"
-        .align 2
+RODATA_STR(hex, "0123456789abcdef")
 
 #else  /* CONFIG_EARLY_PRINTK */
 
-- 
2.25.1




 


Rackspace

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