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

Re: [PATCH] xen/arm: debug-pl011: Use 32-bit accessors for broader compatibility





On 06/06/2023 08:04, Michal Orzel wrote:
Hi Julien,

Hi Michal,

On 05/06/2023 20:34, Julien Grall wrote:
I can think of the following patches:
1) Use correct accessors for early pl011 on arm32 and arm64
- this would use the accessors depending on the given register size (ldrh, 
strh, strb)
- this would switch arm32 from 32-bit only to the same behavior as arm64

2) Support for 32-bit only PL011 in early pl011 on arm32 and arm64:
- this would result in overwriting the changes done in patch 1 (but I'd prefer 
not to do all in one patch for better history/backporting)
as I'd have to introduce some macros e.g. PL011_STRH that would be defined as 
strh in normal case and str in mmio32 case, etc. I could also
just duplicate all the early functions and use ifdefery if that's what would be 
preferred.

I would be fine with introduce PL011_STRH & co.


3) Use correct accessors for runtime pl011:
I would prefer to do what Linux does meaning using the largest-common accessor 
in normal-case (i.e. readw/writew) so that we can have a generic helpers
(i.e. use readl/writel in mmio32 case or readw/writew in normal case). 
Otherwise we would have to use the accessors depending on the given register 
size
(like in early printk) which destroys the idea of generic helpers. Linux for 
earlycon also uses per-register size accessor and in runtime - largest-common.

Make senses.

Cheers,

--
Julien Grall



 


Rackspace

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