All of lore.kernel.org
 help / color / mirror / Atom feed
From: Russell King <rmk@arm.linux.org.uk>
To: Stuart MacDonald <stuartm@connecttech.com>
Cc: Khalid Aziz <khalid@fc.hp.com>,
	Linux kernel development list <linux-kernel@vger.kernel.org>
Subject: Re: Support for serial console on legacy free machines
Date: Tue, 31 Jul 2001 17:42:47 +0100	[thread overview]
Message-ID: <20010731174247.A21802@flint.arm.linux.org.uk> (raw)
In-Reply-To: <200107302332.f6UNWbxg001791@webber.adilger.int> <3B65F1A2.30708CC1@fc.hp.com> <000701c119cd$ebf0c720$294b82ce@connecttech.com>
In-Reply-To: <000701c119cd$ebf0c720$294b82ce@connecttech.com>; from stuartm@connecttech.com on Tue, Jul 31, 2001 at 10:34:35AM -0400

On Tue, Jul 31, 2001 at 10:34:35AM -0400, Stuart MacDonald wrote:
> That's very odd. That implies that serial consoles don't use the serial
> driver at all then, as the pci serial port setup is done at the same
> time as the regular serial port setups.
> 
> If a serial console is using serial.c, the pci serial ports will also
> be available.

No.  Console initialisation is done early, before PCI is setup.  This
means that the serial driver is relying on a static array of IO port
addresses.  At this time, the serial driver hasn't probed any ports at
all, so it doesn't really know what does and doesn't exist.

If, for example, you specify your console on ttyS25, (and you have
support for >=32 ports compiled in) I wonder what happens?  I can
see one of two things happening:

1. Kernel locks up waiting for the non-existent "transmitter" to become
   ready.
2. Kernel continues blindly writing to a non-existent port without
   locking up and you get no messages at all.

Now, this static table is updated after PCI and PNP initialisation, when
the ports are actually probed.  Your ttyS25 may now change port address
under the serial console!  I wonder what baud rate the messages come out
at?  75 baud? ;(

The more I think about this, the more that I think we need to get rid
of this early console initialisation.  I think Linus really wants early
console initialisation though, and to be honest, its an extremely useful
debugging tool for those pesky non-boots with blank displays.

[gratuitous plug]

I'm currently doing a lot of work on the serial drivers at the moment; the
ARM port currently has about 4 different uart based serial port types, and
I wasn't going to put up with 4 buggy copies of serial.c to drive each
type.

Therefore, I now have a set of serial drivers based around a serial core
(including the 16550 type) which I've been able to test out.  It is (I
hope) functionally equivalent to what is in 2.4.7.  It needs a little
more cleaning up, and a _lot_ more testing.  People interested can get
it from:

  :pserver:cvs@pubcvs.arm.linux.org.uk:/mnt/src/cvsroot (no login password)

To access it:

  cvs -d :pserver:cvs@pubcvs.arm.linux.org.uk:/mnt/src/cvsroot login
  cvs -d :pserver:cvs@pubcvs.arm.linux.org.uk:/mnt/src/cvsroot co serial

  Server note: If you want to use -z, please don't use anything above -z3.
  (failure to follow this will result in anon cvs being withdrawn or
  restricted). Thanks.

What isn't provided at the moment are the patches to the Makefiles and
Config.in files.  I'll include a patch for that later this evening.

If someone would like to produce a patch which adds an option for early
console vs "normal" console initialisation...  Otherwise I'll add it to
my (longish) "to do" list.

--
Russell King (rmk@arm.linux.org.uk)                The developer of ARM Linux
             http://www.arm.linux.org.uk/personal/aboutme.html


  parent reply	other threads:[~2001-07-31 16:43 UTC|newest]

Thread overview: 36+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-07-30 21:26 Support for serial console on legacy free machines Andreas Dilger
2001-07-30 21:38 ` Khalid Aziz
2001-07-30 22:40   ` Andreas Dilger
2001-07-30 22:53     ` Jan-Benedict Glaw
2001-07-30 22:53     ` Maciej W. Rozycki
2001-07-30 23:00     ` Khalid Aziz
2001-07-30 23:17       ` Randy.Dunlap
2001-07-30 23:39         ` Khalid Aziz
2001-07-30 23:52           ` Randy.Dunlap
2001-07-30 23:32       ` Andreas Dilger
2001-07-30 23:40         ` Ignacio Vazquez-Abrams
2001-07-30 23:45         ` Khalid Aziz
2001-07-31 14:34           ` Stuart MacDonald
2001-07-31 15:54             ` Miquel van Smoorenburg
2001-07-31 16:00             ` Eric W. Biederman
2001-07-31 16:10             ` Khalid Aziz
2001-07-31 16:39             ` Andreas Dilger
2001-07-31 18:43               ` Russell King
2001-08-01  2:01               ` Keith Owens
2001-07-31 16:42             ` Russell King [this message]
2001-07-31 17:14               ` Stuart MacDonald
2001-07-31 18:46                 ` Russell King
2001-08-01  3:21               ` Eric W. Biederman
2001-08-01  3:39                 ` Ignacio Vazquez-Abrams
2001-07-31  1:33     ` Keith Owens
2001-07-31  4:50       ` Johannes Erdfelt
2001-07-31 16:15         ` Khalid Aziz
2001-07-29 20:47           ` Alan Cox
2001-07-31 16:20           ` Randy.Dunlap
     [not found] <no.id>
2001-07-26 22:20 ` Alan Cox
2001-07-30 17:47   ` Khalid Aziz
  -- strict thread matches above, loose matches on Subject: below --
2001-07-26 21:13 Khalid Aziz
2001-07-27 13:28 ` Simon Richter
2001-07-30 17:49   ` Khalid Aziz
2001-07-30 18:21 ` Rik van Riel
2001-07-30 19:39   ` Khalid Aziz

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20010731174247.A21802@flint.arm.linux.org.uk \
    --to=rmk@arm.linux.org.uk \
    --cc=khalid@fc.hp.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=stuartm@connecttech.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.