Add lspci command and SI_PCI_INFO getsysinfo call

This commit is contained in:
Erik van der Kouwe
2009-10-09 10:48:46 +00:00
parent 045f1cdb10
commit cb6dbfca2c
9 changed files with 151 additions and 4 deletions

View File

@@ -95,4 +95,8 @@
#define SPROFILE 1 /* statistical profiling */
#define CPROFILE 0 /* call profiling */
/* PCI configuration parameters */
#define NR_PCIBUS 40
#define NR_PCIDEV 50
#endif /* _CONFIG_H */

View File

@@ -193,5 +193,20 @@ struct k_randomness {
} bin[RANDOM_SOURCES];
};
/* information on PCI devices */
#define PCIINFO_ENTRY_SIZE 80
struct pciinfo_entry {
u16_t pie_vid;
u16_t pie_did;
char pie_name[PCIINFO_ENTRY_SIZE];
};
struct pciinfo {
size_t pi_count;
struct pciinfo_entry pi_entries[NR_PCIDEV];
};
#endif /* _TYPE_H */

View File

@@ -48,6 +48,7 @@
#define SI_LOADINFO 6 /* get copy of load average structure */
#define SI_KPROC_TAB 7 /* copy of kernel process table */
#define SI_CALL_STATS 8 /* system call statistics */
#define SI_PCI_INFO 9 /* get kernel info via PM */
/* NULL must be defined in <unistd.h> according to POSIX Sec. 2.7.1. */
#define NULL ((void *)0)