[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH 5/7] xen/arm32: head: Move earlyprintk messages to .rodata.str
- To: Julien Grall <julien@xxxxxxx>
- From: Bertrand Marquis <Bertrand.Marquis@xxxxxxx>
- Date: Mon, 15 Aug 2022 16:26:09 +0000
- Accept-language: en-GB, en-US
- Arc-authentication-results: i=2; mx.microsoft.com 1; spf=pass (sender ip is 63.35.35.123) smtp.rcpttodomain=lists.xenproject.org smtp.mailfrom=arm.com; dmarc=pass (p=none sp=none pct=100) action=none header.from=arm.com; dkim=pass (signature was verified) header.d=armh.onmicrosoft.com; arc=pass (0 oda=1 ltdi=1 spf=[1,1,smtp.mailfrom=arm.com] dkim=[1,1,header.d=arm.com] dmarc=[1,1,header.from=arm.com])
- Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=arm.com; dmarc=pass action=none header.from=arm.com; dkim=pass header.d=arm.com; arc=none
- Arc-message-signature: i=2; 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=VHUlui5ehqh+eNqBwepYB92QK7qHRIZO+GcpZka7ItQ=; b=ETLFk/0XXiR/FOMODbUrHS+l9Bk/Y4c6Ugdi4SsC8+MJc/9/RADtWd6cXQ8xQvuE88SrZbIWrDX9dkIfJ9YLMdeg5dwfamZ2Jdfw34M+04jdZoOZIlhBZCBjIBJsMdfXLwFCASBgdDmxpDNqpO+mq5u1C2/SNjTi1X1rkNHHoWjW6oWcpJ5ErlCx54mZ3pymXAlFHx/Z6Mg17iHvwzSLayYyMmSvOHwQBPB273FrJ76/NdeqQJXFHNX4idnmvkCuA997Q81gS8lHpwm2wbgvHjLCToYGApg9e8MleTpY/S3CcqEO/CvxMOLrL9HgBKT/Tp7dsanMxY2PSBLIIF57SA==
- 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=VHUlui5ehqh+eNqBwepYB92QK7qHRIZO+GcpZka7ItQ=; b=kZVYuPHmQ/eJHSHj7Uis0rb1AVRu+SLugYIUBKbEHfaaUB+tolSMI1ydK6Wv6PDQikrEYIR9JIT3JtWLT6MmVRcckgQxPyaxohTLwjjNEP+lTE8/S240fapwx0e4IgTtnzOW2CLJgGNtG9+h623UeWEEvWAgK8GsnTED6TM8+M79fg+UreqnH6zsgFtA4qTAnpRviWqqK2DMjAb/8aQH87cbSKHHICzV7fsyNLZDqz+yKG1SgCWSteChm5hoOzCZrP37RiJR/Uzuyxp0IdFhvYP0NjCA8DAn4QSIZiq5o+jDplvcTlStXAMPUXzRowWxjekV4ApF82+QZea8Az850w==
- Arc-seal: i=2; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=pass; b=eVBVrxQkTbOA5nSnUAdjczZCv2rYOCWnAQHhTS9NWaSUKvYSCAvG5v8zzLqk7h6w7sZI5uWAINcoPBHSMmfFdd4Y8lj9F2ouX7AgxaaJkYaANbG/rI8HzgomjTvDQ5SrKkcIEe8ly+UyupLrrkcV1YdEIH21OLL9wwFuChLXHr2CsA8IOfUiSC2VRclFHkzNQ4rYCjr4XPpe8DY8J2aWJ9Ue1EEFNUxATnkMqMk2yVoEaYHsbQDmLBlzSjVcvfevrPkGF4FZIUHYEo9LYC/RCT8exaXVohDBWwL4PWFqSVmZUxycpCMOeoHsMEu9KFKfed8HhyYPWj8F7bj8Ordz2w==
- Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=e2Em6iDdWUYdU1nUk4L4531+2i0PiI8R5yIbaGjs3azTMW5LzZBRUE+JndVb6/TFM8HGsqcA/IlSj1T0iCjMSRHxvigN6GIHsFQD7r8rw/djIw4hvm9hKEGJCJGXqVqS29u1YiTZMQn6BXgEy+kfh5CriVIPey1H9OgU7KEfM9sSUd3UUMRNip+CVyT+iFPJy0w8I84V98eJrDaQ/ZQREPsrwsXlosq4sfEbfScEFz+4gYMMmTxoFriUAbx1uf1EuIeuxgaBsb/FZm1QATUWmZG2WOkX4gcOddOUpTSgW0MpwL0M5YJvTOhlo80c4YT4HMWDWQWHmVqMBA0+ylZUFw==
- Authentication-results-original: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=arm.com;
- Cc: xen-devel <xen-devel@xxxxxxxxxxxxxxxxxxxx>, Julien Grall <jgrall@xxxxxxxxxx>, Stefano Stabellini <sstabellini@xxxxxxxxxx>, Volodymyr Babchuk <Volodymyr_Babchuk@xxxxxxxx>
- Delivery-date: Mon, 15 Aug 2022 16:26:42 +0000
- List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
- Nodisclaimer: true
- Original-authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=arm.com;
- Thread-index: AQHYroFE1VxGeWNFD0afucoI1xWJU62wKm8A
- Thread-topic: [PATCH 5/7] xen/arm32: head: Move earlyprintk messages to .rodata.str
Hi Julien,
> On 12 Aug 2022, at 20:24, Julien Grall <julien@xxxxxxx> wrote:
>
> From: Julien Grall <jgrall@xxxxxxxxxx>
>
> At the moment, the strings are in text right after each use because
> the instruction 'adr' has specific requirement on the location
> and the compiler will forbid cross section label.
>
> The macro 'adr_l' was recently reworked so the caller doesn't need
> to know whether the MMU is on. This makes it easier to use where
> instructions can be run in both context.
>
> This also means that the strings don't need to be part of .text
> anymore. So move them to .rodata.str.
>
> Signed-off-by: Julien Grall <jgrall@xxxxxxxxxx>
Reviewed-by: Bertrand Marquis <bertrand.marquis@xxxxxxx>
Tested by enabling early printk on qemu arm32 and it works so:
Tested-by: Bertrand Marquis <bertrand.marquis@xxxxxxx>
Cheers
Bertrand
> ---
> xen/arch/arm/arm32/head.S | 12 ++++--------
> 1 file changed, 4 insertions(+), 8 deletions(-)
>
> diff --git a/xen/arch/arm/arm32/head.S b/xen/arch/arm/arm32/head.S
> index 27d02ac8d68f..a558c2a6876e 100644
> --- a/xen/arch/arm/arm32/head.S
> +++ b/xen/arch/arm/arm32/head.S
> @@ -93,13 +93,10 @@
> */
> #define PRINT(_s) \
> mov r3, lr ;\
> - adr r0, 98f ;\
> + adr_l r0, 98f ;\
> bl puts ;\
> mov lr, r3 ;\
> - b 99f ;\
> -98: .asciz _s ;\
> - .align 2 ;\
> -99:
> + RODATA_STR(98, _s)
>
> /*
> * Macro to print the value of register \rb
> @@ -736,7 +733,7 @@ ENDPROC(puts)
> * Clobbers r0-r3
> */
> putn:
> - adr r1, hex
> + adr_l r1, hex
> mov r3, #8
> 1:
> early_uart_ready r11, r2
> @@ -749,8 +746,7 @@ putn:
> mov pc, lr
> ENDPROC(putn)
>
> -hex: .ascii "0123456789abcdef"
> - .align 2
> +RODATA_STR(hex, "0123456789abcdef")
>
> #else /* CONFIG_EARLY_PRINTK */
>
> --
> 2.37.1
>
|