Re: [edk2] Xen OVMF early discussions

Subject: Re: [edk2] Xen OVMF early discussions

From: Bei Guan <>

To: Andrei Warkentin <>

Date: 2011-05-20 09:15:39

2011/5/19 Andrei Warkentin <>

On Thu, May 19, 2011 at 12:09 AM, Bei Guan <> wrote:

> Is this functionIoRead32 to read from the timer register as you said?
> From the comment among the code, I know the code IoRead32 (TimerBaseBar +
> ACPI_TIMER_OFFSET) is to read the "current tick counter of ACPI". Why the
> tick counter is alwayFFFFFFFF?

0xFFFFFFFF implies that -
1) ACPI timer is not present
2) We're reading the wrong address

Since we know (2) isn't the case, then it must be (1). Your HVM config
file has the line "acpi=0". That's your problem. Get rid of it, or
change it to "acpi=1" and it should work for you.
Many thanks to you! You're right, and OVMF can run into the EFI shell on Xen when set "acpi=1" in the configure file. It took me so much time.

In general, though, you would proceed by -
a) figuring out what component is responsible for ACPI timer. (xen
hypervisor in this case)
b) figuring out the conditions where the ACPI timer would not be emulated by Xen
c) Instrument hypverisor, or otherwise verify the conditions
d) figure out what influences the conditions (hint: must be the hvm
builder, xend and xm probably involved too)
e) arrive at conclusion that "acpi=0" causes the ACPI timer to not be
enabled inside Xen for this domain
Good method! It's very useful for me. I will learn to dig the root of the problem in the future work. Thanks. :)

Another problem with OVMF on Xen.
I have set theCD-ROM disk device in domain config file as Xen does, such as

disk = [ 'file:/root/gb/xen_img/hvm_ubuntu1010/hvm_ubuntu1010.img,ioemu:hda,w', 'file:/root/gb/ubuntu-10.10-desktop-amd64.iso,hdc:cdrom,r' ]

But, unlike OVMF on QEMU, the cdrom device doesn't present in OVMF on Xen, so does the hda(HardDisk). Maybe it's a problem and I have to check this.

Bei Guan