[vbox-dev] ICH9 BAR5 access
michal.necasek at oracle.com
Wed Aug 19 11:51:41 UTC 2015
PCIDevSetDWord in the device won't do it, that's expected. It will get rewritten.
I don't think VirtualBox supplies any device with so many BARs so it's entirely possible that something isn't working. The trouble is that you have your code + ours, and we only have our code, so it's quite hard for us to debug the problem.
One hint... what happens if you switch your VM to use EFI instead of the classic BIOS? I believe EFI should initialize all the PCI resources itself, so you might be able to see what happens even before an OS boots.
And two more comments. I see that you have both the VirtualBox VGA device and your own. No one can tell you for certain that that won't cause problems. And you presumably want to use MSIs (otherwise you wouldn't bother with ICH9), but you're using quite old version of VirtualBox. There were several fixes in the MSI handling area in VirtualBox 5.0.
----- Original Message -----
From: apallapothu at gmail.com
To: klaus.espenlaub at oracle.com
Cc: vbox-dev at virtualbox.org
Sent: Tuesday, August 18, 2015 9:04:05 PM GMT +01:00 Amsterdam / Berlin / Bern / Rome / Stockholm / Vienna
Subject: Re: [vbox-dev] ICH9 BAR5 access
Thanks for the response.
In the PCIe config space I set all BAR's to 0, using PCIDevSetDWord .... no address mapping from myside.
I first register the region using PDMDevHlpPCIIORegionRegister with respective size.
BAR0 = 0x800,0000 128 M
BAR5 = 0x4,0000 256K
Then I register memory call backs using PDMDevHlpMMIORegister for the size.
While experimenting, I played with different base address in DevPciIch9.cpp "pGlobals->uPciBiosMmio = UINT32_C(0xB8000000);" which moved BAR's accordingly.
While experimenting, I have tried setting start address for BAR's in PCIe config space, I saw that this address eventually gets overwritten by FakeBIOS and then OS.
When I ran lspci on the guest I did not see conflict in address mapping. Attached lspci output. My pass through device shows up under VGA.
I have added lspci output of fully functional PIIX3 chipset for comparison.
At the end of the attachment, please note the VM debugger output in ICH9 chip set which apparently doesn't see the VGA device.
Just to keep my message crisp, with the same device code, in PIIX3 I am able to see memory access to the addresses specified in BAR0, BAR5 while in ICH9, I only see access coming through in BAR0 and NOT BAR5.
On Tue, Aug 18, 2015 at 2:25 PM, Klaus Espenlaub < klaus.espenlaub at oracle.com > wrote:
On 18.08.2015 20:04, Ananth Pallapothu wrote:
I have added new pass through device to the VirtualBox setup . Registered all 6 BAR's with appropriate sizes, none exceeding 256M. All BAR's were set to reflect hardware functionality (assigned 0), eventually OS programmed base address regions with the sizes I have registered them with. Can you provide more details (how you map the regions initially and on remap)? Hard to say what's happening otherwise.
My fundamental problem is, I have been able to access BAR0 and NOT BAR5. I tried playing with BIOSmmio address setting in DevPciIch9, that made difference in relocating BAR's but functionality remained the same (Not able to access BAR5)
Interesting part is, PIIX3 chipset is fully functional ie., can access BAR5 in PIIX3 but NOT in ICH9.
Could be that with PIIX3 there's no remap and with ICH9 there's a remap... really difficult to say anything with the sparse information.
PS: There seems to be some problem with my email ID, so not sure whether my last email came through. Sorry if you have already received it.
vbox-dev mailing list
vbox-dev at virtualbox.org
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the vbox-dev