From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-in24.apple.com (mail-out24.apple.com [17.171.2.34]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id 3F872208F7A18 for ; Fri, 11 Aug 2017 15:19:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; d=apple.com; s=mailout2048s; c=relaxed/simple; q=dns/txt; i=@apple.com; t=1502490104; h=From:Sender:Reply-To:Subject:Date:Message-id:To:Cc:MIME-version:Content-type: Content-transfer-encoding:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-reply-to:References:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=MTQgkUY+lN8mwhS5kjAw3HNoJfXafbwDnTTRvAKHdG4=; b=Z3wM8E7yJBwyplfs3ex/xM4CrDqbFGDwlQmIuCaJHuY6YI6kPkIBq6+GnXLqsgs+ 5IgpTMP+qvpHOtkf53xVz/UM/HSHAs8kTyJlJffTc8hvQ//pIMTT8X+7y7i7WfNH QT1g0K68q/AzKzip0ybQvKl1oBPPZ8JF5kiILm6IvIMuihtI8kfo/ZrxZYVmq6h9 313ngyJr7urZOcZZXa5UKFqQ0OFB0cVrPlJ+fQKd7Hr8NsaBY3h/m/1zA6aXhxTc /QxGAPgWjrwvGbOehQ6JIbygX9GtnMLPhJWpobSwsUBt2dOr4FX/mDFkhQbBDNxL VV9KZB/QAkJKAyL3OCnmgw==; Received: from relay22.apple.com (relay22.apple.com [17.171.128.103]) (using TLS with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mail-in24.apple.com (Apple Secure Mail Relay) with SMTP id 44.09.06274.8FD2E895; Fri, 11 Aug 2017 15:21:44 -0700 (PDT) X-AuditID: 11ab0218-665ff70000001882-f3-598e2df8b654 Received: from ma1-mmpp-sz07.apple.com (ma1-mmpp-sz07.apple.com [17.171.128.149]) by relay22.apple.com (Apple SCV relay) with SMTP id FC.0B.07334.8FD2E895; Fri, 11 Aug 2017 15:21:44 -0700 (PDT) MIME-version: 1.0 Received: from [17.234.211.28] by ma1-mmpp-sz07.apple.com (Oracle Communications Messaging Server 8.0.1.2.20170621 64bit (built Jun 21 2017)) with ESMTPSA id <0OUJ001U9KS5XJB0@ma1-mmpp-sz07.apple.com>; Fri, 11 Aug 2017 15:21:44 -0700 (PDT) Sender: afish@apple.com From: Andrew Fish In-reply-to: Date: Fri, 11 Aug 2017 15:21:40 -0700 Cc: "edk2-devel@lists.01.org" Message-id: <42CE0497-A269-4D40-9E65-31A3CE27F197@apple.com> References: To: Rafael Machado X-Mailer: Apple Mail (2.3273) X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFtrFLMWRmVeSWpSXmKPExsUiuLohXfeHbl+kwboPshZ7Dh1lttj5cga7 A5PHzll32T26Z/9jCWCK4rJJSc3JLEst0rdL4Mpo3/+KraBTpOL8bO8Gxjf8XYycHBICJhI9 3fPZQGwhgfVMEmf/5MDEj23bzNrFyAUUP8wosWvvSnaQBK+AoMSPyfdYuhg5OJgF5CUOnpcF CTMLaEl8f9TKAlH/lVGipWUxWL2wgLjEuzObmCFsR4mOU8fA4mwCyhIr5n8AszkFgiWuXetn ArFZBFQlvr6YzQIx1FxixoUvTBB7bSQu7PgGdWiAxNk7fYwgtoiAmcTeWRPYIY6Wlbg1+xIz yBESAo1sEpeWXGSfwCg8C8ndsxDunoXk7gWMzKsYhXMTM3N0M/OMTPQSCwpyUvWS83M3MYID m0liB+OX14aHGAU4GJV4eBOY+yKFWBPLiitzDzFKc7AoifOKKAGFBNITS1KzU1MLUovii0pz UosPMTJxcEo1MLrnTZNTv+XB6FJ40V+yy4PHPljv4ZsqtUk7ZaYdjXrMxVIyJX234GLZzIRL O1d5OL07HuvLPzHpT3ldw/kzlys/WktliDGZftTY6vA3NDfhOovd23DBfPnrV+v2sis9vxB2 6lygyopEr50HjAJ1WYX050h6JWTelGSdYt0+nZ1jq5XLwxRlJZbijERDLeai4kQABDbAek0C AAA= X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFlrHLMWRmVeSWpSXmKPExsUiuLphqu4P3b5Igy+zJS32HDrKbLHz5Qx2 ByaPnbPusnt0z/7HEsAUxWWTkpqTWZZapG+XwJXRvv8VW0GnSMX52d4NjG/4uxg5OSQETCSO bdvM2sXIxSEkcJhRYtfelewgCV4BQYkfk++xdDFycDALyEscPC8LEmYW0JL4/qiVBaL+K6NE S8tisHphAXGJd2c2MUPYjhIdp46BxdkElCVWzP8AZnMKBEtcu9bPBGKzCKhKfH0xmwViqLnE jAtfmCD22khc2PGNDcQWEgiQOHunjxHEFhEwk9g7awI7xNGyErdmX2KewCgwC8mpsxBOnYXk 1AWMzKsYBYtScxIrjYz0EgsKclL1kvNzNzFCQjF9B+ORm2aHGAU4GJV4eCvO9kYKsSaWFVfm HmKU4GBWEuHlkumLFOJNSaysSi3Kjy8qzUktPsQozcGiJM77o6M7UkggPbEkNTs1tSC1CCbL xMEp1cAYeP9cSRvzaePvXzWtQp4azdi+9Ngpt2+ZDRIcVT21ptO61Dcu+xS318H09fxP2kd8 Ci2eW8e3veTrvWzN7b00j1N+/W+W7J0KFYxZqV37HzYGt3zmEbf8rHvDVaryfqj3xqo7yplz 9OV8o76+i+BffX7tj4klGu7hTT8Pbi/Pk/937tCtiTVKLMUZiYZazEXFiQAS4LSXQQIAAA== Subject: Re: What Bios data is sent to the Bootloader/OS ? X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 11 Aug 2017 22:19:24 -0000 Content-transfer-encoding: 7BIT Content-type: text/plain; CHARSET=US-ASCII > On Aug 11, 2017, at 6:00 AM, Rafael Machado wrote: > > Hi everyone > > I have a question that probably some guys here can help. > The scenario I have, is that I need to create a OS image that must be able > to boot at a UEFI system (with no csm module), and at a legacy bios system. > My fist thought is that this is not possible. > Rafael, We designed EFI to co-exist with legacy BIOS so you could make media that boots both ways. I think it is useful to step back and think about how booting works. 1) EFI loads a relocatable PE/COFF image that is a file (pointed to by an NVRAM variable, or in a known path for removable media) on a FAT32 file system (Usually the EFI System Partition). 2) For a legacy hard disk boot the the BIOS loads the 1st 0x200 (512) bytes of the disk (MBR) into 0x7C00 and jumps to it in real mode. The MBR code usually plays a similar trick and loads 1st 0x200 bytes of the boot partition into memory and jump to it, this is usually the start of the file system on the disk partition. The 0x200 byte limit in MBR in combination with the 4 partition limit ended up with a lot of creative "grabbing of space" which worked great util different code broke each other. This grabbing "unused space" and the size limits is why we ended up adding GPT to the EFI spec as a next generation partitioning scheme. I think your problem is more about can you put a BIOS boot loader and a EFI Boot loader on the same disk and have them boot the same kernel. Seems like most of what the OS loader needs to do is a solved problem, it is just making everything coexist you have to figure out. Thanks, Andrew Fish > The first thing I see that is different is the what the memory map is > presented to the Bootloader/OS. At legacy bios the int15/0xE820 is used, > and at a UEFI bios the GetMemoryMap() from the boot service is used. Is my > understanding correct? > > Besides that. Is there any other change that could not make it possible to > create a single BootloaderLoader/OS image able to boot on a UEFI BIOS(with > no CSM) and on a Legacy Bios ? > > I would like to create a list or arguments to talk with my client that > requested this, in case this is really not possible. > > The OS in this case is Linux, and the bootloader is Grub or Syslinux. > > Thanks and Regards > Rafael R. Machado > _______________________________________________ > edk2-devel mailing list > edk2-devel@lists.01.org > https://lists.01.org/mailman/listinfo/edk2-devel