From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1JHdAo-00050F-LH for mharc-grub-devel@gnu.org; Wed, 23 Jan 2008 05:49:38 -0500 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1JHdAm-0004wb-F3 for grub-devel@gnu.org; Wed, 23 Jan 2008 05:49:36 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1JHdAk-0004tA-Kc for grub-devel@gnu.org; Wed, 23 Jan 2008 05:49:35 -0500 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1JHdAk-0004sk-Cm for grub-devel@gnu.org; Wed, 23 Jan 2008 05:49:34 -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 1JHdAj-0005p0-Pn for grub-devel@gnu.org; Wed, 23 Jan 2008 05:49:34 -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 1JHdAf-0004zF-8n for grub-devel@gnu.org; Wed, 23 Jan 2008 11:49:32 +0100 Received: from rmh by thorin with local (Exim 4.63) (envelope-from ) id 1JHd8r-0006WM-5e for grub-devel@gnu.org; Wed, 23 Jan 2008 11:47:37 +0100 Date: Wed, 23 Jan 2008 11:47:37 +0100 From: Robert Millan To: grub-devel@gnu.org Message-ID: <20080123104737.GA24943@thorin> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="gKMricLos+KVdGMg" Content-Disposition: inline Content-Transfer-Encoding: 8bit Organization: free as in freedom X-Message-Flag: Worried about Outlook viruses? Switch to Thunderbird! www.mozilla.com/thunderbird 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: [PATCH] use at_keyboard.c on i386-ieee1275 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, 23 Jan 2008 10:49:37 -0000 --gKMricLos+KVdGMg Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit Taking into account that ofconsole on i386: - Has bugs with similar usability effect than at_keyboard.c (e.g. arrow keys not working). - In practice doesn't provide support for any keyboard other than AT (since OFW shuts down USB before transfering control to us). - Sharing code with other ports (CoreBoot, attow) is more efficient to get these bugs solved. I propose to use at_keyboard.c as default for i386-ieee1275. -- 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 /.) --gKMricLos+KVdGMg Content-Type: text/x-diff; charset=us-ascii Content-Disposition: attachment; filename="at_keyboard.diff" diff -x '*~' -x '*.mk' -Nurp ../grub2/conf/i386-ieee1275.rmk ./conf/i386-ieee1275.rmk --- ../grub2/conf/i386-ieee1275.rmk 2008-01-23 10:59:37.000000000 +0100 +++ ./conf/i386-ieee1275.rmk 2008-01-23 11:30:30.000000000 +0100 @@ -17,7 +17,8 @@ kernel_elf_SOURCES = kern/i386/ieee1275/ kern/i386/dl.c kern/parser.c kern/partition.c \ kern/env.c \ kern/ieee1275/ieee1275.c \ - term/ieee1275/ofconsole.c disk/ieee1275/ofdisk.c \ + term/ieee1275/ofconsole.c term/i386/pc/at_keyboard.c \ + disk/ieee1275/ofdisk.c \ symlist.c kernel_elf_HEADERS = arg.h cache.h device.h disk.h dl.h elf.h elfload.h \ env.h err.h file.h fs.h kernel.h loader.h misc.h mm.h net.h parser.h \ diff -x '*~' -x '*.mk' -Nurp ../grub2/include/grub/i386/ieee1275/console.h ./include/grub/i386/ieee1275/console.h --- ../grub2/include/grub/i386/ieee1275/console.h 2008-01-15 21:16:34.000000000 +0100 +++ ./include/grub/i386/ieee1275/console.h 2008-01-23 11:31:07.000000000 +0100 @@ -1 +1,28 @@ -#include +/* + * GRUB -- GRand Unified Bootloader + * Copyright (C) 2008 Free Software Foundation, Inc. + * + * GRUB is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * GRUB is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with GRUB. If not, see . + */ + +#ifndef GRUB_CONSOLE_MACHINE_HEADER +#define GRUB_CONSOLE_MACHINE_HEADER 1 + +#include + +void EXPORT_FUNC(grub_keyboard_controller_init) (void); +int EXPORT_FUNC(grub_console_checkkey) (void); +int EXPORT_FUNC(grub_console_getkey) (void); + +#endif /* ! GRUB_CONSOLE_MACHINE_HEADER */ diff -x '*~' -x '*.mk' -Nurp ../grub2/kern/powerpc/ieee1275/init.c ./kern/powerpc/ieee1275/init.c --- ../grub2/kern/powerpc/ieee1275/init.c 2008-01-22 21:15:28.000000000 +0100 +++ ./kern/powerpc/ieee1275/init.c 2008-01-23 11:16:00.000000000 +0100 @@ -181,6 +181,9 @@ grub_machine_init (void) int actual; grub_console_init (); +#ifdef __i386__ + grub_keyboard_controller_init (); +#endif grub_claim_heap (); grub_ofdisk_init (); diff -x '*~' -x '*.mk' -Nurp ../grub2/term/ieee1275/ofconsole.c ./term/ieee1275/ofconsole.c --- ../grub2/term/ieee1275/ofconsole.c 2008-01-21 15:21:43.000000000 +0100 +++ ./term/ieee1275/ofconsole.c 2008-01-23 11:17:45.000000000 +0100 @@ -358,8 +358,13 @@ static struct grub_term grub_ofconsole_t .fini = grub_ofconsole_fini, .putchar = grub_ofconsole_putchar, .getcharwidth = grub_ofconsole_getcharwidth, +#ifdef __i386__ + .checkkey = grub_console_checkkey, + .getkey = grub_console_getkey, +#else .checkkey = grub_ofconsole_checkkey, .getkey = grub_ofconsole_getkey, +#endif .getxy = grub_ofconsole_getxy, .getwh = grub_ofconsole_getwh, .gotoxy = grub_ofconsole_gotoxy, --gKMricLos+KVdGMg--