diff mbox series

[1/2] xen/arm32: head: Move earlyprintk 'hex' to .rodata.idmap

Message ID 20240115124859.89218-2-michal.orzel@amd.com (mailing list archive)
State New
Headers show
Series xen/arm: head: early printk on 1:1 mapping | expand

Commit Message

Michal Orzel Jan. 15, 2024, 12:48 p.m. UTC
Thanks to 1ec3fe1f664f ("xen/arm32: head: Improve logging in head.S"),
we can now use PRINT_ID() macro to print messages when running on
identity mapping. For that, all the strings need to be part of the first
page that is mapped. This is not the case for a 'hex' string (used by
asm_putn when printing register values), which currently resides in
.rodata.str. Move it to .rodata.idmap to allow making use of print_reg
macro from anywhere (mostly to aid debugging).

Signed-off-by: Michal Orzel <michal.orzel@amd.com>
---
 xen/arch/arm/arm32/head.S | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Julien Grall Jan. 15, 2024, 6:51 p.m. UTC | #1
Hi Michal,

On 15/01/2024 12:48, Michal Orzel wrote:
> Thanks to 1ec3fe1f664f ("xen/arm32: head: Improve logging in head.S"),
> we can now use PRINT_ID() macro to print messages when running on
> identity mapping. For that, all the strings need to be part of the first
> page that is mapped. This is not the case for a 'hex' string (used by
> asm_putn when printing register values), which currently resides in
> .rodata.str. Move it to .rodata.idmap to allow making use of print_reg
> macro from anywhere (mostly to aid debugging).
> 
> Signed-off-by: Michal Orzel <michal.orzel@amd.com>

Acked-by: Julien Grall <jgrall@amazon.com>

Cheers,
diff mbox series

Patch

diff --git a/xen/arch/arm/arm32/head.S b/xen/arch/arm/arm32/head.S
index 99d7d4aa63d1..b488a21a71ba 100644
--- a/xen/arch/arm/arm32/head.S
+++ b/xen/arch/arm/arm32/head.S
@@ -320,7 +320,7 @@  ENTRY(asm_putn)
         mov   pc, lr
 ENDPROC(asm_putn)
 
-RODATA_STR(hex, "0123456789abcdef")
+RODATA_SECT(.rodata.idmap, hex, "0123456789abcdef")
 
 #endif /* CONFIG_EARLY_PRINTK */