On Wed, Oct 30, 2013 at 5:12 PM, Laszlo Ersek <ler...@redhat.com> wrote:
> On 10/28/13 22:27, Jordan Justen wrote:
>> Previously we would only search for MMIO regions that were also
>> above every EfiGcdMemoryTypeReserved and EfiGcdMemoryTypeSystemMemory
>> region.
>
> Yes.
>
> More verbosely, the previous logic does the following:
> - finds the "bounding box" for MMIO regions,
> - finds the maximum for non-MMIO regions (reserved / system RAM),
> - removes the lower part of the "bounding box" that falls under the
>   non-MMIO maximum,
> - and the remaining bounding box is exported in
>   \_SB.PCI0._CRS.DWORDMEMORY, ResourceProducer/PosDecode, meaning that
>   the root bridge passes accesses to addresses in the "bounding box" to
>   child devices.
>
>>
>> Now we just search for the largest EfiGcdMemoryTypeMemoryMappedIo
>> region.
>
> As far as I can see, the direct difference is:
> - while previously the final "bounding box" could have holes (ie.
>   EfiGcdMemoryTypeNonExistent) inside, and it could cover several MMIO
>   regions, and it used to be above all non-MMIO ranges,
> - now the range will be the largest one contiguous MMIO range, and it
>   can be anywhere.
>
> The new range may not be a subset of the former, clamped bounding box
> (because a conventional RAM region could be located above it). It can be
> both smaller (i) and greater (ii) than the previous bounding box.
>
> (i) the bounding box can cover several MMIO ranges (with nonexistents
>     in-between optionally)
> (ii) possible eg. in the non-subset case
>
> So, I have no idea about the consequences, but exporting one contiguous
> MMIO range in _CRS (with no nonexistents inside, ever) does seem clean.

Hmm, I think you are pointing out some possible unintended side
effects. I'm now thinking that perhaps I should just modify your code
to lower the cap from 4GB down to just below the flash. I'll try this
for a possible alternative to this patch for v2.

-Jordan

------------------------------------------------------------------------------
November Webinars for C, C++, Fortran Developers
Accelerate application performance with scalable programming models. Explore
techniques for threading, error checking, porting, and tuning. Get the most 
from the latest Intel processors and coprocessors. See abstracts and register
http://pubads.g.doubleclick.net/gampad/clk?id=60136231&iu=/4140/ostg.clktrk
_______________________________________________
edk2-devel mailing list
edk2-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/edk2-devel

Reply via email to