From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from list by lists.gnu.org with archive (Exim 4.90_1) id 1lNOc6-0005cr-56 for mharc-grub-devel@gnu.org; Fri, 19 Mar 2021 19:33:06 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:55684) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lNObz-0005bF-WD for grub-devel@gnu.org; Fri, 19 Mar 2021 19:33:03 -0400 Received: from gate.crashing.org ([63.228.1.57]:59383) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lNObw-0001X5-1p for grub-devel@gnu.org; Fri, 19 Mar 2021 19:32:58 -0400 Received: from ip6-localhost (localhost.localdomain [127.0.0.1]) by gate.crashing.org (8.14.1/8.14.1) with ESMTP id 12JNUlOp019083; Fri, 19 Mar 2021 18:30:48 -0500 Message-ID: <9f6dda4fb3f259dcabd1c9adf772835cdb5aa471.camel@kernel.crashing.org> Subject: Re: [PATCH 3/5] ns8250: Add base support for MMIO UARTs From: Benjamin Herrenschmidt To: development@efficientek.com Cc: The development of GNU GRUB , Matthias Lange Date: Sat, 20 Mar 2021 10:30:47 +1100 In-Reply-To: <20210319121623.1119889e@crass-HP-ZBook-15-G2> References: <20210318220728.495970-1-benh@kernel.crashing.org> <20210318220728.495970-4-benh@kernel.crashing.org> <20210319121623.1119889e@crass-HP-ZBook-15-G2> Content-Type: text/plain; charset="UTF-8" User-Agent: Evolution 3.36.4-0ubuntu1 MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Received-SPF: permerror client-ip=63.228.1.57; envelope-from=benh@kernel.crashing.org; helo=gate.crashing.org X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, T_SPF_HELO_PERMERROR=0.01, T_SPF_PERMERROR=0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: grub-devel@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: The development of GNU GRUB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 19 Mar 2021 23:33:03 -0000 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.