aboutsummaryrefslogtreecommitdiffstats
path: root/com32/gplinclude
Commit message (Collapse)AuthorAgeFilesLines
* com32: add a centralized bitops headerH. Peter Anvin2010-11-141-5/+1
| | | | | | | | | Add a centralized bitops header <sys/bitops.h> which uses x86 bitops instructions. This is necessary to keep gcc 4.5 from aborting compilation due to the inlined code being larger than the non-inlined version, and well, we should really use the bitops. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* DMI: Fixing memory mgmnt in dmi_memory_module_typesLaurent Licour2010-07-071-4/+4
| | | | | In some case, dmi_memory_module_types could read the entire memory as a result of a bogus snprintf usage.
* Merge remote branch 'erwan/master'H. Peter Anvin2010-05-111-1/+1
|\
| * VPD: Fixing base_addressErwan Velu2010-05-111-1/+1
| | | | | | | | This commit now save properly VPD's address.
* | Merge remote branch 'erwan/master'H. Peter Anvin2010-05-112-2/+1
|\|
| * DMI: Increasing processor buffer sizeErwan Velu2010-05-061-1/+1
| | | | | | | | | | | | Impact: avoid string truncation The version field could be bigger than 32 char.
| * DMI: removing useless variableErwan Velu2010-05-061-1/+0
| | | | | | | | | | | | Impact: none Removing useless variable
* | disk/bootloaders.c: fix bogus const in get_bootloader_string()H. Peter Anvin2010-01-101-1/+1
|/ | | | | | | get_bootloader_string() takes a mutable first argument; the call chain does have call paths on which this argument will be modified. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* dmi: Switching processor voltage from V to mVErwan Velu2009-12-041-1/+1
| | | | | | Impact: Changing units Processor voltage is now millivolts
* cpuid: Adding L1 & L2 cache detectionErwan Velu2009-12-041-1/+6
| | | | | | Impact: Adding L1 & L2 cache detection Adding L1 & L2 cache detection
* cpuid: Adding cpu core detectionErwan Velu2009-12-041-1/+2
| | | | | | Impact: we are now able to detect the number of cpu cores We can detect the number of cores using cpuid(4) or cpuid_ecx(0x80000008)
* cpuid: Adding more flagsErwan Velu2009-12-041-0/+51
| | | | | | | Impact: sync with linux kernel cpu flags are now in sync with the linux kernel. Too many flags were missing.
* 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