aboutsummaryrefslogtreecommitdiffstats
path: root/com32/gplinclude
Commit message (Collapse)AuthorAgeFilesLines
...
* gpllibs: Running NindentErwan Velu2009-11-2417-297/+298
| | | | | | Impact: visual Running Nindent on gpllib / gplinclude
* memory: Commenting workaroundroot2009-11-231-0/+3
| | | | | | | | Impact: none HDT is using a memory detection code which duplicates some syslinux code. Once addr_t will be moved into 64bit, this can be removed by using syslinux_scan_memory().
* memory: Adding memory size detectionErwan Velu2009-11-231-0/+12
| | | | | | | | | | | | | | | Impact: allow com32 module to detect the amount of memory installed This commit adds several function: sanitize_e820_map() to generate a new e820 map that doesn't have overlaping memsize_e820() to detect the available memory (in KB) detect_memsize() to detect the amount of memory by using e820/e801/e88. It first try to detect the memory via e820. If it fails, it uses e801 as fallback. If this e801 fails, e88 is used.
* dmi: fix DMI type 6 outputPierre-Alexandre Meyer2009-11-121-3/+3
| | | | | | | | | Ralf Carl reports some garbage in the DMI type 6 output. It appears that some output formatting wasn't quite right. This should close #22. Signed-off-by: Pierre-Alexandre Meyer <pierre@mouraf.org>
* dmi: Adding smbios detectionErwan Velu2009-10-301-1/+2
| | | | | | | | Impact: Avoid misdetection of dmi version On some hosts, the legacy DMI version is reported as 0.0. We can use SMBIOS to get the real version. Solves HDT's ticket #8
* Merge commit 'erwan/master' into hdt-0.3.5Pierre-Alexandre Meyer2009-10-271-0/+2
|\
| * Adding VMX & SVM cpu flagsErwan Velu2009-09-291-0/+2
| | | | | | | | | | | | Impact: Hardware virtualization is now detected Minor update to detect vmx & svm cpu flags
| * hdt: make get_error behaves like perrorPierre-Alexandre Meyer2009-08-241-3/+0
| | | | | | | | | | | | | | | | This simplifies buffer handling. Misc.: clean some old error code handling. Signed-off-by: Pierre-Alexandre Meyer <pierre@mouraf.org>
* | Merge branch 'bootloader-detection' into hdt-nextPierre-Alexandre Meyer2009-09-072-0/+36
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: com32/hdt/hdt-cli-disk.c com32/hdt/hdt-common.h com32/hdt/hdt-menu-disk.c Signed-off-by: Pierre-Alexandre Meyer <pierre@mouraf.org>
| * | gpllib: add bootloader detectionPierre-Alexandre Meyer2009-08-261-0/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Given an (active) partition, look for a bootloader ID. Syslinux prints a string (SYSLINUX or EXTLINUX) between bytes 3 and 10. After some random tests, it seems that Windows™98/98SE and Windows™ME put MSWIN4.1 at the same place. Internet seems to confirm it: http://www.geocities.com/thestarman3/asm/mbr/MSWin41BRinHexEd.htm Signed-off-by: Pierre-Alexandre Meyer <pierre@mouraf.org>
| * | gpllib: rename __BOOTLOADERS_H_ to __MBRS_H_ in mbrs.hPierre-Alexandre Meyer2009-08-261-3/+3
| | | | | | | | | | | | | | | | | | We had forgotten to update the #define when renaming the file. Signed-off-by: Pierre-Alexandre Meyer <pierre@mouraf.org>
| * | gpllib: rename bootloader detection to MBR detectionPierre-Alexandre Meyer2009-08-261-2/+2
| | | | | | | | | | | | | | | | | | | | | bootloaders.c really inspects the MBR, not the bootloader itself. Let's not confuse the two of them. Signed-off-by: Pierre-Alexandre Meyer <pierre@mouraf.org>
| * | gpllib: use four bytes to discover the MBRPierre-Alexandre Meyer2009-08-261-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Syslinux and Master Boot LoaDeR share the first 2 bytes. Use one more to distinguish between the two of them. To keep standards types, uint16_t is being replaced by uint32_t. The extra byte is not used yet. Signed-off-by: Pierre-Alexandre Meyer <pierre@mouraf.org>
| * | gpllib: fix compilation warning (disk/bootloaders.h)Pierre-Alexandre Meyer2009-08-231-0/+1
| | | | | | | | | | | | | | | | | | struct driveinfo is defined in disk/geom.h. Signed-off-by: Pierre-Alexandre Meyer <pierre@mouraf.org>
| * | gpllib: bootloader id should be uint16_tPierre-Alexandre Meyer2009-08-231-2/+5
| | | | | | | | | | | | | | | | | | The id is of the form 0xABCD: use uint16_t instead of int. Signed-off-by: Pierre-Alexandre Meyer <pierre@mouraf.org>
| * | gpllib: add bootloader detectionPierre-Alexandre Meyer2009-08-231-0/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The first two bytes of the hard drive can help identifying the boot code installed in the MBR. Values from the boot_info_script: http://sourceforge.net/projects/bootinfoscript/ Signed-off-by: Pierre-Alexandre Meyer <pierre@mouraf.org>
* | | gpllib: add const qualifier in cpu_dev (cpuid)Pierre-Alexandre Meyer2009-09-031-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | The Syslinux build turns on -Wwrite-strings, which gives string constants the type const char[length]. Note: -Wall doesn't trigger this warning. Signed-off-by: Pierre-Alexandre Meyer <pierre@mouraf.org>
* | | gpllib: remove get_error declaration from disk/util.hPierre-Alexandre Meyer2009-09-012-3/+2
| | | | | | | | | | | | | | | | | | | | | In d1890409251949b80c2026557b9b12ca00d55144, it seems we have forgotten to update util.h. Signed-off-by: Pierre-Alexandre Meyer <pierre@mouraf.org>
* | | gpllib: fix cpuid.h Once-Only Header wrapperPierre-Alexandre Meyer2009-09-011-1/+1
| | | | | | | | | | | | | | | | | | It seems that the cpuid.h had a misplaced #endif. Signed-off-by: Pierre-Alexandre Meyer <pierre@mouraf.org>
* | | gpllib: share PAGE_SIZE definition with cpuid.hPierre-Alexandre Meyer2009-09-011-3/+3
|/ / | | | | | | | | | | | | | | | | | | | | | | | | swsusp detection needs PAGE_SIZE. cpuid.h is actually already defining it. Since both swsusp and cpuid are taken from the Linux kernel, it is a good idea to share it (they really need to be equal). We are going to rely on cpuid.h. Creating a page.h for this single definition seems overkilling and the MMU is part of the CPU on x86 anyways. Impact: fix compiler warning (redefinition). Signed-off-by: Pierre-Alexandre Meyer <pierre@mouraf.org>
* / hdt: make get_error behaves like perrorPierre-Alexandre Meyer2009-08-221-3/+0
|/ | | | | | | | This simplifies buffer handling. Misc.: clean some old error code handling. Signed-off-by: Pierre-Alexandre Meyer <pierre@mouraf.org>
* gpllib: Introduce typedefs for callbacksPierre-Alexandre Meyer2009-08-051-1/+3
| | | | | | | | | | | | | | | typedefs are evil but useful for function pointers as it makes them more readable and maintainable. This fixes a bug by the way: we had void *callback(struct driveinfo *, struct part_entry *, int, int) where we should have had void (*callback)(struct driveinfo *, struct part_entry *, int, int) Signed-off-by: Pierre-Alexandre Meyer <pierre@mouraf.org>
* hdt: Make the menu and cli use the new disk interfacesPierre-Alexandre Meyer2009-08-051-1/+1
| | | | | | | | | The disklib interfaces have changed (errno_disk introduced). Update these changes in hdt (nobody else use them). Misc: fix get_error declaration. Signed-off-by: Pierre-Alexandre Meyer <pierre@mouraf.org>
* gpllib: More errno fixesPierre-Alexandre Meyer2009-08-053-34/+38
| | | | | | | | * Fix header files due to previous commit * Prefix disk errnos with ED to avoid conflicts with classic errno * Fix swsusp code to use errno_disk Signed-off-by: Pierre-Alexandre Meyer <pierre@mouraf.org>
* disklib: Change read/write interfacePierre-Alexandre Meyer2009-08-053-7/+55
| | | | | | | Get rid of the error pointer and use a errno-like error reporting mechanism. Intent is to make these more like the standard read/write system calls. Signed-off-by: Pierre-Alexandre Meyer <pierre@mouraf.org>
* Merge commit 'hpa/master' into for-erwanPierre-Alexandre Meyer2009-08-0411-351/+347
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: com32/cmenu/libmenu/com32io.h com32/gplinclude/dmi/dmi.h com32/gplinclude/dmi/dmi_base_board.h com32/gplinclude/dmi/dmi_memory.h com32/gplinclude/dmi/dmi_system.h com32/gpllib/dmi/dmi.c com32/gpllib/dmi/dmi_memory.c com32/include/sys/pci.h com32/lib/pci/scan.c com32/modules/Makefile Signed-off-by: Pierre-Alexandre Meyer <pierre@mouraf.org>
| * Run Nindent on com32/gplinclude/vpd/vpd.hH. Peter Anvin2009-05-291-11/+11
| | | | | | | | | | | | | | | | | | Automatically reformat com32/gplinclude/vpd/vpd.h using Nindent. Do this for all files except HDT, gPXE and externally maintained libraries (zlib, tinyjpeg, libpng). Signed-off-by: H. Peter Anvin <hpa@zytor.com>
| * Run Nindent on com32/gplinclude/dmi/dmi_system.hH. Peter Anvin2009-05-291-9/+9
| | | | | | | | | | | | | | | | | | Automatically reformat com32/gplinclude/dmi/dmi_system.h using Nindent. Do this for all files except HDT, gPXE and externally maintained libraries (zlib, tinyjpeg, libpng). Signed-off-by: H. Peter Anvin <hpa@zytor.com>
| * Run Nindent on com32/gplinclude/dmi/dmi_processor.hH. Peter Anvin2009-05-291-61/+62
| | | | | | | | | | | | | | | | | | Automatically reformat com32/gplinclude/dmi/dmi_processor.h using Nindent. Do this for all files except HDT, gPXE and externally maintained libraries (zlib, tinyjpeg, libpng). Signed-off-by: H. Peter Anvin <hpa@zytor.com>
| * Run Nindent on com32/gplinclude/dmi/dmi_memory.hH. Peter Anvin2009-05-291-18/+18
| | | | | | | | | | | | | | | | | | Automatically reformat com32/gplinclude/dmi/dmi_memory.h using Nindent. Do this for all files except HDT, gPXE and externally maintained libraries (zlib, tinyjpeg, libpng). Signed-off-by: H. Peter Anvin <hpa@zytor.com>
| * Run Nindent on com32/gplinclude/dmi/dmi_ipmi.hH. Peter Anvin2009-05-291-9/+9
| | | | | | | | | | | | | | | | | | Automatically reformat com32/gplinclude/dmi/dmi_ipmi.h using Nindent. Do this for all files except HDT, gPXE and externally maintained libraries (zlib, tinyjpeg, libpng). Signed-off-by: H. Peter Anvin <hpa@zytor.com>
| * Run Nindent on com32/gplinclude/dmi/dmi_chassis.hH. Peter Anvin2009-05-291-14/+14
| | | | | | | | | | | | | | | | | | Automatically reformat com32/gplinclude/dmi/dmi_chassis.h using Nindent. Do this for all files except HDT, gPXE and externally maintained libraries (zlib, tinyjpeg, libpng). Signed-off-by: H. Peter Anvin <hpa@zytor.com>
| * Run Nindent on com32/gplinclude/dmi/dmi_bios.hH. Peter Anvin2009-05-291-56/+56
| | | | | | | | | | | | | | | | | | Automatically reformat com32/gplinclude/dmi/dmi_bios.h using Nindent. Do this for all files except HDT, gPXE and externally maintained libraries (zlib, tinyjpeg, libpng). Signed-off-by: H. Peter Anvin <hpa@zytor.com>
| * Run Nindent on com32/gplinclude/dmi/dmi_battery.hH. Peter Anvin2009-05-291-16/+16
| | | | | | | | | | | | | | | | | | Automatically reformat com32/gplinclude/dmi/dmi_battery.h using Nindent. Do this for all files except HDT, gPXE and externally maintained libraries (zlib, tinyjpeg, libpng). Signed-off-by: H. Peter Anvin <hpa@zytor.com>
| * Run Nindent on com32/gplinclude/dmi/dmi_base_board.hH. Peter Anvin2009-05-291-15/+15
| | | | | | | | | | | | | | | | | | Automatically reformat com32/gplinclude/dmi/dmi_base_board.h using Nindent. Do this for all files except HDT, gPXE and externally maintained libraries (zlib, tinyjpeg, libpng). Signed-off-by: H. Peter Anvin <hpa@zytor.com>
| * Run Nindent on com32/gplinclude/dmi/dmi.hH. Peter Anvin2009-05-291-34/+31
| | | | | | | | | | | | | | | | | | Automatically reformat com32/gplinclude/dmi/dmi.h using Nindent. Do this for all files except HDT, gPXE and externally maintained libraries (zlib, tinyjpeg, libpng). Signed-off-by: H. Peter Anvin <hpa@zytor.com>
| * Run Nindent on com32/gplinclude/cpuid.hH. Peter Anvin2009-05-291-113/+111
| | | | | | | | | | | | | | | | | | Automatically reformat com32/gplinclude/cpuid.h using Nindent. Do this for all files except HDT, gPXE and externally maintained libraries (zlib, tinyjpeg, libpng). Signed-off-by: H. Peter Anvin <hpa@zytor.com>
| * Merge branch 'master' of git://git.kernel.org/pub/scm/boot/syslinux/syslinux ↵Erwan Velu2009-04-231-1/+1
| |\ | | | | | | | | | | | | | | | | | | | | | | | | | | | into mainline Conflicts: com32/hdt/hdt-cli-pci.c com32/hdt/hdt-cli-vesa.c com32/hdt/hdt-common.c com32/hdt/hdt-menu-dmi.c
| | * Global whitespace cleanup.H. Peter Anvin2009-04-201-1/+1
| | | | | | | | | | | | Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
* | | gpllib: Define HARDWARE_SECURITY_SIZE for Type 24 (dmi)Pierre-Alexandre Meyer2009-05-271-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | Impact: fix build HARDWARE_SECURITY_SIZE is used by DMI Type 24. Signed-off-by: Pierre-Alexandre Meyer <pierre@mouraf.org>
* | | gpllib: Add support for 3.3.25 Hardware Security (Type 24) (dmi)Pierre-Alexandre Meyer2009-05-271-0/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | From SMBIOS spec (v2.6.1): This structure describes the system-wide hardware security settings. Note: This structure type was added for specification v2.2. Signed-off-by: Pierre-Alexandre Meyer <pierre@mouraf.org>
* | | gpllib: Enlarge OEM Strings buffer (dmi)Pierre-Alexandre Meyer2009-05-271-2/+1
| | | | | | | | | | | | | | | | | | | | | After some testing on a X200, it appears that the OEM Strings can be quite long (~200 chars on the X200). Let's be quite generous on that one. Signed-off-by: Pierre-Alexandre Meyer <pierre@mouraf.org>
* | | gpllib: Add support for 3.3.12 OEM Strings (Type 11) (dmi)Pierre-Alexandre Meyer2009-05-271-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | From SMBIOS spec (v2.6.1): This structure contains free form strings defined by the OEM. Examples of this are: Part Numbers for Reference Documents for the system, contact information for the manufacturer, etc. Signed-off-by: Pierre-Alexandre Meyer <pierre@mouraf.org>
* | | gpllib: Add support for 3.3.11 On Board Devices Information (Type 10, ↵Pierre-Alexandre Meyer2009-05-261-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | obsolete) (dmi) From SMBIOS spec (v2.6.1): The information in this structure defines the attributes of devices that are onboard (soldered onto) a system element, usually the baseboard. In general, an entry in this table implies that the BIOS has some level of control over the enabling of the associated device for use by the system. Signed-off-by: Pierre-Alexandre Meyer <pierre@mouraf.org>
* | | gpllib: Add support for 3.3.24 System Reset (Type 23) (dmi)Pierre-Alexandre Meyer2009-05-261-0/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | From SMBIOS spec (v2.6.1): This structure describes whether Automatic System Reset functions enabled (Status). If the system has a watchdog Timer and the timer is not reset (Timer Reset) before the Interval elapses, an automatic system reset will occur. The system will re-boot according to the Boot Option. This function may repeat until the Limit is reached, at which time the system will re-boot according to the Boot Option at Limit. Note: This structure type was added for specification v2.2. Signed-off-by: Pierre-Alexandre Meyer <pierre@mouraf.org>
* | | gpllib: Add support for 3.3.13 System Configuration Options (Type 12) (dmi)Pierre-Alexandre Meyer2009-05-261-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | From SMBIOS spec (v.2.6.1): This structure contains information required to configure the base board’s Jumpers and Switches. Signed-off-by: Pierre-Alexandre Meyer <pierre@mouraf.org>
* | | Merge branch 'for-erwan' of git://git.zytor.com/users/pam/hdt-pierre into ↵Pierre-Alexandre Meyer2009-05-142-0/+18
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | for-erwan Conflicts: com32/gplinclude/dmi/dmi.h com32/gpllib/dmi/dmi.c com32/hdt/hdt-cli-dmi.c Signed-off-by: Pierre-Alexandre Meyer <pierre@mouraf.org>
| * | | gpllib: Add Memory Module Information (Type 6, Obsolete) (DMI)Pierre-Alexandre Meyer2009-05-082-0/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The SMBIOS specification defines: 3.3.7 Memory Module Information (Type 6, Obsolete) From the spec (v2.6.1): One Memory Module Information structure is included for each memory-module socket in the system. The structure describes the speed, type, size, and error status of each system memory module. The supported attributes of each module are described by the “owning” Memory Controller Information structure. Note: This structure, and its companion Memory Controller Information (Type 5, Obsolete), are obsolete starting with version 2.1 of this specification; the Physical Memory Array (Type 16) and Memory Device (Type 17) structures should be used instead. BIOS providers might choose to implement both memory description types to allow existing DMI browsers to properly display the system’s memory attributes. This patch adds decoding support for this type. Adapted from the dmidecode project. Signed-off-by: Pierre-Alexandre Meyer <pierre@mouraf.org>
* | | | gpllib: Add support for 3.3.33 System Boot Information (Type 32) (dmi)Pierre-Alexandre Meyer2009-05-141-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | From SMBIOS spec (v2.6.1): 3.3.33 System Boot Information (Type 32): The client system firmware, e.g. BIOS, communicates the System Boot Status to the client’s Pre-boot Execution Environment (PXE) boot image or OS-present management application via this structure. When used in the PXE environment, for example, this code identifies the reason the PXE was initiated and can be used by boot-image software to further automate an enterprise’s PXE sessions. For example, an enterprise could choose to automatically download a hardware-diagnostic image to a client whose reason code indicated either a firmware- or operating system-detected hardware failure. Signed-off-by: Pierre-Alexandre Meyer <pierre@mouraf.org>
* | | | gpllib: Add support for Cache Information (Type 7) (dmi)Pierre-Alexandre Meyer2009-05-142-0/+51
|/ / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | From the SMBIOS spec (v2.6.1): 3.3.8 Cache Information (Type 7): The information in this structure defines the attributes of CPU cache device in the system. One structure is specified for each such device, whether the device is internal to or external to the CPU module. Cache modules can be associated with a processor structure in one or two ways depending on the SMBIOS version, see 3.3.5 Processor Information (Type 4) on page 25 and 3.3.15 Group Associations (Type 14) on page 46 for more information. Implementation mostly borrowed from the dmidecode project. Signed-off-by: Pierre-Alexandre Meyer <pierre@mouraf.org>