EFI Emulator or Image?

Question about which tools to use, bugs, the best way to implement a function, etc should go here. Don't forget to see if your question is answered in the wiki first! When in doubt post here.
Post Reply
sevobal
Member
Member
Posts: 63
Joined: Sun Oct 22, 2006 7:11 am

EFI Emulator or Image?

Post by sevobal »

Hi,

I want to programm support for EFI in my OS. So I have a few questions:

1. Is there any chance to emulate EFI or to get an EFI Image to use with bochs, because I have no EFI System hier.
2. Where can I get Informations about Programming an OS using EFI as plattform instead of the normal BIOS? Any Documentations or something like this about EFI (a link would be nice)?

Thank you! :D
User avatar
Brendan
Member
Member
Posts: 8561
Joined: Sat Jan 15, 2005 12:00 am
Location: At his keyboard!
Contact:

Re: EFI Emulator or Image?

Post by Brendan »

Hi,
sevobal wrote:1. Is there any chance to emulate EFI or to get an EFI Image to use with bochs, because I have no EFI System hier.
Bochs and Qemu don't support EFI. I'm not sure about the other emulators (VirtualPC, VMware, etc), but I don't think they do either...
sevobal wrote:2. Where can I get Informations about Programming an OS using EFI as plattform instead of the normal BIOS? Any Documentations or something like this about EFI (a link would be nice)?
EFI was started by Intel, and they still have some information:

http://www.intel.com/technology/efi/

Now EFI is controlled by a "non-profit collaborative trade organization":

http://www.uefi.org/home

The licence for the UEFI2.0 specification seems a little strange to me - (from http://www.uefi.org/specs/agreement):

I understand that I may download and read the UEFI 2.0 specification without the requirement of a license, and doing so creates no obligations or commitments on my part. I further understand and acknowledge that any distribution, additional reproduction, implementation or other use of the specification requires a license, which can be obtained by executing the UEFI Adopters' Agreement.

Can anyone here tell me if "implementation" includes writing a boot loader or OS capable of using EFI? :(

[EDIT] OK - it seems to me that to implement anything that uses this specification, you have to download the adopters agreement, send them signed original copies, and wait for them to sign the original copies and return one. I won't comment on the agreement itself - I'm certainly not a lawyer (but it seems like if you don't have an adopters agreement, there's nothing to prevent the contributing companies from claiming patent infringement)...[/EDIT]

Anyway, if this sort of agreement worries you, then I'd recommend downloading the original EFI 1.10 specification from Intel's site (at http://www.intel.com/technology/efi/mai ... cation.htm). Intel also have an agreement, but the wording is much better...


Cheers,

Brendan
For all things; perfection is, and will always remain, impossible to achieve in practice. However; by striving for perfection we create things that are as perfect as practically possible. Let the pursuit of perfection be our guide.
supagu
Member
Member
Posts: 46
Joined: Sat Apr 07, 2007 1:24 am

Post by supagu »

yeah im also looking for a virtual machine that supports EFI so i can have a bit of a fiddle. Something that works in vista preferable.
User avatar
bewing
Member
Member
Posts: 1401
Joined: Wed Feb 07, 2007 1:45 pm
Location: Eugene, OR, US

Post by bewing »

Seems to me that bochs would work just fine, except that somebody needs to write an EFI_latest file to replace the bios_bochs_latest file. My impression is that it shouldn't be too hard to fake up a quickie minimal stubbed one.
User avatar
Brendan
Member
Member
Posts: 8561
Joined: Sat Jan 15, 2005 12:00 am
Location: At his keyboard!
Contact:

Post by Brendan »

Hi,

Since my last post in this topic EFI firmware for Qemu has become available (see Qemu's download page, in the "QEMU disk images" section at the end).

The last time I tried it it I couldn't get it to work, partly because it needed the latest CVS version of Qemu. This has probably changed since though...


Cheers,

Brendan
For all things; perfection is, and will always remain, impossible to achieve in practice. However; by striving for perfection we create things that are as perfect as practically possible. Let the pursuit of perfection be our guide.
supagu
Member
Member
Posts: 46
Joined: Sat Apr 07, 2007 1:24 am

Post by supagu »

nope need the latest qemu still, at least on the windows version. I couldnt get the linux version working under nix
User avatar
Brendan
Member
Member
Posts: 8561
Joined: Sat Jan 15, 2005 12:00 am
Location: At his keyboard!
Contact:

Post by Brendan »

Hi,
supagu wrote:nope need the latest qemu still, at least on the windows version. I couldnt get the linux version working under nix
Doh - I wish they'd hurry up and release the latest version of Qemu.

The other problem is the tool-chain - how to generate binaries in EFI's modified "PE32+" format on (in my case) a standard Gentoo system that doesn't even support normal PE formats, and if a normal PE format is close enough (or could be made to work)...


Cheers,

Brendan
For all things; perfection is, and will always remain, impossible to achieve in practice. However; by striving for perfection we create things that are as perfect as practically possible. Let the pursuit of perfection be our guide.
User avatar
bewing
Member
Member
Posts: 1401
Joined: Wed Feb 07, 2007 1:45 pm
Location: Eugene, OR, US

Post by bewing »

I wonder if they make you sign a license to use the damned PE32+ format ... ?
jnc100
Member
Member
Posts: 775
Joined: Mon Apr 09, 2007 12:10 pm
Location: London, UK
Contact:

Post by jnc100 »

bewing wrote:I wonder if they make you sign a license to use the damned PE32+ format ... ?
Apparently the PE32+ format is described in Microsoft's PE-COFF documentation. Unfortunately, the license which you have to accept to obtain it states they only allow you to use it to create compilers/linkers etc that target Windows. I guess EFI doesn't count. Does anyone know if a similar specification is available elsewhere with a more permissive license?

Regards,
John.
User avatar
Brendan
Member
Member
Posts: 8561
Joined: Sat Jan 15, 2005 12:00 am
Location: At his keyboard!
Contact:

Post by Brendan »

Hi,
Brendan wrote:The other problem is the tool-chain - how to generate binaries in EFI's modified "PE32+" format on (in my case) a standard Gentoo system that doesn't even support normal PE formats, and if a normal PE format is close enough (or could be made to work)...
My apologies - I was wrong!

Apparently my Gentoo machine does support it, but binutils calls it "efi-app-ia32" and "efi-app-x86_64" (not PE-*) - I didn't notice them amongst all the "elf-*" output formats.

The notes for the ELILO source code do mention that certain version of binutils and/or certain Linux distrubutions don't generate correct EFI binaries (even when EFI is supported) - e.g. Redhat 6 works, but Redhat 7 doesn't. I'm guessing it's possibly still a little early in the "EFI adoption process" - ie. currently possible, but potentially some teething troubles from being a pioneer...

Also note: I bought a new computer a month or so ago without thinking about EFI, and noticed soon after that the firmware's setup screen does have a "UEFI boot <enable/disable>" option. I enabled it to see what would happen and it made no difference (I got the same PC BIOS, GRUB and Gentoo boot) - I'm guessing that I lack an EFI compatible boot partition and the firmware used "PC BIOS boot" as a fallback.

The interesting thing is that UEFI support *is* being shipped on generic "white box" 80x86 machines...


Cheers,

Brendan
For all things; perfection is, and will always remain, impossible to achieve in practice. However; by striving for perfection we create things that are as perfect as practically possible. Let the pursuit of perfection be our guide.
Post Reply