2003-12-26 Marco Gerards <metgerards@student.han.nl>
Added support for the GNU Hurd (cleaned up by Martin Mares):
* lib/configure [GNU]: Use the i386 ports for configuration access.
* lib/i386-ports.c: Don't call iopl() on the Hurd.
* lib/pci.h [OS_GNU]: Include <sys/types.h> and use it for defining
u8 to u32.
git-archimport-id: mj@ucw.cz--public/pciutils--main--2.2--patch-16
+2003-12-26 Marco Gerards <metgerards@student.han.nl>
+
+ Added support for the GNU Hurd (cleaned up by Martin Mares):
+
+ * lib/configure [GNU]: Use the i386 ports for configuration access.
+ * lib/i386-ports.c: Don't call iopl() on the Hurd.
+ * lib/pci.h [OS_GNU]: Include <sys/types.h> and use it for defining
+ u8 to u32.
+
2003-12-26 Martin Mares <mj@ucw.cz>
* lspci.c (show_pcix_bridge, show_pcix_nobridge): Don't forget to call
echo >>$c '#define PATH_NBSD_DEVICE "/dev/pci0"'
ok=1
;;
+ GNU)
+ echo_n " intel-conf"
+ echo >>$c '#define HAVE_PM_INTEL_CONF'
+ ok=1
+ ;;
*)
- echo " The PCI library currently supports only Linux, AIX, FreeBSD and NetBSD"
+ echo " Unfortunately, your OS is not supported by the PCI Library"
exit 1
;;
esac
#include "internal.h"
+#ifdef OS_LINUX
static int intel_iopl_set = -1;
static int
return intel_iopl_set;
}
+static inline void
+intel_cleanup_io(void)
+{
+ if (intel_iopl_set > 0)
+ iopl(3);
+ intel_iopl_set = -1;
+}
+#endif
+
+#ifdef OS_GNU
+/* The GNU Hurd doesn't have an iopl() call */
+
+static inline int
+intel_setup_io(void)
+{
+ return 1;
+}
+
+static inline int
+intel_cleanup_io(void)
+{
+}
+#endif
+
static void
conf12_init(struct pci_access *a)
{
static void
conf12_cleanup(struct pci_access *a UNUSED)
{
- iopl(3);
- intel_iopl_set = -1;
+ intel_cleanup_io();
}
/*
typedef __u16 word;
typedef __u16 u16;
typedef __u32 u32;
+
#endif
#ifdef OS_FREEBSD
typedef u_int32_t u32;
#endif
+#ifdef OS_GNU
+#include <sys/types.h>
+
+typedef u_int8_t byte;
+typedef u_int8_t u8;
+typedef u_int16_t word;
+typedef u_int16_t u16;
+typedef u_int32_t u32;
+#endif
+
#ifdef HAVE_LONG_ADDRESS
typedef unsigned long long pciaddr_t;
#else