[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] EFI BIOS on QEMU

From: Rob Landley
Subject: Re: [Qemu-devel] EFI BIOS on QEMU
Date: Mon, 7 Jan 2008 19:12:25 -0600
User-agent: KMail/1.9.6 (enterprise 0.20070907.709405)

On Monday 07 January 2008 14:19:27 Stefan Weil wrote:
> Hi,
> I just wanted to run QEMU CVS with EFI BIOS:
> i386-softmmu/qemu -snapshot -L efi-bios -hda efi-bios/efi.disk
> linux.img  -net nic,model=i82551 -net user
> i82551 is part of the E100 emulator (eepro100.c).
> It does not work - no output on serial console nor VGA screen.
> Or do I have to press some magic keys to get any response?

You tried ctrl-alt-2 to switch from vga to serial console?  (Wild guess...)

Where did this bios come from?

You are aware that bioses come in 2 stages, and that only the _second_ stage 
applies to something like qemu, right?

The first stage is hardware initialization.  Most importantly, BIOS stage 1 
has to initialize the DRAM controller and start the periodic refresh timer, 
and then wait a bit for it to clock up before the DRAM can store stable 
values.  (The memory starts out holding random garbage, and until the refresh 
timer is working it won't hold on to values you write to it either.)

This sort of early hardware initialization is what the "linux bios" project 
does.  It's extremely system specific stuff that has to have hardwired into 
it exactly where all the devices it's talking to live because it can't do 
things like probe the PCI bus until you know where the PCI bus controller is 
(and have switched it on and booted it up).

This stage doesn't apply to qemu.  QEMU is only emulating hardware, it doesn't 
have things like DRAM refresh hardware, and if you try to play with that sort 
of thing you won't get back the right results because it's not _there_.  (In 
general, running a stage 1 BIOS for one machine on any other machine won't 
work unless the hardware is _identical_.  That's why Linux Bios has 8 
gazillion config options at build time for which board you're building it 

The second stage of the BIOS provides an API to userspace, called by things 
like bootloaders to load sectors from the boot device into memory.  For the 
x86 and x86-64 targets QEMU uses the bochs bios to provide this interface, 
for bootloaders like grub.  That's already there.

Could you tell us more about what exactly you're trying to do?

"One of my most productive days was throwing away 1000 lines of code."
  - Ken Thompson.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]