From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1IqExs-0004lK-K1 for mharc-grub-devel@gnu.org; Thu, 08 Nov 2007 16:31:04 -0500 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1IqExr-0004ij-7T for grub-devel@gnu.org; Thu, 08 Nov 2007 16:31:03 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1IqExp-0004fW-SJ for grub-devel@gnu.org; Thu, 08 Nov 2007 16:31:02 -0500 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1IqExp-0004fK-JS for grub-devel@gnu.org; Thu, 08 Nov 2007 16:31:01 -0500 Received: from aybabtu.com ([69.60.117.155]) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1IqExp-0003vB-BS for grub-devel@gnu.org; Thu, 08 Nov 2007 16:31:01 -0500 Received: from [192.168.10.6] (helo=thorin) by aybabtu.com with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.63) (envelope-from ) id 1IqExn-0000F8-2f for grub-devel@gnu.org; Thu, 08 Nov 2007 22:30:59 +0100 Received: from rmh by thorin with local (Exim 4.63) (envelope-from ) id 1IqExa-0001J1-QQ for grub-devel@gnu.org; Thu, 08 Nov 2007 22:30:46 +0100 Date: Thu, 8 Nov 2007 22:30:46 +0100 From: Robert Millan To: The development of GRUB 2 Message-ID: <20071108213046.GA4755@thorin> References: <20071107205340.GA16687@thorin> <9f50a7a00711071802j2854e42fq300f8ed380317716@mail.gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <9f50a7a00711071802j2854e42fq300f8ed380317716@mail.gmail.com> Organization: free as in freedom X-Message-Flag: Microsoft discourages use of Outlook. X-Debbugs-No-Ack: true User-Agent: Mutt/1.5.13 (2006-08-11) X-detected-kernel: by monty-python.gnu.org: Genre and OS details not recognized. Subject: Re: [PATCH] fix serial console on LinuxBIOS X-BeenThere: grub-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: The development of GRUB 2 List-Id: The development of GRUB 2 List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 08 Nov 2007 21:31:03 -0000 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 > > #else > 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 I know my rights; I want my phone call! What use is a phone call, if you are unable to speak? (as seen on /.)