[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 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:
> > > > +config EARLY_UART_BASE_ADDRESS
> > > > +       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.
Still, it's better. I just need to add depends on ARM_64 for thunderx,
and that should be fine.
And that prevent users from setting a too hight value, as kconfig will
not accept a value outside the range.

Thanks,

-- 
Anthony PERARD

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxxx
https://lists.xenproject.org/mailman/listinfo/xen-devel

 


Rackspace

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