grub-devel
[Top][All Lists]
Advanced

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

Re: [PATCH] fix serial console on LinuxBIOS


From: Robert Millan
Subject: Re: [PATCH] fix serial console on LinuxBIOS
Date: Thu, 8 Nov 2007 22:30:46 +0100
User-agent: Mutt/1.5.13 (2006-08-11)

On Wed, Nov 07, 2007 at 08:02:28PM -0600, Jerone Young wrote:
> Does Linux bios only allow for two serial ports?

I think the PC/AT architecture is limited to 2 serial ports.  Anyway,
LinuxBIOS does nothing to "allow" their use; it just initialises some
hardware and hands out control to GRUB in a non-intrusive manner.

> Are theres ports
> addresses hard coded into
> Linux BIOS?

Yes.  What is not hardcoded is the com1 vs com2 choice (chosen at build
time).  But that's a separate issue.

> I also creating all the machine.h for one ifdef is a little much. But
> it may be needed.

Well, if it was only serial.c I wouldn't propose it.  But not having these
macros makes us add new one-line files every once in a while, which I
think would be good to avoid.

> The
> ifdef in serial.c should be changed to
> 
> #ifdef GRUB_MACHINE_LINUXBIOS
> <then do this>
> #else
> <do what everyone else does>

It's not really LinuxBIOS-specific.  There's a (PC) BIOS-specific way,
which is reading ((short *) 0x400), and a generic one which is hardcoding
the information.

> Also what I don't understand about the current code is that it only
> allows for serial ports
> that have address 0x0400 and above (I'm guessing that is the c
> trickery that is going on
> here) when using addr[unit]. And you declare addr is 0x0400.

No, you missread it.  On BIOS, there's an array of 16-bit addresses at
0x400 (memory space).  On other platforms, we just declare the array in
our code instead (interestingly, the size of the whole array is the
same as the size of a pointer to 0x400 :-)).

-- 
Robert Millan

<GPLv2> I know my rights; I want my phone call!
<DRM> What use is a phone call, if you are unable to speak?
(as seen on /.)




reply via email to

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