Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1MYdot-0003UO-7Z for mharc-grub-devel@gnu.org; Wed, 05 Aug 2009 06:34:07 -0400 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MYdoq-0003TV-Oe for grub-devel@gnu.org; Wed, 05 Aug 2009 06:34:04 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MYdol-0003P2-Q5 for grub-devel@gnu.org; Wed, 05 Aug 2009 06:34:04 -0400 Received: from [199.232.76.173] (port=42761 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MYdol-0003Oe-IL for grub-devel@gnu.org; Wed, 05 Aug 2009 06:33:59 -0400 Received: from mx20.gnu.org ([199.232.41.8]:50686) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1MYdol-0004v3-6J for grub-devel@gnu.org; Wed, 05 Aug 2009 06:33:59 -0400 Received: from mail-fx0-f205.google.com ([209.85.220.205]) by mx20.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1MYdok-0001UJ-8o for grub-devel@gnu.org; Wed, 05 Aug 2009 06:33:58 -0400 Received: by fxm1 with SMTP id 1so4637042fxm.31 for ; Wed, 05 Aug 2009 03:33:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:message-id:subject:from:to:content-type :content-transfer-encoding; bh=e215zyLGvDGhnewbypLh79QQy0gUFAN/TP8ntyNOMH8=; b=QWH9gyhE+MF18cctrjzG1JAi3NO5SDMsb7Rr+r5Ano2GdwY40RYbOM9XAx0oqNygoK 35qtVVVMqhE2Px7tH4FlQc1wf7WRhT0wba2GZgiKKD1q0N+DOZApErUvUPLIbEHlqDkm xKQVKB6aEIKQxbe79B6rWw+BkmETFWw6np20s= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type:content-transfer-encoding; b=tUy7LgyJEawcT3b5ePfawf+aCpxYrRLkI/M4f9AzSygGG+lP7ggJNDxMSIRxOJVCe2 f24wCkxYIkQhvzhSYjQ3Kk3180Xf8hD6/nroBwvMnYsFaSbi9ePZFWJDK/wtLWdWwrE/ BLik7w1hf+LjXXyCnZ31DOYfsaCR8c4tb6uRg= MIME-Version: 1.0 Received: by 10.204.60.212 with SMTP id q20mr724114bkh.200.1249468436151; Wed, 05 Aug 2009 03:33:56 -0700 (PDT) In-Reply-To: <20090804224735.GB5078@thorin> References: <20090804224735.GB5078@thorin> Date: Wed, 5 Aug 2009 12:33:56 +0200 Message-ID: From: "Vladimir 'phcoder' Serbinenko" To: The development of GRUB 2 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Detected-Operating-System: by mx20.gnu.org: GNU/Linux 2.6 (newer, 2) X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6, seldom 2.4 (older, 4) Subject: Re: [PATCH] multiboot on EFI 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, 05 Aug 2009 10:34:05 -0000 On Wed, Aug 5, 2009 at 12:47 AM, Robert Millan wrote: > On Sun, Aug 02, 2009 at 09:53:32PM +0200, Vladimir 'phcoder' Serbinenko w= rote: >> Was successfully tested with qemu-tianocore with example multiboot >> kernel from multiboot specification. Since real EFI has no VGA video >> fields play a crucial feature and need to be supported. Patch is >> coming but it will surely rely on gfxsplit patch. I also have plans to >> extend it to x86-64 too > > Very nice. Thanks. efiboot64 is available in my git but it requires allocator framework. (efi64-bit support in all bootloader is an authomatic advantage of using allocator framework) > >> =A0static grub_err_t >> =A0grub_multiboot_boot (void) >> =A0{ >> +#ifdef GRUB_MACHINE_EFI >> + =A0if (! grub_efi_finish_boot_services ()) >> + =A0 =A0 grub_fatal ("cannot exit boot services"); >> +#endif > > grub_fatal() terminates GRUB. =A0I suggest you just error out instead, so= that > user can try other things. > It's how it's done in efi/linux.c and according to EFI spec it can't fail in this code. But I agree with you that both instances should be changed >> - =A0 =A0 =A0mmap_entry->type =3D type; >> + =A0 =A0 =A0switch (type) >> + =A0 =A0 =A0 =A0{ >> + =A0 =A0 =A0 =A0case GRUB_MACHINE_MEMORY_AVAILABLE: >> + =A0 =A0 =A0 mmap_entry->type =3D GRUB_MULTIBOOT_MEMORY_AVAILABLE; >> + =A0 =A0 =A0 break; >> + >> + =A0 =A0 default: >> + =A0 =A0 =A0 mmap_entry->type =3D GRUB_MULTIBOOT_MEMORY_RESERVED; >> + =A0 =A0 =A0 break; > > Is this going to be extended with more `case' stanzas later? =A0If not, > it'd be more readable with an if/else, or ?:. > It will extend when we document ACPI memory types in multiboot specificatio= n. >> - =A0grub_loader_set (grub_multiboot_boot, grub_multiboot_unload, 1); >> + =A0grub_loader_set (grub_multiboot_boot, grub_multiboot_unload, 0); > > This breaks text-mode payloads when they're loaded from gfxterm. > Ok I will make it use the modesetting as linux.c does. text-mode only payloads are broken on EFI anyway since AFAIK no real EFI machine has VGA console available unless we find a way to load one without loading BIOS emulation. Bean may know more. > -- > Robert Millan > > =A0The DRM opt-in fallacy: "Your data belongs to us. We will decide when = (and > =A0how) you may access your data; but nobody's threatening your freedom: = we > =A0still allow you to remove your data and not access it at all." > > > _______________________________________________ > Grub-devel mailing list > Grub-devel@gnu.org > http://lists.gnu.org/mailman/listinfo/grub-devel > --=20 Regards Vladimir 'phcoder' Serbinenko Personal git repository: http://repo.or.cz/w/grub2/phcoder.git