[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Using GRUB2 with CoreBoot (formerly known as LinuxBIOS) 1/4: Find ta
From: |
Uwe Hermann |
Subject: |
Re: Using GRUB2 with CoreBoot (formerly known as LinuxBIOS) 1/4: Find tables |
Date: |
Wed, 16 Jan 2008 20:39:09 +0100 |
User-agent: |
Mutt/1.5.17 (2007-12-11) |
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