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

Re: [Xen-devel] [XEN PATCH v3 2/2] xen/arm: Configure early printk via Kconfig


On 11/03/2020 17:38, Anthony PERARD wrote:
On Wed, Mar 11, 2020 at 05:21:24PM +0000, Julien Grall wrote:
On 11/03/2020 15:26, Anthony PERARD wrote:
On Wed, Mar 11, 2020 at 02:18:20PM +0000, Julien Grall wrote:
+       depends on EARLY_PRINTK
+       hex "Early printk, physical base address of debug UART"
+       default 0x87e024000000 if EARLY_PRINTK_THUNDERX

You are allowing EARLY_PRINTK_THUNDERX to be selected on Arm32 platform but
the address is above 4G. I suspect this would break randconfig build.

gcc doesn't seems to complain :-).

I was expecting GAS to throw an error because the 64-bit value does not fit
in a 32-bit register. But... it looks like GAS will silently truncate the
value to 0x24000000 :(.
(I mean "arm-none-eabi-gcc (Arch Repository) 9.2.0")

But I can have thunderx depends on arm_64.
Is there a way to constrainst the address in Kconfig?

There is! I can add "range 0x0 0xffffffff if ARM_32".
But Kconfig doesn't say anything if a default value is too high, and
silently set the value to the maximum.

Lovely. It would have been nice from Kconfig to warn you if the default is not in the range. Maybe a future improvement?

Still, it's better. I just need to add depends on ARM_64 for thunderx,
and that should be fine.

I agree that this would make things better.

And that prevent users from setting a too hight value, as kconfig will
not accept a value outside the range.


Julien Grall

Xen-devel mailing list



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