lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <200705211027.38958.bjorn.helgaas@hp.com>
Date:	Mon, 21 May 2007 10:27:38 -0600
From:	Bjorn Helgaas <bjorn.helgaas@...com>
To:	Andi Kleen <ak@...e.de>
Cc:	Andrew Morton <akpm@...ux-foundation.org>,
	Yinghai Lu <Yinghai.Lu@....com>,
	Gerd Hoffmann <kraxel@...hat.com>,
	Linus Torvalds <torvalds@...ux-foundation.org>,
	linux kernel mailing list <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH]serial: make early_uart to use early_prarm instead of console_initcall

On Monday 21 May 2007 04:42:21 am Andi Kleen wrote:
> On Sun, May 20, 2007 at 08:23:32PM -0700, Andrew Morton wrote:
> > I'll queue this up for some testing, but I'd be a bit reluctant to send it
> > into Linus due to my poor understanding of what it actually does.  What
> > _is_ an early console, and how does it differ from a non-early one?
> 
> It is someone's reimplemention of earlyprintk= for another architecture

I implemented 8250_early for ia64.  It is based on early_printk and
is quite similar to it.

One important difference is that early_printk has the "ttyS0 is at
0x3f8" knowledge compiled into it.  That doesn't work for ia64
because ttyS0 may be anywhere.

Since 8250_early doesn't assume the ttyS locations, you have to tell
it the device address, not the name.  Some ia64 firmware tells the OS
the address of the console device.  With 8250_early, if the user wants
the OS to use the same console as the firmware, he doesn't need any
"console=" argument at all.

The other important difference is that 8250_early tries to coordinate
with the normal 8250 console driver.  For example, if you use
"console=uart,io,0x3f8", 8250_early works like early_printk does,
and then automatically switches to the normal 8250 driver later.  With
early_printk, I think you would have to use "earlyprintk=serial,ttyS0
console=ttyS0" to do the same thing.

> that happens to mostly work on x86 too because the code is not ifdeffed.

8250_early has no arch dependency, so there's no reason to ifdef it.
It only depends on ioremap/inb/outb/readb/writeb.

> I don't think it makes much sense on x86 though because earlyprintk exists.

There are two reasons 8250_early might make sense on x86:

  - x86 firmware might someday tell the OS where the console is
    (e.g., via drivers/firmware/pcdp.c).  That requires a way to
    locate the device by its address, not by the name.

  - You only have to specify the console device once, not twice.

On the other hand, maybe you *want* the earlyprintk device to be
a different device than the regular console.  8250_early wouldn't
handle that very well.

Bjorn
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ