Thread (22 messages) 22 messages, 3 authors, 2013-07-28

Re: [PATCH 1/3] powerpc/mpc85xx: remove the unneeded pci init functions for corenet ds board

From: Kevin Hao <hidden>
Date: 2013-07-28 00:32:33

On Fri, Jul 26, 2013 at 05:43:44PM -0500, Scott Wood wrote:
On 07/25/2013 07:54:53 AM, Kevin Hao wrote:
quoted
The reason is that the ppc kernel assume that the BARs starting
at 0 is unset and will reassign it later. There is a bug in the
previous
kernel, so the kernel maybe not work well for qemu in this case. But I
think this has been fixed by the commit c5df457f (powerpc/pci:
Check the
bus address instead of resource address in pcibios_fixup_resources).
What ensures that the reassignment will not assign zero?
In function pcibios_resource_survey() we will reserve the low IO area
before reassignment. Please see the following comments and codes in this
function.

        /* Before we start assigning unassigned resource, we try to reserve
         * the low IO area and the VGA memory area if they intersect the
         * bus available resources to avoid allocating things on top of them
         */
        if (!pci_has_flag(PCI_PROBE_ONLY)) {
                list_for_each_entry(b, &pci_root_buses, node)
                        pcibios_reserve_legacy_regions(b);
        }    


Thanks,
Kevin
I'm not doubting the result that it does, but I'm having a hard time
seeing it in the code.

Or are you saying that the resource assignment code will run twice,
rather than just saying that we won't trust the firmware when we
find zero?

-Scott

Attachments

  • (unnamed) [application/pgp-signature] 490 bytes
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help