grub-devel
[Top][All Lists]
Advanced

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

Re: [PATCH 3/5] ns8250: Add base support for MMIO UARTs


From: Benjamin Herrenschmidt
Subject: Re: [PATCH 3/5] ns8250: Add base support for MMIO UARTs
Date: Sat, 20 Mar 2021 10:30:47 +1100
User-agent: Evolution 3.36.4-0ubuntu1

On Fri, 2021-03-19 at 12:16 -0500, Glenn Washburn wrote:
> diff --git a/grub-core/term/serial.c b/grub-core/term/serial.c
> 
> > index f9271b092..7d4dbb2de 100644
> > --- a/grub-core/term/serial.c
> > +++ b/grub-core/term/serial.c
> > @@ -160,6 +160,18 @@ grub_serial_find (const char *name)
> >         if (!name)
> >        return NULL;
> >   
> > +      FOR_SERIAL_PORTS (port)
> > +     if (grub_strcmp (port->name, name) == 0)
> > +       break;
> > +    }
> > +  if (!port && grub_memcmp (name, "mmio", sizeof ("mmio") - 1) == 0
> > +      && grub_isxdigit (name [sizeof ("mmio") - 1]))
> 
> 
> It would look nicer if the prefix were "mmio:" to more clearly mark it
> as a prefix.

It would but it would diverge from what is done above for port IO
already.

If you look at the caller(s) of grub_serial_find, they basically build
a portNNN string and pass that, unless I misread the code dramatically.

So I wanted to keep this consistent. This is exposed to the user via
the gdb commands, it's not only an internal representation, so if we
want to change *both*, we would have to hack the gdb code to convert
portNNN to port:NNN

Cheers,
Ben.





reply via email to

[Prev in Thread] Current Thread [Next in Thread]