From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-qk0-x232.google.com (mail-qk0-x232.google.com [IPv6:2607:f8b0:400d:c09::232]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id 4563021DFC86C for ; Sun, 13 Aug 2017 06:05:25 -0700 (PDT) Received: by mail-qk0-x232.google.com with SMTP id a77so39639294qkb.0 for ; Sun, 13 Aug 2017 06:07:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to; bh=Wt4EYEjUmE5oaHP7lT7212sw4P3XqJLN9H39Utm0jjQ=; b=ncsut0DUY2Pw/4qHgYRKHU2zsba7dVhELLnHxzXRW6Sv4+AeOFmAbFcV95MJzLpeYa bn21HAI8UQf1SACg/xNntT+KcohwOowoea6/PEFqadnllF7h+oEAP+j07n9qnLlzxHd+ XA5QaR4Fk+lPd6xQKoIalXKMq93PuKDdlO+PJ8vIlzOGNnfyl5N5rML23GeSGPziSs1j T+V3HajbALBOqhvH48ua44WnGcKIsoSDRegR1CNIg7kmNaMXMiyhOhn0QJOXLlMsRJ+r acHM4R/fwwn/asvicPfz2ZMy43fV54OxwOgE9rFH/rl3yOcPzA+N0xHCf94hZGFhRID3 3k6Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to; bh=Wt4EYEjUmE5oaHP7lT7212sw4P3XqJLN9H39Utm0jjQ=; b=eOXLnbITZs38WA/yxR/PO12pYMNJ2PIsR2cT55wvJ3YV1ddl/cU/eCogjAeHHzxeKB ycNs5IPQ0DWA3xhIHVjsjFUAOboj3rK5ePXoS5O8nhWndExHf88JSyjUByeXqhDhCQ7I nWS7TSZO5Ki7bh+oFXGtFBIXksen3AhDubCKd4jtIz7nvcZRV7vT62EIJxofTX/Ftw44 LfdyMQeFBXso0pse7OrhC37Sw/LshhCrqlo9moU7BvW5di5iItuFQCXvKkisBqwlpDK+ wbEzaDTB+WFiT5EUOwhS5mNur2f1f8aPd9j1m06zaUCsGKX6TnE2afJ13EEVRgovghG8 glcA== X-Gm-Message-State: AHYfb5h1FLUeHRk6Q1W8GMKh5m4ix1pjdprDlDgU1PpXkvnL6DJVmf2V xTsJsU73Vrq7XtOqNExeQ2oWwRadEg== X-Received: by 10.55.101.213 with SMTP id z204mr26045950qkb.342.1502629666939; Sun, 13 Aug 2017 06:07:46 -0700 (PDT) MIME-Version: 1.0 References: <42CE0497-A269-4D40-9E65-31A3CE27F197@apple.com> <3b578f09-8c29-4168-2524-49c8a2d5e210@rodsbooks.com> In-Reply-To: <3b578f09-8c29-4168-2524-49c8a2d5e210@rodsbooks.com> From: Rafael Machado Date: Sun, 13 Aug 2017 13:07:36 +0000 Message-ID: To: Rod Smith , edk2-devel@lists.01.org X-Content-Filtered-By: Mailman/MimeDel 2.1.22 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: Sun, 13 Aug 2017 13:05:25 -0000 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Thanks a lot Andrew and Rod. Your comments clarified a lot. Just onde last question. In case of int15/e820 and uefi getMemoryMap. Do you know If this information os used by the bootloaders? And do you know the format on these calls outputs? (For the getMemoryMap the uefi Spec os clear, but didn't find anything about e820). Thanks and Regards Rafael Machado Em s=C3=A1b, 12 de ago de 2017 00:23, Rod Smith escreveu: > 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. > > If I understand you correctly, it most definitely IS possible. Most > major Linux distributions provide installation media that can boot in > either BIOS/CSM/legacy mode or in EFI/UEFI mode. Replicating what those > media do might not be the best way to go, though, since they are also > typically designed to boot when written to optical media or when written > to USB flash drives. To do this, they use a sort of "Frankenstein's > Monster" disk format, so unless you need this cross-media compatibility, > too, using the tools and procedures used to create these installation > media would be overkill and would create something that's overly > complex. These media do illustrate the practicality of what you're > suggesting -- or at least, what I *BELIEVE* you're suggesting. If I've > misinterpreted, please clarify your needs. > > >> The OS in this case is Linux, and the bootloader is Grub or Syslinux. > > A single GRUB (or SYSLINUX) binary will not do the job; however, there > are both BIOS and EFI builds of both GRUB and SYSLINUX. The details of > what you'd do would depend on the boot medium (hard disk, USB flash > drive, optical disc, etc.); however, broadly speaking you need to write > both BIOS-mode and EFI-mode versions of your chosen boot loader to the > boot medium, with suitable configuration files in appropriate locations. > > Both GRUB and SYSLINUX are boot loaders that can load a Linux kernel > into memory. The Linux kernel, in turn, does not need to be built for > either BIOS or EFI environments; the same kernel binary will work in > either environment. (One partial exception is that there's a feature > known as the EFI stub loader that turns the Linux kernel into its own > EFI boot loader. If you wanted to use this feature, it would obviously > need to be compiled into the kernel. GRUB does not require this feature, > though, and its presence will not interfere with the kernel being booted > on a BIOS-based computer. Thus, you probably don't need to worry about > it for your purposes. I mention it simply so you don't think it's an > issue if you read something about it elsewhere.) > > -- > Rod Smith > rodsmith@rodsbooks.com > http://www.rodsbooks.com > _______________________________________________ > edk2-devel mailing list > edk2-devel@lists.01.org > https://lists.01.org/mailman/listinfo/edk2-devel >