From nobody Tue Apr 23 23:31:17 2024 Delivered-To: importer@patchew.org Received-SPF: none (zoho.com: 192.237.175.120 is neither permitted nor denied by domain of lists.xenproject.org) client-ip=192.237.175.120; envelope-from=xen-devel-bounces@lists.xenproject.org; helo=lists.xenproject.org; Authentication-Results: mx.zohomail.com; spf=none (zoho.com: 192.237.175.120 is neither permitted nor denied by domain of lists.xenproject.org) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org ARC-Seal: i=1; a=rsa-sha256; t=1557836575; cv=none; d=zoho.com; s=zohoarc; b=QtTKm5eZwjgXpJLM8RTQzhxc6IWnUyweoXvq1GBSWrZoIAGhjFq431kmu6Ekd0E+Dhcq9OyokuBxg8A9bvZfea1zYY/IifUsd9Xw9+cVEsqtbMCp1v1U5ty9RlH6nT33tEw68VjpABMS8l49fFhIPp1Zfb1wp6xFYc2OWwgllrg= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1557836575; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To:ARC-Authentication-Results; bh=LaGJNp285ZFjIJhqP3unIWqhVqJzUGz0Av5n0mhE8Ew=; b=YdYGEnWTMJWnDcHfjTE1lNXDHOORs2JLUPrppv/bBya9P3ZvnJ5hbDTM1Qzk1lbrTjZNhu+PtRWO5Xf3bPJmxZP/2cqpoIQr4NRb+WFgmt9ziAaINEP6bxNlCis+ZUKbtofQJqqrvkz/bqQOBrtc/B/W6DbbZcn0aBTa2AO8yUk= ARC-Authentication-Results: i=1; mx.zoho.com; spf=none (zoho.com: 192.237.175.120 is neither permitted nor denied by domain of lists.xenproject.org) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org Return-Path: Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) by mx.zohomail.com with SMTPS id 1557836575608268.3733081718435; Tue, 14 May 2019 05:22:55 -0700 (PDT) Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.89) (envelope-from ) id 1hQWRc-0008S2-IZ; Tue, 14 May 2019 12:22:08 +0000 Received: from all-amaz-eas1.inumbo.com ([34.197.232.57] helo=us1-amaz-eas2.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.89) (envelope-from ) id 1hQWRa-0008PL-Ma for xen-devel@lists.xenproject.org; Tue, 14 May 2019 12:22:06 +0000 Received: from foss.arm.com (unknown [217.140.101.70]) by us1-amaz-eas2.inumbo.com (Halon) with ESMTP id e2fce7da-7642-11e9-be88-bb4c75b274af; Tue, 14 May 2019 12:22:06 +0000 (UTC) Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.72.51.249]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id C92EE15AB; Tue, 14 May 2019 05:22:05 -0700 (PDT) Received: from e108454-lin.cambridge.arm.com (e108454-lin.cambridge.arm.com [10.1.196.50]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 963C23F71E; Tue, 14 May 2019 05:22:04 -0700 (PDT) X-Inumbo-ID: e2fce7da-7642-11e9-be88-bb4c75b274af From: Julien Grall To: xen-devel@lists.xenproject.org Date: Tue, 14 May 2019 13:21:24 +0100 Message-Id: <20190514122136.28215-16-julien.grall@arm.com> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20190514122136.28215-1-julien.grall@arm.com> References: <20190514122136.28215-1-julien.grall@arm.com> Subject: [Xen-devel] [PATCH MM-PART2 v2 08/19] xen/arm64: head: Move earlyprintk messages in .rodata.str X-BeenThere: xen-devel@lists.xenproject.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Cc: Oleksandr_Tyshchenko@epam.com, Julien Grall , Stefano Stabellini , Andrii Anisov MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Errors-To: xen-devel-bounces@lists.xenproject.org Sender: "Xen-devel" At the moment, the earlyprintk messages are interleaved with the instructions. This makes more difficult to read the objdump output. Introduce a new macro to add a string in .rodata.str and use it for all the earlyprintk messages. Signed-off-by: Julien Grall Reviewed-by: Andrii Anisov --- I haven't done a similar change in arm32 yet because the compiler will throw an error when using 'adr' when load an address from a different section (see A5-200 in ARM DDI 0406C.a for the technical reason). The change is likely to be more elaborate. Changes in v2: - Add Andrii's reviewed-by --- xen/arch/arm/arm64/head.S | 14 +++++--------- xen/include/asm-arm/asm_defns.h | 5 +++++ 2 files changed, 10 insertions(+), 9 deletions(-) diff --git a/xen/arch/arm/arm64/head.S b/xen/arch/arm/arm64/head.S index ad446e7345..b957eb90fb 100644 --- a/xen/arch/arm/arm64/head.S +++ b/xen/arch/arm/arm64/head.S @@ -81,13 +81,10 @@ /* Macro to print a string to the UART, if there is one. * Clobbers x0-x3. */ #ifdef CONFIG_EARLY_PRINTK -#define PRINT(_s) \ - adr x0, 98f ; \ - bl puts ; \ - b 99f ; \ -98: .asciz _s ; \ - .align 2 ; \ -99: +#define PRINT(_s) \ + adr x0, 98f ; \ + bl puts ; \ + RODATA_STR(98, _s) #else /* CONFIG_EARLY_PRINTK */ #define PRINT(s) #endif /* !CONFIG_EARLY_PRINTK */ @@ -633,8 +630,7 @@ init_uart: #endif adr x0, 1f b puts -1: .asciz "- UART enabled -\r\n" - .align 4 +RODATA_STR(1, "- UART enabled -\r\n") =20 /* Print early debug messages. * x0: Nul-terminated string to print. diff --git a/xen/include/asm-arm/asm_defns.h b/xen/include/asm-arm/asm_defn= s.h index 02be83e2b3..3f21def0ab 100644 --- a/xen/include/asm-arm/asm_defns.h +++ b/xen/include/asm-arm/asm_defns.h @@ -16,6 +16,11 @@ # error "unknown ARM variant" #endif =20 +#define RODATA_STR(label, msg) \ +.pushsection .rodata.str, "aMS", %progbits, 1 ; \ +label: .asciz msg; \ +.popsection + #endif /* __ARM_ASM_DEFNS_H__ */ /* * Local variables: --=20 2.11.0 _______________________________________________ Xen-devel mailing list Xen-devel@lists.xenproject.org https://lists.xenproject.org/mailman/listinfo/xen-devel