]>
git.ipfire.org Git - thirdparty/pciutils.git/blob - lib/types.h
2 * The PCI Library -- Types and Format Strings
4 * Copyright (c) 1997--2004 Martin Mares <mj@ucw.cz>
6 * Can be freely distributed and used under the terms of the GNU GPL.
11 #ifndef PCI_HAVE_Uxx_TYPES
14 typedef unsigned __int8 u8
;
15 typedef unsigned __int16 u16
;
16 typedef unsigned __int32 u32
;
19 typedef u_int16_t u16
;
20 typedef u_int32_t u32
;
23 #ifdef PCI_HAVE_64BIT_ADDRESS
25 #if ULONG_MAX > 0xffffffff
26 typedef unsigned long u64
;
27 #define PCI_U64_FMT "l"
29 typedef unsigned long long u64
30 #define PCI_U64_FMT "ll"
34 #endif /* PCI_HAVE_Uxx_TYPES */
36 #ifdef PCI_HAVE_64BIT_ADDRESS
37 typedef u64 pciaddr_t
;
38 #define PCIADDR_T_FMT "%016" PCI_U64_FMT "x"
39 #define PCIADDR_PORT_FMT "%04" PCI_U64_FMT "x"
41 typedef u32 pciaddr_t
;
42 #define PCIADDR_T_FMT "%08x"
43 #define PCIADDR_PORT_FMT "%04x"
46 #ifdef PCI_ARCH_SPARC64
47 /* On sparc64 Linux the kernel reports remapped port addresses and IRQ numbers */
48 #undef PCIADDR_PORT_FMT
49 #define PCIADDR_PORT_FMT PCIADDR_T_FMT
50 #define PCIIRQ_FMT "%08x"
52 #define PCIIRQ_FMT "%d"