Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1IfjYq-0003hs-VZ for mharc-grub-devel@gnu.org; Wed, 10 Oct 2007 17:57:49 -0400 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1IfjYo-0003hX-TK for grub-devel@gnu.org; Wed, 10 Oct 2007 17:57:46 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1IfjYo-0003hI-FE for grub-devel@gnu.org; Wed, 10 Oct 2007 17:57:46 -0400 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1IfjYo-0003hF-6u for grub-devel@gnu.org; Wed, 10 Oct 2007 17:57:46 -0400 Received: from nz-out-0506.google.com ([64.233.162.233]) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1IfjYn-0008EM-Qm for grub-devel@gnu.org; Wed, 10 Oct 2007 17:57:45 -0400 Received: by nz-out-0506.google.com with SMTP id f1so271023nzc for ; Wed, 10 Oct 2007 14:57:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:message-id:date:from:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; bh=ft8XuZCn0jA0xnR5ZM29sJtClY2xhV47iYTh2osp8/U=; b=pdJgdBDouTFzHI9oXmn05Hv9zHSwy6HFHQYU62fiC715ZUpJyRDFqp89sUJxdrMig6bNdlPoBtpYg++Ed0Vp1xWLn6L4XcMXG2TgDDCkjLDyK9PV7iGMZprL6ll3CppBpNfxGMAEywomkvHy8OD66Xbj9yCMvbM/Q7hzuXtXLRo= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:date:from:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=l/T32aslSZDFwaSaPqyaiWc2EIzmMyToi7RoQyqrel8z5A5qT9x1MNJxRLWXCk48G1PGmDsdD25dClQemVOLUIYzWiZveOad55IatFjxN30LT15vm23eGfhhIn2aHv9ignhE43cSbYL6bWEx9DH0ohghfZ/uAwmaC5sXsIkDCtQ= Received: by 10.114.80.4 with SMTP id d4mr1333387wab.1192053464305; Wed, 10 Oct 2007 14:57:44 -0700 (PDT) Received: by 10.114.26.2 with HTTP; Wed, 10 Oct 2007 14:57:44 -0700 (PDT) Message-ID: <8a2a06bb0710101457g5b3e4a19v65025a0e017f3d73@mail.gmail.com> Date: Wed, 10 Oct 2007 23:57:44 +0200 From: "Marcin Kurek" To: "The development of GRUB 2" In-Reply-To: <20071010191910.GA26777@thorin> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <8a2a06bb0710010357u142f6ba4gb053afde829f0f39@mail.gmail.com> <20071001123345.GB20428@thorin> <8a2a06bb0710011114l5cc66483vc27b0b83eb3395e1@mail.gmail.com> <20071001183927.GA10233@thorin> <8a2a06bb0710011243m38ac71a0t463b6ea56ff19e78@mail.gmail.com> <20071002213942.GC29487@thorin> <8a2a06bb0710031633v55549654v9184c3a460c202f5@mail.gmail.com> <20071004205038.GB23726@thorin> <8a2a06bb0710100811m41e08028t2404090a4d9a91b9@mail.gmail.com> <20071010191910.GA26777@thorin> X-Detected-Kernel: Linux 2.6 (newer, 2) Subject: Re: [PATCH] Fixed ieee1275 console 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: Wed, 10 Oct 2007 21:57:47 -0000 Hell[o] > Caught you! ;-) Holy shit. Lesson one take one more look at diff before send it :) > I know it seems burdensome, but please can you split this in three patches, one > for each fix? Then it's easier to review just one and say "this is good", and > also easier to figure out why every hunk was done (since one knows what we're > trying to archieve). Hmmm, I can try, but generaly splitting this fix has only a little sense as all of these patches depends on each other. Anyway I will send splited patches tommorow. > > + /* It seems no cls escape is available then simulate it using \n flood */ > > + int x = (grub_ofconsole_height * 2) - grub_curr_y; > > Maybe this would be easier to understand as "(grub_ofconsole_height - > grub_curr_y) + grub_ofconsole_height". What do others think? :-) Hmmm, good point looks better IMHO. > Nice. On which firmware variants did you try this? I can try efika (stock > firmware) if you haven't yet. I tired on Pegasos 1 with ancient OF revision, Pegasos 2 with Sven unofficial one and Efika and it works in all cases. > In your code there's a condition in which _serial is set to 0 and _fb is > left unset (as 0). Is this intended? Sounds like a bug. Not this is not a bug. We can heve 3 cases here: 1) True serial console. In this case recent versions of OF set stdout name and type to "serial" (_serial = 1, _fb = 0) In this case we want to use simple frames. 2) On the screen terminal without framebuffer (fb-mode not existing or set to 0x0x0) In this case we will get type "serial" (As it not supports pixel operations) and name "display" as this is not real serial console. (_serial = 0, _fb = 0) In this case we can use cp437 frames. For old versions of OF this case need to catch "bootconsole" too. 3) Console with framebuffer (fb-mode != 0x0x0) In this case we will get type to "display" or "vga" (_serial = 0, _fb = 1) In this case we can not use cp437 frames as vga font used by OF maps only first 127 characters ;( I put this in to separate case as we can still use framebuffer interface to draw some frames or try to load a working font, etc. I use 'true serial' as a safe default if detection fails for some reasons. -- --- Marcin 'Morgoth' Kurek ---