[edk2] why InsertResourceNode adds resources in reverse order.

Subject: [edk2] why InsertResourceNode adds resources in reverse order.

From: Ganapatrao Kulkarni <gpkulkarni@gmail.com>

To: edk2-devel@lists.sourceforge.net

Date: 2014-05-26 18:19:25

Hi All,

i came across function InsertResourceNode in file MdeModulePkg/Bus/Pci/PciBusDxe/PciResourceSupport.c
is adding the last resource as the first node, with that our controller 2 BARs (BAR0 and BAR4, 64bit mode, type mem) are getting
allocated in reverse order, i.e first region is getting programmed at offset 0x20 and second one at 0x10.
IMHO, it should be other way.

can some one please explain me on this?

my source base-lined with version git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@15439 6f19259b-4bc3-4df7-8a09-765794883524


thanks
Ganapat