aboutsummaryrefslogtreecommitdiffstats
path: root/com32/gplinclude
diff options
context:
space:
mode:
authorErwan Velu <erwan.velu@free.fr>2009-11-24 13:42:41 +0100
committerErwan Velu <erwan.velu@free.fr>2009-11-24 13:42:41 +0100
commit2672e142b4b69ab5161d24261812d3509cb8915b (patch)
treee3b1b60b265044c2148c0c53682619343ff4f74a /com32/gplinclude
parenta06075995c5ea9c4c473820cba03033e9c945a41 (diff)
downloadsyslinux-2672e142b4b69ab5161d24261812d3509cb8915b.tar.gz
syslinux-2672e142b4b69ab5161d24261812d3509cb8915b.tar.xz
syslinux-2672e142b4b69ab5161d24261812d3509cb8915b.zip
gpllibs: Running Nindent
Impact: visual Running Nindent on gpllib / gplinclude
Diffstat (limited to 'com32/gplinclude')
-rw-r--r--com32/gplinclude/disk/bootloaders.h3
-rw-r--r--com32/gplinclude/disk/common.h10
-rw-r--r--com32/gplinclude/disk/errno_disk.h64
-rw-r--r--com32/gplinclude/disk/error.h2
-rw-r--r--com32/gplinclude/disk/geom.h287
-rw-r--r--com32/gplinclude/disk/msdos.h2
-rw-r--r--com32/gplinclude/disk/partition.h24
-rw-r--r--com32/gplinclude/disk/read.h6
-rw-r--r--com32/gplinclude/disk/swsusp.h14
-rw-r--r--com32/gplinclude/disk/util.h2
-rw-r--r--com32/gplinclude/disk/write.h12
-rw-r--r--com32/gplinclude/dmi/dmi.h46
-rw-r--r--com32/gplinclude/dmi/dmi_base_board.h38
-rw-r--r--com32/gplinclude/dmi/dmi_cache.h28
-rw-r--r--com32/gplinclude/dmi/dmi_memory.h26
-rw-r--r--com32/gplinclude/dmi/dmi_system.h10
-rw-r--r--com32/gplinclude/memory.h21
17 files changed, 298 insertions, 297 deletions
diff --git a/com32/gplinclude/disk/bootloaders.h b/com32/gplinclude/disk/bootloaders.h
index 6aec9b3d..5a6ff9d9 100644
--- a/com32/gplinclude/disk/bootloaders.h
+++ b/com32/gplinclude/disk/bootloaders.h
@@ -14,5 +14,6 @@
#include <disk/geom.h>
#include <disk/partition.h>
-int get_bootloader_string(const struct driveinfo *, const struct part_entry *, char*, const int);
+int get_bootloader_string(const struct driveinfo *, const struct part_entry *,
+ char *, const int);
#endif /* __BOOTLOADERS_H_ */
diff --git a/com32/gplinclude/disk/common.h b/com32/gplinclude/disk/common.h
index 627e94ec..4e415c11 100644
--- a/com32/gplinclude/disk/common.h
+++ b/com32/gplinclude/disk/common.h
@@ -23,11 +23,11 @@
#define SECTOR 512 /* bytes/sector */
struct ebios_dapa {
- uint16_t len;
- uint16_t count;
- uint16_t off;
- uint16_t seg;
- uint64_t lba;
+ uint16_t len;
+ uint16_t count;
+ uint16_t off;
+ uint16_t seg;
+ uint64_t lba;
};
#endif /* _COMMON_H_ */
diff --git a/com32/gplinclude/disk/errno_disk.h b/com32/gplinclude/disk/errno_disk.h
index 60b511fc..68bd89d9 100644
--- a/com32/gplinclude/disk/errno_disk.h
+++ b/com32/gplinclude/disk/errno_disk.h
@@ -13,38 +13,38 @@
extern int errno_disk;
/* Prefix with ED to avoid confusion with errno */
-#define EDINV 0x01 /* Invalid function in AH or invalid parameter */
-#define EDADDR 0x02 /* Address mark not found */
-#define EDRO 0x03 /* Disk write-protected */
-#define EDNOFND 0x04 /* Sector not found/read error */
-#define EDRFAIL 0x05 /* Reset failed (hard disk) */
-#define EDCHANG 0x06 /* Disk changed (floppy) */
-#define EDFAIL 0x07 /* Drive parameter activity failed (hard disk) */
-#define EDDMA 0x08 /* DMA overrun */
-#define EDBOUND 0x09 /* Data boundary error (attempted DMA across 64K boundary or >80h sectors) */
-#define EDBADS 0x0A /* Bad sector detected (hard disk) */
-#define EDBADT 0x0B /* Bad track detected (hard disk) */
-#define EDINVM 0x0C /* Unsupported track or invalid media */
-#define EDINVS 0x0D /* Invalid number of sectors on format (PS/2 hard disk) */
-#define EDADDRM 0x0E /* Control data address mark detected (hard disk) */
-#define EDDMARG 0x0F /* DMA arbitration level out of range (hard disk) */
-#define EDCRCF 0x10 /* Uncorrectable CRC or ECC error on read */
-#define EDCRCV 0x11 /* Data ECC corrected (hard disk) */
-#define EDCTRL 0x20 /* Controller failure */
-#define EDMEDIA 0x31 /* No media in drive (IBM/MS INT 13 extensions) */
-#define EDCMOS 0x32 /* Incorrect drive type stored in CMOS (Compaq) */
-#define EDSEEKF 0x40 /* Seek failed */
-#define EDTIME 0x80 /* Timeout (not ready) */
-#define EDREADY 0xAA /* Drive not ready (hard disk) */
-#define EDNLOCK 0xB0 /* Volume not locked in drive (INT 13 extensions) */
-#define EDLOCK 0xB1 /* Volume locked in drive (INT 13 extensions) */
-#define EDREMOV 0xB2 /* Volume not removable (INT 13 extensions) */
-#define EDUSED 0xB3 /* Volume in use (INT 13 extensions) */
-#define EDCOUNT 0xB4 /* Lock count exceeded (INT 13 extensions) */
-#define EDEJF 0xB5 /* Valid eject request failed (INT 13 extensions) */
+#define EDINV 0x01 /* Invalid function in AH or invalid parameter */
+#define EDADDR 0x02 /* Address mark not found */
+#define EDRO 0x03 /* Disk write-protected */
+#define EDNOFND 0x04 /* Sector not found/read error */
+#define EDRFAIL 0x05 /* Reset failed (hard disk) */
+#define EDCHANG 0x06 /* Disk changed (floppy) */
+#define EDFAIL 0x07 /* Drive parameter activity failed (hard disk) */
+#define EDDMA 0x08 /* DMA overrun */
+#define EDBOUND 0x09 /* Data boundary error (attempted DMA across 64K boundary or >80h sectors) */
+#define EDBADS 0x0A /* Bad sector detected (hard disk) */
+#define EDBADT 0x0B /* Bad track detected (hard disk) */
+#define EDINVM 0x0C /* Unsupported track or invalid media */
+#define EDINVS 0x0D /* Invalid number of sectors on format (PS/2 hard disk) */
+#define EDADDRM 0x0E /* Control data address mark detected (hard disk) */
+#define EDDMARG 0x0F /* DMA arbitration level out of range (hard disk) */
+#define EDCRCF 0x10 /* Uncorrectable CRC or ECC error on read */
+#define EDCRCV 0x11 /* Data ECC corrected (hard disk) */
+#define EDCTRL 0x20 /* Controller failure */
+#define EDMEDIA 0x31 /* No media in drive (IBM/MS INT 13 extensions) */
+#define EDCMOS 0x32 /* Incorrect drive type stored in CMOS (Compaq) */
+#define EDSEEKF 0x40 /* Seek failed */
+#define EDTIME 0x80 /* Timeout (not ready) */
+#define EDREADY 0xAA /* Drive not ready (hard disk) */
+#define EDNLOCK 0xB0 /* Volume not locked in drive (INT 13 extensions) */
+#define EDLOCK 0xB1 /* Volume locked in drive (INT 13 extensions) */
+#define EDREMOV 0xB2 /* Volume not removable (INT 13 extensions) */
+#define EDUSED 0xB3 /* Volume in use (INT 13 extensions) */
+#define EDCOUNT 0xB4 /* Lock count exceeded (INT 13 extensions) */
+#define EDEJF 0xB5 /* Valid eject request failed (INT 13 extensions) */
#define EDUNKOWN 0xBB /* Undefined error (hard disk) */
-#define EDWF 0xCC /* Write fault (hard disk) */
-#define EDRF 0xE0 /* Status register error (hard disk) */
-#define EDSF 0xFF /* Sense operation failed (hard disk) */
+#define EDWF 0xCC /* Write fault (hard disk) */
+#define EDRF 0xE0 /* Status register error (hard disk) */
+#define EDSF 0xFF /* Sense operation failed (hard disk) */
#endif /* _ERRNO_DISK_H */
diff --git a/com32/gplinclude/disk/error.h b/com32/gplinclude/disk/error.h
index 27683572..e00266fe 100644
--- a/com32/gplinclude/disk/error.h
+++ b/com32/gplinclude/disk/error.h
@@ -9,5 +9,5 @@
#ifndef _ERROR_H_
#define _ERROR_H_
-void get_error(const char*);
+void get_error(const char *);
#endif /* _ERROR_H_ */
diff --git a/com32/gplinclude/disk/geom.h b/com32/gplinclude/disk/geom.h
index 0d3eed57..359c7cf9 100644
--- a/com32/gplinclude/disk/geom.h
+++ b/com32/gplinclude/disk/geom.h
@@ -29,7 +29,7 @@
* returned by a v2.x implementation; similarly for the Device Path info
**/
struct edd_device_parameters {
- uint16_t len; /* size of returned data */
+ uint16_t len; /* size of returned data */
/**
* Bitfields for IBM/MS INT 13 Extensions information flags:
* Bit(s) Description (Table 00274)
@@ -42,28 +42,28 @@ struct edd_device_parameters {
* 6 CHS information set to maximum supported values, not current media
* 15-7 reserved (0)
**/
- uint16_t info; /* information flags */
- uint32_t cylinders; /* number of physical cylinders on drive */
- uint32_t heads; /* number of physical heads on drive */
- uint32_t sectors_per_track; /* number of physical sectors per track */
- uint64_t sectors; /* total number of sectors on drive */
- uint16_t bytes_per_sector; /* bytes per sector */
- /* --- v2.0+ --- */
- uint32_t dpte_pointer; /* EDD configuration parameters, FFFFh:FFFFh if not available */
- /* --- v3.0 --- */
- uint16_t device_path_information; /* signature BEDDh to indicate presence of Device Path info */
- uint8_t device_path_length; /* length of Device Path information, including signature and this byte (24h for v3.0) */
- uint8_t device_path_reserved; /* reserved (0) */
- uint16_t device_path_reserved_2; /* reserved (0) */
- uint8_t host_bus_type[4]; /* ASCIZ name of host bus ("ISA" or "PCI") */
- uint8_t interface_type[8]; /* ASCIZ name of interface type
- * "ATA"
- * "ATAPI"
- * "SCSI"
- * "USB"
- * "1394" IEEE 1394 (FireWire)
- * "FIBRE" Fibre Channel
- */
+ uint16_t info; /* information flags */
+ uint32_t cylinders; /* number of physical cylinders on drive */
+ uint32_t heads; /* number of physical heads on drive */
+ uint32_t sectors_per_track; /* number of physical sectors per track */
+ uint64_t sectors; /* total number of sectors on drive */
+ uint16_t bytes_per_sector; /* bytes per sector */
+ /* --- v2.0+ --- */
+ uint32_t dpte_pointer; /* EDD configuration parameters, FFFFh:FFFFh if not available */
+ /* --- v3.0 --- */
+ uint16_t device_path_information; /* signature BEDDh to indicate presence of Device Path info */
+ uint8_t device_path_length; /* length of Device Path information, including signature and this byte (24h for v3.0) */
+ uint8_t device_path_reserved; /* reserved (0) */
+ uint16_t device_path_reserved_2; /* reserved (0) */
+ uint8_t host_bus_type[4]; /* ASCIZ name of host bus ("ISA" or "PCI") */
+ uint8_t interface_type[8]; /* ASCIZ name of interface type
+ * "ATA"
+ * "ATAPI"
+ * "SCSI"
+ * "USB"
+ * "1394" IEEE 1394 (FireWire)
+ * "FIBRE" Fibre Channel
+ */
/**
* Format of EDD v3.0 Interface Path:
* Offset Size Description (Table 00275)
@@ -76,33 +76,33 @@ struct edd_device_parameters {
* 02h BYTE PCI function number
* 03h 5 BYTEs reserved (0)
**/
- union {
- struct {
- uint16_t base_address;
- uint16_t reserved1;
- uint32_t reserved2;
- } __attribute__ ((packed)) isa;
- struct {
- uint8_t bus;
- uint8_t slot;
- uint8_t function;
- uint8_t channel;
- uint32_t reserved;
- } __attribute__ ((packed)) pci;
- /* pcix is same as pci */
- struct {
- uint64_t reserved;
- } __attribute__ ((packed)) ibnd;
- struct {
- uint64_t reserved;
- } __attribute__ ((packed)) xprs;
- struct {
- uint64_t reserved;
- } __attribute__ ((packed)) htpt;
- struct {
- uint64_t reserved;
- } __attribute__ ((packed)) unknown;
- } interface_path;
+ union {
+ struct {
+ uint16_t base_address;
+ uint16_t reserved1;
+ uint32_t reserved2;
+ } __attribute__ ((packed)) isa;
+ struct {
+ uint8_t bus;
+ uint8_t slot;
+ uint8_t function;
+ uint8_t channel;
+ uint32_t reserved;
+ } __attribute__ ((packed)) pci;
+ /* pcix is same as pci */
+ struct {
+ uint64_t reserved;
+ } __attribute__ ((packed)) ibnd;
+ struct {
+ uint64_t reserved;
+ } __attribute__ ((packed)) xprs;
+ struct {
+ uint64_t reserved;
+ } __attribute__ ((packed)) htpt;
+ struct {
+ uint64_t reserved;
+ } __attribute__ ((packed)) unknown;
+ } interface_path;
/**
* Format of EDD v3.0 Device Path:
* Offset Size Description (Table 00276)
@@ -124,83 +124,83 @@ struct edd_device_parameters {
* ---FibreChannel---
* 00h QWORD Word Wide Number (WWN)
**/
- union {
- struct {
- uint8_t device;
- uint8_t reserved1;
- uint16_t reserved2;
- uint32_t reserved3;
- uint64_t reserved4;
- } __attribute__ ((packed)) ata;
- struct {
- uint8_t device;
- uint8_t lun;
- uint8_t reserved1;
- uint8_t reserved2;
- uint32_t reserved3;
- uint64_t reserved4;
- } __attribute__ ((packed)) atapi;
- struct {
- uint16_t id;
- uint64_t lun;
- uint16_t reserved1;
- uint32_t reserved2;
- } __attribute__ ((packed)) scsi;
- struct {
- uint64_t serial_number;
- uint64_t reserved;
- } __attribute__ ((packed)) usb;
- struct {
- uint64_t eui;
- uint64_t reserved;
- } __attribute__ ((packed)) i1394;
- struct {
- uint64_t wwid;
- uint64_t lun;
- } __attribute__ ((packed)) fibre;
- struct {
- uint64_t identity_tag;
- uint64_t reserved;
- } __attribute__ ((packed)) i2o;
- struct {
- uint32_t array_number;
- uint32_t reserved1;
- uint64_t reserved2;
- } __attribute__ ((packed)) raid;
- struct {
- uint8_t device;
- uint8_t reserved1;
- uint16_t reserved2;
- uint32_t reserved3;
- uint64_t reserved4;
- } __attribute__ ((packed)) sata;
- struct {
- uint64_t reserved1;
- uint64_t reserved2;
- } __attribute__ ((packed)) unknown;
- } device_path;
- uint8_t reserved; /* reserved (0) */
- uint8_t checksum; /* checksum of bytes 1Eh-40h (two's complement of sum, which makes
- * the 8-bit sum of bytes 1Eh-41h equal 00h) */
+ union {
+ struct {
+ uint8_t device;
+ uint8_t reserved1;
+ uint16_t reserved2;
+ uint32_t reserved3;
+ uint64_t reserved4;
+ } __attribute__ ((packed)) ata;
+ struct {
+ uint8_t device;
+ uint8_t lun;
+ uint8_t reserved1;
+ uint8_t reserved2;
+ uint32_t reserved3;
+ uint64_t reserved4;
+ } __attribute__ ((packed)) atapi;
+ struct {
+ uint16_t id;
+ uint64_t lun;
+ uint16_t reserved1;
+ uint32_t reserved2;
+ } __attribute__ ((packed)) scsi;
+ struct {
+ uint64_t serial_number;
+ uint64_t reserved;
+ } __attribute__ ((packed)) usb;
+ struct {
+ uint64_t eui;
+ uint64_t reserved;
+ } __attribute__ ((packed)) i1394;
+ struct {
+ uint64_t wwid;
+ uint64_t lun;
+ } __attribute__ ((packed)) fibre;
+ struct {
+ uint64_t identity_tag;
+ uint64_t reserved;
+ } __attribute__ ((packed)) i2o;
+ struct {
+ uint32_t array_number;
+ uint32_t reserved1;
+ uint64_t reserved2;
+ } __attribute__ ((packed)) raid;
+ struct {
+ uint8_t device;
+ uint8_t reserved1;
+ uint16_t reserved2;
+ uint32_t reserved3;
+ uint64_t reserved4;
+ } __attribute__ ((packed)) sata;
+ struct {
+ uint64_t reserved1;
+ uint64_t reserved2;
+ } __attribute__ ((packed)) unknown;
+ } device_path;
+ uint8_t reserved; /* reserved (0) */
+ uint8_t checksum; /* checksum of bytes 1Eh-40h (two's complement of sum, which makes
+ * the 8-bit sum of bytes 1Eh-41h equal 00h) */
} __attribute__ ((packed));
/*
* Disk parameters
*/
struct driveinfo {
- int disk; /* Disk port (0x80 - 0xff) */
- /* Legacy C/H/S */
- int cbios; /* CHS geometry is valid */
- int legacy_max_head;
- int legacy_max_cylinder;
- int legacy_sectors_per_track;
- int legacy_max_drive;
- int legacy_type; /* Drive type (AT/PS2 floppies only) */
- /* EDD support */
- int ebios; /* EBIOS supported on this disk */
- int edd_version; /* EBIOS major version */
- int edd_functionality_subset;
- struct edd_device_parameters edd_params;/* EDD parameters */
+ int disk; /* Disk port (0x80 - 0xff) */
+ /* Legacy C/H/S */
+ int cbios; /* CHS geometry is valid */
+ int legacy_max_head;
+ int legacy_max_cylinder;
+ int legacy_sectors_per_track;
+ int legacy_max_drive;
+ int legacy_type; /* Drive type (AT/PS2 floppies only) */
+ /* EDD support */
+ int ebios; /* EBIOS supported on this disk */
+ int edd_version; /* EBIOS major version */
+ int edd_functionality_subset;
+ struct edd_device_parameters edd_params; /* EDD parameters */
};
/**
@@ -290,36 +290,37 @@ struct driveinfo {
* 10h ATAPI Removable Media Device
*/
enum diskette_drive_types {
- DISKETTE_360K = 1,
- DISKETTE_1_2M = 2,
- DISKETTE_720K = 3,
- DISKETTE_1_44M = 4,
- DISKETTE_2_88M = 6,
- DISKETTE_ATAPI = 10,
+ DISKETTE_360K = 1,
+ DISKETTE_1_2M = 2,
+ DISKETTE_720K = 3,
+ DISKETTE_1_44M = 4,
+ DISKETTE_2_88M = 6,
+ DISKETTE_ATAPI = 10,
};
/**
* chs_to_lba - compute lba value from cylinder, head and sector number
**/
-static inline int chs_to_lba(const struct driveinfo* drive_info,
- const unsigned int cylinder, const unsigned int head,
- const unsigned int sector)
+static inline int chs_to_lba(const struct driveinfo *drive_info,
+ const unsigned int cylinder,
+ const unsigned int head, const unsigned int sector)
{
- /* Use EDD, if valid */
- if (drive_info->edd_params.sectors_per_track > 0 &&
- drive_info->edd_params.heads > 0)
- return (sector - 1) + (head * drive_info->edd_params.sectors_per_track) +
- (cylinder * (drive_info->edd_params.heads) *
- drive_info->edd_params.sectors_per_track);
- else if (drive_info->cbios)
- return (sector - 1) + (head * drive_info->legacy_sectors_per_track) +
- (cylinder * (drive_info->legacy_max_head + 1) *
- drive_info->legacy_sectors_per_track);
+ /* Use EDD, if valid */
+ if (drive_info->edd_params.sectors_per_track > 0 &&
+ drive_info->edd_params.heads > 0)
+ return (sector - 1) +
+ (head * drive_info->edd_params.sectors_per_track) +
+ (cylinder * (drive_info->edd_params.heads) *
+ drive_info->edd_params.sectors_per_track);
+ else if (drive_info->cbios)
+ return (sector - 1) + (head * drive_info->legacy_sectors_per_track) +
+ (cylinder * (drive_info->legacy_max_head + 1) *
+ drive_info->legacy_sectors_per_track);
}
-void lba_to_chs(const struct driveinfo* drive_info, const int lba,
- unsigned int* cylinder, unsigned int* head,
- unsigned int* sector);
+void lba_to_chs(const struct driveinfo *drive_info, const int lba,
+ unsigned int *cylinder, unsigned int *head,
+ unsigned int *sector);
int get_drive_parameters(struct driveinfo *drive_info);
#endif /* _GEOM_H */
diff --git a/com32/gplinclude/disk/msdos.h b/com32/gplinclude/disk/msdos.h
index 405b9b99..cb39dad2 100644
--- a/com32/gplinclude/disk/msdos.h
+++ b/com32/gplinclude/disk/msdos.h
@@ -13,7 +13,7 @@
#include <disk/geom.h>
#include <disk/partition.h>
-typedef void (*p_callback)(struct driveinfo *, struct part_entry *, int, int);
+typedef void (*p_callback) (struct driveinfo *, struct part_entry *, int, int);
int parse_partition_table(struct driveinfo *, p_callback);
#endif /* _MSDOS_H_ */
diff --git a/com32/gplinclude/disk/partition.h b/com32/gplinclude/disk/partition.h
index be6bfaab..5edf8281 100644
--- a/com32/gplinclude/disk/partition.h
+++ b/com32/gplinclude/disk/partition.h
@@ -21,17 +21,17 @@
/* A DOS partition table entry */
struct part_entry {
- uint8_t active_flag; /* 0x80 if "active" */
- uint8_t start_head;
- uint8_t start_sect;
- uint8_t start_cyl;
- uint8_t ostype;
- uint8_t end_head;
- uint8_t end_sect;
- uint8_t end_cyl;
- uint32_t start_lba;
- uint32_t length;
-} __attribute__((packed));
+ uint8_t active_flag; /* 0x80 if "active" */
+ uint8_t start_head;
+ uint8_t start_sect;
+ uint8_t start_cyl;
+ uint8_t ostype;
+ uint8_t end_head;
+ uint8_t end_sect;
+ uint8_t end_cyl;
+ uint32_t start_lba;
+ uint32_t length;
+} __attribute__ ((packed));
-void get_label(int label, char** buffer_label);
+void get_label(int label, char **buffer_label);
#endif /* _PARTITION_H_ */
diff --git a/com32/gplinclude/disk/read.h b/com32/gplinclude/disk/read.h
index 43762a68..08a9dd3e 100644
--- a/com32/gplinclude/disk/read.h
+++ b/com32/gplinclude/disk/read.h
@@ -12,7 +12,7 @@
#include <disk/geom.h>
-int read_mbr(int, void*);
-int dev_read(int, void*, unsigned int, int);
-int read_sectors(struct driveinfo*, void*, const unsigned int, const int);
+int read_mbr(int, void *);
+int dev_read(int, void *, unsigned int, int);
+int read_sectors(struct driveinfo *, void *, const unsigned int, const int);
#endif /* _READ_H */
diff --git a/com32/gplinclude/disk/swsusp.h b/com32/gplinclude/disk/swsusp.h
index 1d77c878..3e9acacf 100644
--- a/com32/gplinclude/disk/swsusp.h
+++ b/com32/gplinclude/disk/swsusp.h
@@ -8,12 +8,12 @@
#define SWSUSP_SIG "S1SUSPEND"
struct swsusp_header {
- char reserved[PAGE_SIZE - 20 - sizeof(unsigned long) - sizeof(int)];
- unsigned long image;
- unsigned int flags; /* Flags to pass to the "boot" kernel */
- char orig_sig[10];
- char sig[10];
-} __attribute__((packed));
+ char reserved[PAGE_SIZE - 20 - sizeof(unsigned long) - sizeof(int)];
+ unsigned long image;
+ unsigned int flags; /* Flags to pass to the "boot" kernel */
+ char orig_sig[10];
+ char sig[10];
+} __attribute__ ((packed));
-int swsusp_check(struct driveinfo*, struct part_entry*);
+int swsusp_check(struct driveinfo *, struct part_entry *);
#endif /* _SWSUSP_H */
diff --git a/com32/gplinclude/disk/util.h b/com32/gplinclude/disk/util.h
index 20a9428f..52f085a7 100644
--- a/com32/gplinclude/disk/util.h
+++ b/com32/gplinclude/disk/util.h
@@ -17,5 +17,5 @@
#include <com32.h>
-int int13_retry(const com32sys_t *inreg, com32sys_t *outreg);
+int int13_retry(const com32sys_t * inreg, com32sys_t * outreg);
#endif /* _UTIL_H_ */
diff --git a/com32/gplinclude/disk/write.h b/com32/gplinclude/disk/write.h
index faa80c7d..89d26fc6 100644
--- a/com32/gplinclude/disk/write.h
+++ b/com32/gplinclude/disk/write.h
@@ -17,12 +17,10 @@
#include <disk/geom.h>
-int write_sectors(const struct driveinfo*, const unsigned int,
+int write_sectors(const struct driveinfo *, const unsigned int,
const void *, const int);
-int write_verify_sector(struct driveinfo* drive_info,
- const unsigned int,
- const void *);
-int write_verify_sectors(struct driveinfo*,
- const unsigned int,
- const void *, const int);
+int write_verify_sector(struct driveinfo *drive_info,
+ const unsigned int, const void *);
+int write_verify_sectors(struct driveinfo *,
+ const unsigned int, const void *, const int);
#endif
diff --git a/com32/gplinclude/dmi/dmi.h b/com32/gplinclude/dmi/dmi.h
index 72bc8dc4..dba2229b 100644
--- a/com32/gplinclude/dmi/dmi.h
+++ b/com32/gplinclude/dmi/dmi.h
@@ -13,7 +13,7 @@
#ifndef DMI_H
#define DMI_H
#include <inttypes.h>
-#define DMI_BUFFER_SIZE 16
+#define DMI_BUFFER_SIZE 16
#define MAX_DMI_MEMORY_ITEMS 32
#define MAX_DMI_CACHE_ITEMS 32
#define OEM_STRINGS_SIZE 512
@@ -60,28 +60,28 @@ struct dmi_header {
};
typedef struct {
- s_bios bios;
- s_system system;
- s_base_board base_board;
- s_chassis chassis;
- s_processor processor;
- s_battery battery;
- s_memory_module memory_module[MAX_DMI_MEMORY_ITEMS];
- s_memory memory[MAX_DMI_MEMORY_ITEMS];
- s_ipmi ipmi;
- s_cache cache[MAX_DMI_CACHE_ITEMS];
- int memory_module_count;
- int memory_count;
- int cache_count;
- dmi_table dmitable;
- char oem_strings[OEM_STRINGS_SIZE];
- struct {
- char power_on_passwd_status[HARDWARE_SECURITY_SIZE];
- char keyboard_passwd_status[HARDWARE_SECURITY_SIZE];
- char administrator_passwd_status[HARDWARE_SECURITY_SIZE];
- char front_panel_reset_status[HARDWARE_SECURITY_SIZE];
- bool filled;
- } hardware_security;
+ s_bios bios;
+ s_system system;
+ s_base_board base_board;
+ s_chassis chassis;
+ s_processor processor;
+ s_battery battery;
+ s_memory_module memory_module[MAX_DMI_MEMORY_ITEMS];
+ s_memory memory[MAX_DMI_MEMORY_ITEMS];
+ s_ipmi ipmi;
+ s_cache cache[MAX_DMI_CACHE_ITEMS];
+ int memory_module_count;
+ int memory_count;
+ int cache_count;
+ dmi_table dmitable;
+ char oem_strings[OEM_STRINGS_SIZE];
+ struct {
+ char power_on_passwd_status[HARDWARE_SECURITY_SIZE];
+ char keyboard_passwd_status[HARDWARE_SECURITY_SIZE];
+ char administrator_passwd_status[HARDWARE_SECURITY_SIZE];
+ char front_panel_reset_status[HARDWARE_SECURITY_SIZE];
+ bool filled;
+ } hardware_security;
} s_dmi;
void to_dmi_header(struct dmi_header *h, uint8_t * data);
diff --git a/com32/gplinclude/dmi/dmi_base_board.h b/com32/gplinclude/dmi/dmi_base_board.h
index ff4dd8a9..3d5fb557 100644
--- a/com32/gplinclude/dmi/dmi_base_board.h
+++ b/com32/gplinclude/dmi/dmi_base_board.h
@@ -30,29 +30,29 @@ extern const char *base_board_features_strings[];
/* this struct have BASE_BOARD_NB_ELEMENTS */
/* each bool is associated to the relevant message above */
typedef struct {
- bool hosting;
- bool board_needs_daughter;
- bool removable;
- bool replaceable;
- bool hot_swappable;
+ bool hosting;
+ bool board_needs_daughter;
+ bool removable;
+ bool replaceable;
+ bool hot_swappable;
} __attribute__ ((__packed__)) s_base_board_features;
typedef struct {
- char manufacturer[BASE_BOARD_MANUFACTURER_SIZE];
- char product_name[BASE_BOARD_PRODUCT_NAME_SIZE];
- char version[BASE_BOARD_VERSION_SIZE];
- char serial[BASE_BOARD_SERIAL_SIZE];
- char asset_tag[BASE_BOARD_ASSET_TAG_SIZE];
- char location[BASE_BOARD_LOCATION_SIZE];
- char type[BASE_BOARD_TYPE_SIZE];
- s_base_board_features features;
+ char manufacturer[BASE_BOARD_MANUFACTURER_SIZE];
+ char product_name[BASE_BOARD_PRODUCT_NAME_SIZE];
+ char version[BASE_BOARD_VERSION_SIZE];
+ char serial[BASE_BOARD_SERIAL_SIZE];
+ char asset_tag[BASE_BOARD_ASSET_TAG_SIZE];
+ char location[BASE_BOARD_LOCATION_SIZE];
+ char type[BASE_BOARD_TYPE_SIZE];
+ s_base_board_features features;
/* The filled field have to be set to true when the dmitable implement that item */
- bool filled;
- struct {
- char type[16];
- uint8_t status;
- char description[10];
- } devices_information[10];
+ bool filled;
+ struct {
+ char type[16];
+ uint8_t status;
+ char description[10];
+ } devices_information[10];
} s_base_board;
#endif
diff --git a/com32/gplinclude/dmi/dmi_cache.h b/com32/gplinclude/dmi/dmi_cache.h
index 50f93afd..cfd7114e 100644
--- a/com32/gplinclude/dmi/dmi_cache.h
+++ b/com32/gplinclude/dmi/dmi_cache.h
@@ -23,24 +23,24 @@
#include "stdbool.h"
typedef struct {
- char socket_designation[32];
- char configuration[32];
- char mode[32];
- char location[8];
- uint16_t installed_size;
- uint16_t max_size;
- char supported_sram_types[32];
- char installed_sram_types[32];
- uint16_t speed;
- char error_correction_type[32];
- char system_type[16];
- char associativity[32];
-} __attribute__((__packed__)) s_cache;
+ char socket_designation[32];
+ char configuration[32];
+ char mode[32];
+ char location[8];
+ uint16_t installed_size;
+ uint16_t max_size;
+ char supported_sram_types[32];
+ char installed_sram_types[32];
+ uint16_t speed;
+ char error_correction_type[32];
+ char system_type[16];
+ char associativity[32];
+} __attribute__ ((__packed__)) s_cache;
const char *dmi_cache_mode(uint8_t code);
const char *dmi_cache_location(uint8_t code);
uint16_t dmi_cache_size(uint16_t code);
-void dmi_cache_types(uint16_t code, const char *sep, char* array);
+void dmi_cache_types(uint16_t code, const char *sep, char *array);
const char *dmi_cache_ec_type(uint8_t code);
const char *dmi_cache_type(uint8_t code);
const char *dmi_cache_associativity(uint8_t code);
diff --git a/com32/gplinclude/dmi/dmi_memory.h b/com32/gplinclude/dmi/dmi_memory.h
index e97c5eb7..47ad7fcd 100644
--- a/com32/gplinclude/dmi/dmi_memory.h
+++ b/com32/gplinclude/dmi/dmi_memory.h
@@ -50,14 +50,14 @@ typedef struct {
} s_memory;
typedef struct {
-char socket_designation[8];
-char bank_connections[8];
-char speed[8];
-char type[48];
-char installed_size[48];
-char enabled_size[48];
-char error_status[8];
-bool filled;
+ char socket_designation[8];
+ char bank_connections[8];
+ char speed[8];
+ char type[48];
+ char installed_size[48];
+ char enabled_size[48];
+ char error_status[8];
+ bool filled;
} s_memory_module;
void dmi_memory_array_error_handle(uint16_t code, char *array);
@@ -69,9 +69,9 @@ const char *dmi_memory_device_type(uint8_t code);
void dmi_memory_device_type_detail(uint16_t code, char *type_detail);
void dmi_memory_device_speed(uint16_t code, char *speed);
-void dmi_memory_module_connections(uint8_t, char*);
-void dmi_memory_module_speed(uint8_t, char*);
-void dmi_memory_module_types(uint16_t, const char*, char*);
-void dmi_memory_module_size(uint8_t, char*);
-void dmi_memory_module_error(uint8_t, const char*, char*);
+void dmi_memory_module_connections(uint8_t, char *);
+void dmi_memory_module_speed(uint8_t, char *);
+void dmi_memory_module_types(uint16_t, const char *, char *);
+void dmi_memory_module_size(uint8_t, char *);
+void dmi_memory_module_error(uint8_t, const char *, char *);
#endif
diff --git a/com32/gplinclude/dmi/dmi_system.h b/com32/gplinclude/dmi/dmi_system.h
index 28a562de..6bb053ff 100644
--- a/com32/gplinclude/dmi/dmi_system.h
+++ b/com32/gplinclude/dmi/dmi_system.h
@@ -35,10 +35,10 @@ typedef struct {
char sku_number[SYSTEM_SKU_NUMBER_SIZE];
char family[SYSTEM_FAMILY_SIZE];
/* The filled field have to be set to true when the dmitable implement that item */
-bool filled;
-char system_boot_status[SYSTEM_BOOT_STATUS_SIZE];
-char configuration_options[SYSTEM_CONFIGURATION_OPTIONS_SIZE];
-struct {
+ bool filled;
+ char system_boot_status[SYSTEM_BOOT_STATUS_SIZE];
+ char configuration_options[SYSTEM_CONFIGURATION_OPTIONS_SIZE];
+ struct {
bool filled;
uint8_t status;
uint8_t watchdog;
@@ -48,6 +48,6 @@ struct {
char reset_limit[8];
char timer_interval[8];
char timeout[8];
-} system_reset;
+ } system_reset;
} s_system;
#endif
diff --git a/com32/gplinclude/memory.h b/com32/gplinclude/memory.h
index 1fee1782..fe33c18d 100644
--- a/com32/gplinclude/memory.h
+++ b/com32/gplinclude/memory.h
@@ -25,28 +25,29 @@
#define E820MAX 128
#define E820_RAM 1
#define E820_RESERVED 2
-#define E820_ACPI 3 /* usable as RAM once ACPI tables have been read */
+#define E820_ACPI 3 /* usable as RAM once ACPI tables have been read */
#define E820_NVS 4
#define RES_START 0xa0000
#define RES_END 0x100000
struct e820entry {
- uint64_t addr; /* start of memory segment */
- uint64_t size; /* size of memory segment */
- uint64_t type; /* type of memory segment */
-} __attribute__((packed));
+ uint64_t addr; /* start of memory segment */
+ uint64_t size; /* size of memory segment */
+ uint64_t type; /* type of memory segment */
+} __attribute__ ((packed));
-const char * const e820_types[5];
+const char *const e820_types[5];
-void get_type(int, char*, int);
+void get_type(int, char *, int);
void detect_memory_e820(struct e820entry *desc, int size_map, int *size_found);
-int detect_memory_e801(int*, int*);
-int detect_memory_88(int*);
+int detect_memory_e801(int *, int *);
+int detect_memory_88(int *);
/* The following stuff could be merge once the addr_t will be set to 64bits.
* syslinux_scan_memory can be used for that purpose */
unsigned long memsize_e820(struct e820entry *e820, int e820_nr);
-int sanitize_e820_map(struct e820entry *orig_map, struct e820entry *new_bios, short old_nr);
+int sanitize_e820_map(struct e820entry *orig_map, struct e820entry *new_bios,
+ short old_nr);
unsigned long detect_memsize(void);
#endif