From: Robert Millan <rmh@aybabtu.com>
To: The development of GRUB 2 <grub-devel@gnu.org>
Subject: Re: [PATCH] fix serial console on LinuxBIOS
Date: Thu, 8 Nov 2007 22:30:46 +0100 [thread overview]
Message-ID: <20071108213046.GA4755@thorin> (raw)
In-Reply-To: <9f50a7a00711071802j2854e42fq300f8ed380317716@mail.gmail.com>
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 /.)
next prev parent reply other threads:[~2007-11-08 21:31 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-11-07 20:53 [PATCH] fix serial console on LinuxBIOS Robert Millan
2007-11-08 2:02 ` Jerone Young
2007-11-08 21:30 ` Robert Millan [this message]
2007-11-09 15:30 ` Marco Gerards
2007-11-09 21:34 ` Robert Millan
2007-11-10 15:29 ` Marco Gerards
2007-11-10 20:25 ` Robert Millan
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=20071108213046.GA4755@thorin \
--to=rmh@aybabtu.com \
--cc=grub-devel@gnu.org \
/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.