Hi, Takebe-san,
Maybe you can apply this little patch to your dom0 linux kernel.
And it is not enough to only echo 1 > /sys/......../rom.
Can you do "setpci -s <your BDF> 04.b=7" and "setpci -s <your bdf> 30.b=1"
before you dump the contents?
As far as I can see, there are two problems exist in kernel (including native).
1> Kernel resumes that expansion ROM bar resources are within the prefetch MMIO
range of its parent bridge. This is not true. At least, I have not seen such
requirement in any spec. And my BIOS does not configure resources like that.
That is what my little patch is trying to fix.
2> The handler of writing /sys/........./rom does enable the bar in its code.
It does not enable the device. Expansion ROM bar is in effect only when you set
MMIO enable in its command register.
I hope this can help you. But if not, we are facing not identical problems.
Best Regards
Shan Haitao
diff -r 2fb13b8cbe13 drivers/pci/probe.c
--- a/drivers/pci/probe.c Thu Oct 30 13:34:43 2008 +0000
+++ b/drivers/pci/probe.c Thu Nov 13 13:53:53 2008 +0800
@@ -223,7 +223,7 @@
sz = pci_size(l, sz, (u32)PCI_ROM_ADDRESS_MASK);
if (sz) {
res->flags = (l & IORESOURCE_ROM_ENABLE) |
- IORESOURCE_MEM | IORESOURCE_PREFETCH |
+ IORESOURCE_MEM |// IORESOURCE_PREFETCH |
IORESOURCE_READONLY | IORESOURCE_CACHEABLE;
res->start = l & PCI_ROM_ADDRESS_MASK;
res->end = res->start + (unsigned long) sz;
-----Original Message-----
From: Akio Takebe [mailto:takebe_akio@xxxxxxxxxxxxxx]
Sent: 2008年11月25日 9:48
To: Shan, Haitao; 'Keir Fraser'; Nakajima, Jun
Cc: 'xen-devel@xxxxxxxxxxxxxxxxxxx'; Akio Takebe
Subject: RE: [Xen-devel] [PATCH 0/3] Enable Option ROM support in Guest BIOS
Hi, Shan-san
I read option ROM from /sys/devices/pci0000\:00/<BDF>/rom like the below.
1. echo 1 > /sys/devices/pci0000\:00/0000\:00\:01.0/0000\:01\:00.0/rom
2. dd if=/sys/devices/pci0000\:00/0000\:00\:01.0/0000\:01\:00.0/rom of=
rom.data
The rom didn't have any contents.
Best Regards,
Akio Takebe
>Takebe San,
>
>For the empty option ROM case, do you mean that you can not see any contents
>by reading the PCI expansion ROM bar address? Or they are indeed empty?
>I have met a problem when developing the patches; I can not read any contents
>from expansion ROM bar. I wonder whether they are the same problem.
>
>Shan Haitao
>
>-----Original Message-----
>From: Akio Takebe [mailto:takebe_akio@xxxxxxxxxxxxxx]
>Sent: 2008年11月25日 8:35
>To: Shan, Haitao; 'Keir Fraser'
>Cc: 'xen-devel@xxxxxxxxxxxxxxxxxxx'
>Subject: Re: [Xen-devel] [PATCH 0/3] Enable Option ROM support in Guest BIOS
>
>Hi, Shan
>
>>
>>Note: There is no support for booting from SCSI disk now. Since guest BIOS
>>lacks support for that. Please see the comments below.
>>//--------------------------------------------------------------------------
>>// BIOS Boot Specification 1.0.1 compatibility
>>//
>>// Very basic support for the BIOS Boot Specification, which allows
>>expansion
>>// ROMs to register themselves as boot devices, instead of just stealing the
>>// INT 19h boot vector.
>>//
>>// This is a hack: to do it properly requires a proper PnP BIOS and we
>>aren't
>>// one; we just lie to the option ROMs to make them behave correctly.
>>// We also don't support letting option ROMs register as bootable disk
>>// drives (BCVs), only as bootable devices (BEVs).
>>//
>>// http://www.phoenix.com/en/Customer+Services/White+Papers-Specs/pc+
>>industry
>>+specifications.htm
>>//--------------------------------------------------------------------------
>>
>We have also worked for enabling option ROM.
>I and Kouya made the patch for supporting BCV. And we could boot HVM
>guest from SAN storage. (please see my presentation of XenSummit Tokyo)
>
>I'll check your patch and remake the patch soon.
>
>BTW, I found some problems, they are:
>- Some device require services that are not supported by ROMBIOS.
> (I think updating ROMBIOS to the latest bochs is better.)
>- Some devcies have empty option ROM or option ROM for EFI.
> (e.g. NIC cards)
>
>Best Regards,
>
>Akio Takebe
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel
|