+Mon Apr 19 15:21:08 1999 Jakub Jelinek <jj@ultra.linux.cz>
+
+ * lspci.c: Display I/O addresses correctly on sparc64.
+ * lib/header.h: Ditto.
+
+ * lib/configure: On sparc set HAVE_64BIT* as well, we want
+ a binary which works on both 32bit and 64bit SPARCs.
+
Sun Apr 18 21:14:58 1999 Martin Mares <mj@albireo.ucw.cz>
* lspci.c, lib/proc.c: Alpha compilation fixes from Matthew Jacob
echo >>$c '#define HAVE_PM_INTEL_CONF'
ok=1
;;
- sparc) echo -n " syscalls"
- echo >>$c '#define HAVE_PM_SYSCALLS'
- ok=1
- ;;
- alpha|sparc64) echo >>$c '#define HAVE_64BIT_ADDRESS'
+ alpha|sparc|sparc64)
+ echo >>$c '#define HAVE_64BIT_ADDRESS'
# echo -n " syscalls"
# echo >>$c '#define HAVE_PM_SYSCALLS'
# ok=1
/*
- * $Id: header.h,v 1.2 1999/01/28 20:16:53 mj Exp $
+ * $Id: header.h,v 1.3 1999/04/26 19:46:02 mj Exp $
*
* The PCI Library -- PCI Header Structure (extracted from <linux/pci.h>)
*
#define PCI_BASE_ADDRESS_MEM_TYPE_1M 0x02 /* Below 1M */
#define PCI_BASE_ADDRESS_MEM_TYPE_64 0x04 /* 64 bit address */
#define PCI_BASE_ADDRESS_MEM_PREFETCH 0x08 /* prefetchable? */
-#define PCI_BASE_ADDRESS_MEM_MASK (~0x0fUL)
-#define PCI_BASE_ADDRESS_IO_MASK (~0x03UL)
+#define PCI_BASE_ADDRESS_MEM_MASK (~0x0fL)
+#define PCI_BASE_ADDRESS_IO_MASK (~0x03L)
/* bit 1 is reserved if address_space = 1 */
/* Header type 0 (normal devices) */
/*
- * $Id: lspci.c,v 1.24 1999/04/18 19:07:16 mj Exp $
+ * $Id: lspci.c,v 1.25 1999/04/26 19:45:57 mj Exp $
*
* Linux PCI Utilities -- List All PCI Devices
*
#define ADDR_FORMAT "%08lx"
#endif
+#ifdef ARCH_SPARC64
+#define IO_FORMAT "%016Lx"
+#elif defined(HAVE_64BIT_ADDRESS)
+#define IO_FORMAT "%04Lx"
+#else
+#define IO_FORMAT "%04lx"
+#endif
+
/* Our view of the PCI bus */
struct device {
}
if (flg & PCI_BASE_ADDRESS_SPACE_IO)
{
- unsigned long a = pos & PCI_BASE_ADDRESS_IO_MASK;
+ pciaddr_t a = pos & PCI_BASE_ADDRESS_IO_MASK;
printf("I/O ports at ");
if (a)
- printf("%04lx", a);
+ printf(IO_FORMAT, a);
else if (flg & PCI_BASE_ADDRESS_IO_MASK)
printf("<ignored>");
else