patch-aa 992 B

123456789101112131415161718192021222324252627282930313233343536
  1. $NetBSD: patch-aa,v 1.1.1.1 2002/07/23 12:07:45 agc Exp $
  2. --- src/iopl.c Tue May 8 15:14:21 2001
  3. +++ src/iopl.c Mon Jul 22 07:46:37 2002
  4. @@ -61,10 +61,17 @@
  5. */
  6. ret = iopl(3);
  7. #else
  8. +#if defined(__NetBSD__) && defined(HAVE_LIBI386)
  9. + /*
  10. + * Have to get unrestricted access to io ports, as WRITE_DATA port > 0x3ff
  11. + */
  12. + ret = i386_iopl(3);
  13. +#else
  14. #ifdef HAVE_IOPERM
  15. /* ALPHA only has ioperm, apparently, so cover all with one permission */
  16. ret = ioperm(MIN_READ_ADDR, WRITEDATA_ADDR - MIN_READ_ADDR + 1, 1);
  17. #endif /* HAVE_IOPERM */
  18. +#endif /* !(__NetBSD__ && HAVE_LIBI386) */
  19. #endif /* !HAVE_IOPL */
  20. if (ret < 0) {
  21. @@ -85,9 +92,13 @@
  22. #ifdef HAVE_IOPL
  23. ret = iopl(0);
  24. #else
  25. +#if defined(__NetBSD__) && defined(HAVE_LIBI386)
  26. + ret = i386_iopl(0);
  27. +#else
  28. #ifdef HAVE_IOPERM
  29. ret = ioperm(MIN_READ_ADDR, WRITEDATA_ADDR - MIN_READ_ADDR + 1, 0);
  30. #endif /* HAVE_IOPERM */
  31. +#endif /* !(__NetBSD__ && HAVE_LIBI386) */
  32. #endif /* !HAVE_IOPL */
  33. if (ret < 0) {