<br><br><div class="gmail_quote">On Mon, Nov 24, 2008 at 9:15 AM, ron minnich <span dir="ltr"><<a href="mailto:rminnich@gmail.com">rminnich@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div class="Ih2E3d">On Mon, Nov 24, 2008 at 7:01 AM, Myles Watson <<a href="mailto:mylesgw@gmail.com">mylesgw@gmail.com</a>> wrote:<br>
<br>
>                if (resource->flags & IORESOURCE_IO) {<br>
>                        /* Don't allow potential aliases over the legacy PCI<br>
>                         * expansion card addresses. The legacy PCI decodes<br>
>                         * only 10 bits, uses 0x100 - 0x3ff. Therefore, only<br>
>                         * 0x00 - 0xff can be used out of each 0x400 block<br>
> of<br>
>                         * I/O space.<br>
>                         */<br>
>                        if ((base & 0x300) != 0) {<br>
>                                base = (base & ~0x3ff) + 0x400;<br>
>                        }<br>
>                        /* Don't allow allocations in the VGA I/O range.<br>
>                         * PCI has special cases for that.<br>
>                         */<br>
>                        else if ((base >= 0x3b0) && (base <= 0x3df)) {<br>
>                                base = 0x3e0;<br>
>                        }<br>
>                }<br>
><br>
> It seems like I'm misreading this and/or the check isn't broad enough.  If<br>
> there are really devices claiming all IO where the last 10 bits decode to<br>
> 0x300, then many more ranges should be affected.  For example, a size 0x200<br>
> allocation from 0x200-0x3ff doesn't trigger this check.  Neither does a size<br>
> 0x200 allocation from 0x1200 - 0x13ff, but a size 0x20 allocation from<br>
> 0x1320-0x133f does.<br>
<br>
</div>I don't understand. 0x200 & 0x300 is non-zero. 0x200 will trigger it.</blockquote><div><br>You're right.  I didn't put that example together well.  What I was trying to say was a resource allocation that covers that range but doesn't have its base address in the range.  Maybe I won't mess up a simpler example:<br>
<br>An allocation of size 0x400 from 0x0 - 0x3ff.  The allocation has several addresses within it that have problems with the legacy decode, but doesn't get caught because the base doesn't trigger the check.  Same with 0x1000 - 0x13ff.<br>
<br>Thanks,<br><br>Myles<br></div><div><br> <br></div></div><br>