On Mon, Jan 25, 2010 at 4:14 AM, Stefan Hajnoczi <[email protected]> wrote:
> On Sat, Jan 23, 2010 at 8:34 AM, Joshua Oreman <[email protected]> wrote:
>> Is this patch based on theory or do you have a testcase for it?
>
> I don't have rtl818x hardware for testing, but the code in gPXE is not
> equivalent to that in Linux.  I spotted this issue when grepping for
> membase and pci_bar_size() usage in gPXE.
>
> [ . . . ]
>
> The gPXE code is not equivalent since we don't have
> pci_iomap()/ioread*()/iowrite*().  The gPXE code always uses the programmed 
> I/O
> functions:
> static inline u32 rtl818x_ioread32(struct rtl818x_priv *priv __unused,
> u32 *addr)
> {
>        return inl(addr);
> }
>
> Passing a memory address to inl() does not work.  It is like trying to use a
> MAC address as an IP address - they are different address spaces.

This much I know :-)

> The patch I posted simply removes the memory-mapped I/O fallback.  We could
> make rtl818x_ioread*/rtl818x_iowrite* conditional or introduce the pci_iomap
> API into gPXE instead.

Thank you for spotting this; I didn't realize ioread* were different
from in*/out* in Linux. Since it hasn't caused issues yet, I'm
inclined to let the MMIO interface die according to your patch. We can
bring it back in the form you suggest if any cards actually use it.

Signed-off-by: Joshua Oreman <[email protected]>

-- Josh
_______________________________________________
gPXE mailing list
[email protected]
http://etherboot.org/mailman/listinfo/gpxe

Reply via email to