From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1JFE6W-0004C9-DS for mharc-grub-devel@gnu.org; Wed, 16 Jan 2008 14:39:16 -0500 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1JFE6T-000495-TH for grub-devel@gnu.org; Wed, 16 Jan 2008 14:39:13 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1JFE6Q-00044i-Bq for grub-devel@gnu.org; Wed, 16 Jan 2008 14:39:13 -0500 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1JFE6Q-00044a-31 for grub-devel@gnu.org; Wed, 16 Jan 2008 14:39:10 -0500 Received: from wp050.webpack.hosteurope.de ([80.237.132.57]) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1JFE6P-00077R-Iq for grub-devel@gnu.org; Wed, 16 Jan 2008 14:39:09 -0500 Received: from dslb-084-056-027-013.pools.arcor-ip.net ([84.56.27.13] helo=greenwood); authenticated by wp050.webpack.hosteurope.de running ExIM using esmtpsa (TLSv1:DES-CBC3-SHA:168) id 1JFE6M-0004XC-D7; Wed, 16 Jan 2008 20:39:06 +0100 Date: Wed, 16 Jan 2008 20:39:09 +0100 From: Uwe Hermann Sender: Uwe Hermann To: The development of GRUB 2 Message-ID: <20080116193909.GA15445@greenwood> References: <20080115180547.GA21853@thorin> <20080116134002.GA26468@thorin> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20080116134002.GA26468@thorin> User-Agent: Mutt/1.5.17 (2007-12-11) X-bounce-key: webpack.hosteurope.de;uwe@hermann-uwe.de;1200512349;5f64fd4b; X-detected-kernel: by monty-python.gnu.org: Linux 2.6 (newer, 1) Subject: Re: Using GRUB2 with CoreBoot (formerly known as LinuxBIOS) 1/4: Find tables 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, 16 Jan 2008 19:39:14 -0000 On Wed, Jan 16, 2008 at 02:40:02PM +0100, Robert Millan wrote: > + auto int check_signature (grub_linuxbios_table_header_t); > + int check_signature (grub_linuxbios_table_header_t table_header) > + { > + if (! grub_memcmp (table_header->signature, "LBIO", 4)) > + return 1; > + > + return 0; > + } > + > + /* Assuming sizeof(*table_header) alignment. */ Maybe a more verbose comment here? > + for (table_header = 0x500; table_header < 0x1000; table_header++) > + if (check_signature (table_header)) > + goto signature_found; > + > + for (table_header = 0xf0000; table_header < 0x100000; table_header++) > + if (check_signature (table_header)) > + goto signature_found; > + > + grub_fatal ("Could not find CoreBoot table\n"); "coreboot" please. Uwe. -- http://www.hermann-uwe.de | http://www.holsham-traders.de http://www.crazy-hacks.org | http://www.unmaintained-free-software.org