summaryrefslogtreecommitdiff
path: root/com32/include/sys
diff options
context:
space:
mode:
authorH. Peter Anvin <hpa@zytor.com>2009-05-29 15:16:22 -0700
committerH. Peter Anvin <hpa@zytor.com>2009-05-29 15:16:22 -0700
commit5e6aef0b866b1e5c1c458cc8ca2a52092928fb0d (patch)
treed88795d0d3aba72776a20bf8ee4c8778815df3d0 /com32/include/sys
parentdcd9ae222c665a56a57a560be62b407a04573e13 (diff)
parent8833b1c37f7ecfa41e0e2c26e72c2913d5eba969 (diff)
downloadsyslinux-5e6aef0b866b1e5c1c458cc8ca2a52092928fb0d.tar.gz
Merge branch 'master' into core32
Conflicts: com32/include/netinet/in.h com32/include/sys/cpu.h dos/argv.c dos/malloc.c dos/syslinux.c extlinux/main.c libinstaller/setadv.c libinstaller/syslinux.h libinstaller/syslxint.h libinstaller/syslxmod.c linux/syslinux.c mtools/syslinux.c win32/syslinux.c Signed-off-by: H. Peter Anvin <hpa@zytor.com>
Diffstat (limited to 'com32/include/sys')
-rw-r--r--com32/include/sys/cpu.h114
-rw-r--r--com32/include/sys/elf32.h104
-rw-r--r--com32/include/sys/elf64.h104
-rw-r--r--com32/include/sys/elfcommon.h2
-rw-r--r--com32/include/sys/io.h24
-rw-r--r--com32/include/sys/pci.h103
-rw-r--r--com32/include/sys/stat.h4
-rw-r--r--com32/include/sys/times.h2
-rw-r--r--com32/include/sys/types.h6
9 files changed, 229 insertions, 234 deletions
diff --git a/com32/include/sys/cpu.h b/com32/include/sys/cpu.h
index b0a76036..d96ec665 100644
--- a/com32/include/sys/cpu.h
+++ b/com32/include/sys/cpu.h
@@ -7,122 +7,114 @@
static inline uint64_t rdtsc(void)
{
- uint64_t v;
- asm volatile("rdtsc" : "=A" (v));
- return v;
+ uint64_t v;
+ asm volatile ("rdtsc":"=A" (v));
+ return v;
}
static inline uint32_t rdtscl(void)
{
- uint32_t v;
- asm volatile("rdtsc" : "=a" (v) : : "edx");
- return v;
+ uint32_t v;
+ asm volatile ("rdtsc":"=a" (v)::"edx");
+ return v;
}
static inline void cpuid_count(uint32_t op, uint32_t cnt,
- uint32_t *eax, uint32_t *ebx,
- uint32_t *ecx, uint32_t *edx)
+ uint32_t * eax, uint32_t * ebx,
+ uint32_t * ecx, uint32_t * edx)
{
- asm("pushl %%ebx ; cpuid ; movl %%ebx,%0 ; popl %%ebx"
- : "=a" (*eax), "=SD" (*ebx), "=c" (*ecx), "=d" (*edx)
- : "a" (op), "c" (cnt));
+asm("pushl %%ebx ; cpuid ; movl %%ebx,%0 ; popl %%ebx":"=a"(*eax), "=SD"(*ebx), "=c"(*ecx),
+ "=d"(*edx)
+: "a"(op), "c"(cnt));
}
-static inline void cpuid(uint32_t op, uint32_t *eax, uint32_t *ebx,
- uint32_t *ecx, uint32_t *edx)
+static inline void cpuid(uint32_t op, uint32_t * eax, uint32_t * ebx,
+ uint32_t * ecx, uint32_t * edx)
{
- asm("pushl %%ebx ; cpuid ; movl %%ebx,%0 ; popl %%ebx"
- : "=a" (*eax), "=SD" (*ebx), "=c" (*ecx), "=d" (*edx)
- : "a" (op));
+asm("pushl %%ebx ; cpuid ; movl %%ebx,%0 ; popl %%ebx":"=a"(*eax), "=SD"(*ebx), "=c"(*ecx),
+ "=d"(*edx)
+: "a"(op));
}
static inline __constfunc uint32_t cpuid_eax(uint32_t level)
{
- uint32_t v;
+ uint32_t v;
- asm("pushl %%ebx ; cpuid ; popl %%ebx"
- : "=a" (v)
- : "a" (level)
- : "ecx", "edx");
- return v;
+asm("pushl %%ebx ; cpuid ; popl %%ebx":"=a"(v)
+: "a"(level)
+: "ecx", "edx");
+ return v;
}
+
static inline __constfunc uint32_t cpuid_ebx(uint32_t level)
{
- uint32_t v;
+ uint32_t v;
- asm("pushl %%ebx ; cpuid ; movl %%ebx,%0 ; popl %%ebx"
- : "=a" (v)
- : "a" (level)
- : "ecx", "edx");
- return v;
+asm("pushl %%ebx ; cpuid ; movl %%ebx,%0 ; popl %%ebx":"=a"(v)
+: "a"(level)
+: "ecx", "edx");
+ return v;
}
+
static inline __constfunc uint32_t cpuid_ecx(uint32_t level)
{
- uint32_t v;
+ uint32_t v;
- asm("pushl %%ebx ; cpuid ; popl %%ebx"
- : "=c" (v), "+a" (level)
- : : "edx");
- return v;
+asm("pushl %%ebx ; cpuid ; popl %%ebx":"=c"(v), "+a"(level)
+: : "edx");
+ return v;
}
+
static inline __constfunc uint32_t cpuid_edx(uint32_t level)
{
- uint32_t v;
+ uint32_t v;
- asm("pushl %%ebx ; cpuid ; popl %%ebx"
- : "=d" (v), "+a" (level)
- : : "ecx");
- return v;
+asm("pushl %%ebx ; cpuid ; popl %%ebx":"=d"(v), "+a"(level)
+: : "ecx");
+ return v;
}
/* Standard macro to see if a specific flag is changeable */
static inline __constfunc bool cpu_has_eflag(uint32_t flag)
{
- uint32_t f1, f2;
-
- asm("pushfl\n\t"
- "pushfl\n\t"
- "popl %0\n\t"
- "movl %0,%1\n\t"
- "xorl %2,%0\n\t"
- "pushl %0\n\t"
- "popfl\n\t"
- "pushfl\n\t"
- "popl %0\n\t"
- "popfl\n\t"
- : "=&r" (f1), "=&r" (f2)
- : "ir" (flag));
-
- return ((f1^f2) & flag) != 0;
+ uint32_t f1, f2;
+
+asm("pushfl\n\t" "pushfl\n\t" "popl %0\n\t" "movl %0,%1\n\t" "xorl %2,%0\n\t" "pushl %0\n\t" "popfl\n\t" "pushfl\n\t" "popl %0\n\t" "popfl\n\t":"=&r"(f1),
+ "=&r"
+ (f2)
+: "ir"(flag));
+
+ return ((f1 ^ f2) & flag) != 0;
}
static inline uint64_t rdmsr(uint32_t msr)
{
- uint64_t v;
+ uint64_t v;
- asm volatile("rdmsr" : "=A" (v) : "c" (msr));
- return v;
+ asm volatile ("rdmsr":"=A" (v):"c"(msr));
+ return v;
}
+
static inline void wrmsr(uint64_t v, uint32_t msr)
{
- asm volatile("wrmsr" : : "A" (v), "c" (msr));
+ asm volatile ("wrmsr"::"A" (v), "c"(msr));
}
static inline void cpu_relax(void)
{
- asm volatile("rep ; nop");
+ asm volatile ("rep ; nop");
}
/* These are local cli/sti; not SMP-safe!!! */
static inline void cli(void)
{
- asm volatile("cli");
+ asm volatile ("cli");
}
static inline void sti(void)
{
- asm volatile("sti");
+ asm volatile ("sti");
}
#endif
diff --git a/com32/include/sys/elf32.h b/com32/include/sys/elf32.h
index e4df8cec..c98c274b 100644
--- a/com32/include/sys/elf32.h
+++ b/com32/include/sys/elf32.h
@@ -22,11 +22,11 @@ typedef uint16_t Elf32_Section;
/* Dynamic header */
typedef struct elf32_dyn {
- Elf32_Sword d_tag;
- union {
- Elf32_Sword d_val;
- Elf32_Addr d_ptr;
- } d_un;
+ Elf32_Sword d_tag;
+ union {
+ Elf32_Sword d_val;
+ Elf32_Addr d_ptr;
+ } d_un;
} Elf32_Dyn;
/* Relocations */
@@ -35,79 +35,79 @@ typedef struct elf32_dyn {
#define ELF32_R_TYPE(x) ((x) & 0xff)
typedef struct elf32_rel {
- Elf32_Addr r_offset;
- Elf32_Word r_info;
+ Elf32_Addr r_offset;
+ Elf32_Word r_info;
} Elf32_Rel;
typedef struct elf32_rela {
- Elf32_Addr r_offset;
- Elf32_Word r_info;
- Elf32_Sword r_addend;
+ Elf32_Addr r_offset;
+ Elf32_Word r_info;
+ Elf32_Sword r_addend;
} Elf32_Rela;
/* Symbol */
typedef struct elf32_sym {
- Elf32_Word st_name;
- Elf32_Addr st_value;
- Elf32_Word st_size;
- unsigned char st_info;
- unsigned char st_other;
- Elf32_Half st_shndx;
+ Elf32_Word st_name;
+ Elf32_Addr st_value;
+ Elf32_Word st_size;
+ unsigned char st_info;
+ unsigned char st_other;
+ Elf32_Half st_shndx;
} Elf32_Sym;
/* Main file header */
typedef struct elf32_hdr {
- unsigned char e_ident[EI_NIDENT];
- Elf32_Half e_type;
- Elf32_Half e_machine;
- Elf32_Word e_version;
- Elf32_Addr e_entry;
- Elf32_Off e_phoff;
- Elf32_Off e_shoff;
- Elf32_Word e_flags;
- Elf32_Half e_ehsize;
- Elf32_Half e_phentsize;
- Elf32_Half e_phnum;
- Elf32_Half e_shentsize;
- Elf32_Half e_shnum;
- Elf32_Half e_shstrndx;
+ unsigned char e_ident[EI_NIDENT];
+ Elf32_Half e_type;
+ Elf32_Half e_machine;
+ Elf32_Word e_version;
+ Elf32_Addr e_entry;
+ Elf32_Off e_phoff;
+ Elf32_Off e_shoff;
+ Elf32_Word e_flags;
+ Elf32_Half e_ehsize;
+ Elf32_Half e_phentsize;
+ Elf32_Half e_phnum;
+ Elf32_Half e_shentsize;
+ Elf32_Half e_shnum;
+ Elf32_Half e_shstrndx;
} Elf32_Ehdr;
/* Program header */
typedef struct elf32_phdr {
- Elf32_Word p_type;
- Elf32_Off p_offset;
- Elf32_Addr p_vaddr;
- Elf32_Addr p_paddr;
- Elf32_Word p_filesz;
- Elf32_Word p_memsz;
- Elf32_Word p_flags;
- Elf32_Word p_align;
+ Elf32_Word p_type;
+ Elf32_Off p_offset;
+ Elf32_Addr p_vaddr;
+ Elf32_Addr p_paddr;
+ Elf32_Word p_filesz;
+ Elf32_Word p_memsz;
+ Elf32_Word p_flags;
+ Elf32_Word p_align;
} Elf32_Phdr;
/* Section header */
typedef struct elf32_shdr {
- Elf32_Word sh_name;
- Elf32_Word sh_type;
- Elf32_Word sh_flags;
- Elf32_Addr sh_addr;
- Elf32_Off sh_offset;
- Elf32_Word sh_size;
- Elf32_Word sh_link;
- Elf32_Word sh_info;
- Elf32_Word sh_addralign;
- Elf32_Word sh_entsize;
+ Elf32_Word sh_name;
+ Elf32_Word sh_type;
+ Elf32_Word sh_flags;
+ Elf32_Addr sh_addr;
+ Elf32_Off sh_offset;
+ Elf32_Word sh_size;
+ Elf32_Word sh_link;
+ Elf32_Word sh_info;
+ Elf32_Word sh_addralign;
+ Elf32_Word sh_entsize;
} Elf32_Shdr;
/* Note header */
typedef struct elf32_note {
- Elf32_Word n_namesz; /* Name size */
- Elf32_Word n_descsz; /* Content size */
- Elf32_Word n_type; /* Content type */
+ Elf32_Word n_namesz; /* Name size */
+ Elf32_Word n_descsz; /* Content size */
+ Elf32_Word n_type; /* Content type */
} Elf32_Nhdr;
-#endif /* _SYS_ELF32_H */
+#endif /* _SYS_ELF32_H */
diff --git a/com32/include/sys/elf64.h b/com32/include/sys/elf64.h
index 0b486ac2..a76fc989 100644
--- a/com32/include/sys/elf64.h
+++ b/com32/include/sys/elf64.h
@@ -22,11 +22,11 @@ typedef uint16_t Elf64_Section;
/* Dynamic header */
typedef struct elf64_dyn {
- Elf64_Sxword d_tag;
- union {
- Elf64_Xword d_val;
- Elf64_Addr d_ptr;
- } d_un;
+ Elf64_Sxword d_tag;
+ union {
+ Elf64_Xword d_val;
+ Elf64_Addr d_ptr;
+ } d_un;
} Elf64_Dyn;
/* Relocations */
@@ -35,79 +35,79 @@ typedef struct elf64_dyn {
#define ELF64_R_TYPE(x) ((x) & 0xffffffff)
typedef struct elf64_rel {
- Elf64_Addr r_offset;
- Elf64_Xword r_info;
+ Elf64_Addr r_offset;
+ Elf64_Xword r_info;
} Elf64_Rel;
typedef struct elf64_rela {
- Elf64_Addr r_offset;
- Elf64_Xword r_info;
- Elf64_Sxword r_addend;
+ Elf64_Addr r_offset;
+ Elf64_Xword r_info;
+ Elf64_Sxword r_addend;
} Elf64_Rela;
/* Symbol */
typedef struct elf64_sym {
- Elf64_Word st_name;
- unsigned char st_info;
- unsigned char st_other;
- Elf64_Half st_shndx;
- Elf64_Addr st_value;
- Elf64_Xword st_size;
+ Elf64_Word st_name;
+ unsigned char st_info;
+ unsigned char st_other;
+ Elf64_Half st_shndx;
+ Elf64_Addr st_value;
+ Elf64_Xword st_size;
} Elf64_Sym;
/* Main file header */
typedef struct elf64_hdr {
- unsigned char e_ident[EI_NIDENT];
- Elf64_Half e_type;
- Elf64_Half e_machine;
- Elf64_Word e_version;
- Elf64_Addr e_entry;
- Elf64_Off e_phoff;
- Elf64_Off e_shoff;
- Elf64_Word e_flags;
- Elf64_Half e_ehsize;
- Elf64_Half e_phentsize;
- Elf64_Half e_phnum;
- Elf64_Half e_shentsize;
- Elf64_Half e_shnum;
- Elf64_Half e_shstrndx;
+ unsigned char e_ident[EI_NIDENT];
+ Elf64_Half e_type;
+ Elf64_Half e_machine;
+ Elf64_Word e_version;
+ Elf64_Addr e_entry;
+ Elf64_Off e_phoff;
+ Elf64_Off e_shoff;
+ Elf64_Word e_flags;
+ Elf64_Half e_ehsize;
+ Elf64_Half e_phentsize;
+ Elf64_Half e_phnum;
+ Elf64_Half e_shentsize;
+ Elf64_Half e_shnum;
+ Elf64_Half e_shstrndx;
} Elf64_Ehdr;
/* Program header */
typedef struct elf64_phdr {
- Elf64_Word p_type;
- Elf64_Word p_flags;
- Elf64_Off p_offset;
- Elf64_Addr p_vaddr;
- Elf64_Addr p_paddr;
- Elf64_Xword p_filesz;
- Elf64_Xword p_memsz;
- Elf64_Xword p_align;
+ Elf64_Word p_type;
+ Elf64_Word p_flags;
+ Elf64_Off p_offset;
+ Elf64_Addr p_vaddr;
+ Elf64_Addr p_paddr;
+ Elf64_Xword p_filesz;
+ Elf64_Xword p_memsz;
+ Elf64_Xword p_align;
} Elf64_Phdr;
/* Section header */
typedef struct elf64_shdr {
- Elf64_Word sh_name;
- Elf64_Word sh_type;
- Elf64_Xword sh_flags;
- Elf64_Addr sh_addr;
- Elf64_Off sh_offset;
- Elf64_Xword sh_size;
- Elf64_Word sh_link;
- Elf64_Word sh_info;
- Elf64_Xword sh_addralign;
- Elf64_Xword sh_entsize;
+ Elf64_Word sh_name;
+ Elf64_Word sh_type;
+ Elf64_Xword sh_flags;
+ Elf64_Addr sh_addr;
+ Elf64_Off sh_offset;
+ Elf64_Xword sh_size;
+ Elf64_Word sh_link;
+ Elf64_Word sh_info;
+ Elf64_Xword sh_addralign;
+ Elf64_Xword sh_entsize;
} Elf64_Shdr;
/* Note header */
typedef struct elf64_note {
- Elf64_Word n_namesz; /* Name size */
- Elf64_Word n_descsz; /* Content size */
- Elf64_Word n_type; /* Content type */
+ Elf64_Word n_namesz; /* Name size */
+ Elf64_Word n_descsz; /* Content size */
+ Elf64_Word n_type; /* Content type */
} Elf64_Nhdr;
-#endif /* _SYS_ELF64_H */
+#endif /* _SYS_ELF64_H */
diff --git a/com32/include/sys/elfcommon.h b/com32/include/sys/elfcommon.h
index cc8f9235..2489e3c0 100644
--- a/com32/include/sys/elfcommon.h
+++ b/com32/include/sys/elfcommon.h
@@ -184,4 +184,4 @@
#define ELFOSABI_NONE 0
#define ELFOSABI_LINUX 3
-#endif /* _SYS_ELFCOMMON_H */
+#endif /* _SYS_ELFCOMMON_H */
diff --git a/com32/include/sys/io.h b/com32/include/sys/io.h
index 460f2309..96f8960e 100644
--- a/com32/include/sys/io.h
+++ b/com32/include/sys/io.h
@@ -5,38 +5,38 @@
static inline uint8_t inb(uint16_t p)
{
- uint8_t v;
- asm volatile("inb %1,%0" : "=a" (v) : "Nd" (p));
- return v;
+ uint8_t v;
+ asm volatile ("inb %1,%0":"=a" (v):"Nd"(p));
+ return v;
}
static inline uint16_t inw(uint16_t p)
{
- uint16_t v;
- asm volatile("inw %1,%0" : "=a" (v) : "Nd" (p));
- return v;
+ uint16_t v;
+ asm volatile ("inw %1,%0":"=a" (v):"Nd"(p));
+ return v;
}
static inline uint32_t inl(uint16_t p)
{
- uint32_t v;
- asm volatile("inl %1,%0" : "=a" (v) : "Nd" (p));
- return v;
+ uint32_t v;
+ asm volatile ("inl %1,%0":"=a" (v):"Nd"(p));
+ return v;
}
static inline void outb(uint8_t v, uint16_t p)
{
- asm volatile("outb %0,%1" : : "a" (v), "Nd" (p));
+ asm volatile ("outb %0,%1"::"a" (v), "Nd"(p));
}
static inline void outw(uint16_t v, uint16_t p)
{
- asm volatile("outw %0,%1" : : "a" (v), "Nd" (p));
+ asm volatile ("outw %0,%1"::"a" (v), "Nd"(p));
}
static inline void outl(uint32_t v, uint16_t p)
{
- asm volatile("outl %0,%1" : : "a" (v), "Nd" (p));
+ asm volatile ("outl %0,%1"::"a" (v), "Nd"(p));
}
#endif /* _SYS_IO_H */
diff --git a/com32/include/sys/pci.h b/com32/include/sys/pci.h
index b6556ff0..2c6b5158 100644
--- a/com32/include/sys/pci.h
+++ b/com32/include/sys/pci.h
@@ -17,57 +17,58 @@
typedef uint32_t pciaddr_t;
enum {
- ENOPCIIDS = 100,
- ENOMODULESPCIMAP
+ ENOPCIIDS = 100,
+ ENOMODULESPCIMAP
};
/* a structure for extended pci information */
/* XXX: use pointers for these? */
struct pci_dev_info {
- char vendor_name[PCI_VENDOR_NAME_SIZE];
- char product_name[PCI_PRODUCT_NAME_SIZE];
- char linux_kernel_module[LINUX_KERNEL_MODULE_SIZE][MAX_KERNEL_MODULES_PER_PCI_DEVICE];
- int linux_kernel_module_count;
- char class_name[PCI_CLASS_NAME_SIZE]; /* The most precise class name */
- char category_name[PCI_CLASS_NAME_SIZE]; /*The general category*/
- uint8_t irq;
- uint8_t latency;
+ char vendor_name[PCI_VENDOR_NAME_SIZE];
+ char product_name[PCI_PRODUCT_NAME_SIZE];
+ char linux_kernel_module[LINUX_KERNEL_MODULE_SIZE]
+ [MAX_KERNEL_MODULES_PER_PCI_DEVICE];
+ int linux_kernel_module_count;
+ char class_name[PCI_CLASS_NAME_SIZE]; /* The most precise class name */
+ char category_name[PCI_CLASS_NAME_SIZE]; /*The general category */
+ uint8_t irq;
+ uint8_t latency;
};
/* PCI device (really, function) */
struct pci_device {
- union {
- struct {
- uint16_t vendor;
- uint16_t product;
- uint16_t sub_vendor;
- uint16_t sub_product;
- uint8_t revision;
- uint8_t class[3];
+ union {
+ struct {
+ uint16_t vendor;
+ uint16_t product;
+ uint16_t sub_vendor;
+ uint16_t sub_product;
+ uint8_t revision;
+ uint8_t class[3];
+ };
+ struct {
+ uint32_t vid_did;
+ uint32_t svid_sdid;
+ uint32_t rid_class;
+ };
};
- struct {
- uint32_t vid_did;
- uint32_t svid_sdid;
- uint32_t rid_class;
- };
- };
- struct pci_dev_info *dev_info;
- struct pci_device *next;
+ struct pci_dev_info *dev_info;
+ struct pci_device *next;
};
/* PCI device ("slot") structure */
struct pci_slot {
- struct pci_device *func[MAX_PCI_FUNC];
+ struct pci_device *func[MAX_PCI_FUNC];
};
/* PCI bus structure */
struct pci_bus {
- struct pci_slot *slot[MAX_PCI_DEVICES];
+ struct pci_slot *slot[MAX_PCI_DEVICES];
};
/* PCI domain structure */
struct pci_domain {
- struct pci_bus *bus[MAX_PCI_BUSES];
+ struct pci_bus *bus[MAX_PCI_BUSES];
};
/* Iterate over a PCI domain */
@@ -91,43 +92,43 @@ struct pci_domain {
func[__pci_func]))
struct match {
- struct match *next;
- uint32_t did;
- uint32_t did_mask;
- uint32_t sid;
- uint32_t sid_mask;
- uint8_t rid_min, rid_max;
- char *filename;
+ struct match *next;
+ uint32_t did;
+ uint32_t did_mask;
+ uint32_t sid;
+ uint32_t sid_mask;
+ uint8_t rid_min, rid_max;
+ char *filename;
};
static inline pciaddr_t pci_mkaddr(uint32_t bus, uint32_t dev,
uint32_t func, uint32_t reg)
{
- return 0x80000000 | ((bus & 0xff) << 16) | ((dev & 0x1f) << 11) |
- ((func & 0x07) << 8) | (reg & 0xff);
+ return 0x80000000 | ((bus & 0xff) << 16) | ((dev & 0x1f) << 11) |
+ ((func & 0x07) << 8) | (reg & 0xff);
}
static inline int pci_bus(pciaddr_t addr)
{
- return (addr >> 16) & 0xff;
+ return (addr >> 16) & 0xff;
}
static inline int pci_dev(pciaddr_t addr)
{
- return (addr >> 11) & 0x1f;
+ return (addr >> 11) & 0x1f;
}
static inline int pci_func(pciaddr_t addr)
{
- return (addr >> 8) & 0x07;
+ return (addr >> 8) & 0x07;
}
enum pci_config_type {
- PCI_CFG_NONE = -1, /* badness */
- PCI_CFG_AUTO = 0, /* autodetect */
- PCI_CFG_TYPE1 = 1,
- PCI_CFG_TYPE2 = 2,
- PCI_CFG_BIOS = 3,
+ PCI_CFG_NONE = -1, /* badness */
+ PCI_CFG_AUTO = 0, /* autodetect */
+ PCI_CFG_TYPE1 = 1,
+ PCI_CFG_TYPE2 = 2,
+ PCI_CFG_BIOS = 3,
};
enum pci_config_type pci_set_config_type(enum pci_config_type);
@@ -141,10 +142,12 @@ void pci_writel(uint32_t, pciaddr_t);
struct pci_domain *pci_scan(void);
void free_pci_domain(struct pci_domain *domain);
-struct match * find_pci_device(const struct pci_domain *pci_domain,
- struct match *list);
+struct match *find_pci_device(const struct pci_domain *pci_domain,
+ struct match *list);
int get_name_from_pci_ids(struct pci_domain *pci_domain, char *pciids_path);
-int get_module_name_from_pcimap(struct pci_domain *pci_domain, char *modules_pcimap_path);
-int get_class_name_from_pci_ids(struct pci_domain *pci_domain, char *pciids_path);
+int get_module_name_from_pcimap(struct pci_domain *pci_domain,
+ char *modules_pcimap_path);
+int get_class_name_from_pci_ids(struct pci_domain *pci_domain,
+ char *pciids_path);
void gather_additional_pci_config(struct pci_domain *domain);
#endif /* _SYS_PCI_H */
diff --git a/com32/include/sys/stat.h b/com32/include/sys/stat.h
index ffc41059..41cdf57b 100644
--- a/com32/include/sys/stat.h
+++ b/com32/include/sys/stat.h
@@ -42,8 +42,8 @@
/* These are the only fields in struct stat we emulate */
struct stat {
- mode_t st_mode;
- off_t st_size;
+ mode_t st_mode;
+ off_t st_size;
};
/* Only fstat() supported */
diff --git a/com32/include/sys/times.h b/com32/include/sys/times.h
index dd60a3c5..961c7b6d 100644
--- a/com32/include/sys/times.h
+++ b/com32/include/sys/times.h
@@ -8,7 +8,7 @@
#include <stdint.h>
struct tms {
- /* Empty */
+ /* Empty */
};
#define HZ 18 /* Piddly resolution... */
diff --git a/com32/include/sys/types.h b/com32/include/sys/types.h
index 2ab518c0..5279a49e 100644
--- a/com32/include/sys/types.h
+++ b/com32/include/sys/types.h
@@ -9,8 +9,8 @@
#include <stddef.h>
#include <stdint.h>
-typedef ptrdiff_t ssize_t;
-typedef int mode_t;
-typedef size_t off_t;
+typedef ptrdiff_t ssize_t;
+typedef int mode_t;
+typedef size_t off_t;
#endif