2 * The PCI Library -- Access to i386 I/O ports on Windows
4 * Copyright (c) 2004 Alexander Stock <stock.alexander@gmx.de>
5 * Copyright (c) 2006 Martin Mares <mj@ucw.cz>
7 * Can be freely distributed and used under the terms of the GNU GPL.
14 #define outb(x,y) _outp(y,x)
15 #define outw(x,y) _outpw(y,x)
16 #define outl(x,y) _outpd(y,x)
18 #define inb(x) _inp(x)
19 #define inw(x) _inpw(x)
20 #define inl(x) _inpd(x)
23 intel_setup_io(struct pci_access *a)
25 typedef int (*MYPROC)(void);
26 MYPROC InitializeWinIo;
31 lib = LoadLibrary("WinIo.dll");
34 a->warning("i386-io-windows: Couldn't load WinIo.dll.");
37 /* XXX: Is this really needed? --mj */
38 GetProcAddress(lib, "InitializeWinIo");
40 InitializeWinIo = (MYPROC) GetProcAddress(lib, "InitializeWinIo");
43 a->warning("i386-io-windows: Couldn't find InitializeWinIo function.");
47 if (!InitializeWinIo())
49 a->warning("i386-io-windows: InitializeWinIo() failed.");
57 intel_cleanup_io(struct pci_access *a UNUSED)
59 //TODO: DeInitializeWinIo!