aboutsummaryrefslogtreecommitdiffstats
path: root/com32/gpllib
Commit message (Collapse)AuthorAgeFilesLines
* dmi: fix a strcpy (typo)Pierre-Alexandre Meyer2009-11-011-1/+1
| | | | | | Not sure why sprintf is being called here. It's probably strcpy that was meant. Signed-off-by: Pierre-Alexandre Meyer <pierre@mouraf.org>
* dmi: Adding smbios detectionErwan Velu2009-10-301-33/+54
| | | | | | | | 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
* hdt: Fixing {s}printf typoErwan Velu2009-10-301-5/+5
| | | | | | | Impact: Avoid some unwanted printf Some dmi calls were using printf instead of sprintf. This solves ticket #11
* disklib: Adding new grub2 mbr magicErwan Velu2009-10-281-0/+1
| | | | | | Impact: Detecting newer release of Grub2 Newer releases of grub2 have a eb63 signature
* disklib: Fixing Syslinux DetectionErwan Velu2009-10-281-2/+2
| | | | | | Impact: Syslinux is now detected as bootloader A test wasn't correct and prevented the Syslinux mbr detection
* 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-4/+3
| | | | | | | | | | | | | | | | 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/+128
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | 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/+46
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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 bootloader detection to MBR detectionPierre-Alexandre Meyer2009-08-261-12/+12
| | | | | | | | | | | | | | | | | | | | | 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-9/+23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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 commentPierre-Alexandre Meyer2009-08-231-1/+1
| | | | | | | | | | | | | | | | | | buffer_ptr has been renamed to s. Signed-off-by: Pierre-Alexandre Meyer <pierre@mouraf.org>
| * | gpllib: bootloader id should be uint16_tPierre-Alexandre Meyer2009-08-231-2/+2
| | | | | | | | | | | | | | | | | | 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/+68
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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 missing header in ata.cPierre-Alexandre Meyer2009-09-031-0/+1
| | | | | | | | | | | | | | | | | | This fixes an implicit definition warning. Signed-off-by: Pierre-Alexandre Meyer <pierre@mouraf.org>
* | | gpllib: fix commentPierre-Alexandre Meyer2009-08-231-1/+1
|/ / | | | | | | | | | | buffer_ptr has been renamed to s. Signed-off-by: Pierre-Alexandre Meyer <pierre@mouraf.org>
* / hdt: make get_error behaves like perrorPierre-Alexandre Meyer2009-08-221-4/+3
|/ | | | | | | | This simplifies buffer handling. Misc.: clean some old error code handling. Signed-off-by: Pierre-Alexandre Meyer <pierre@mouraf.org>
* disklib: fix extended partition codePierre-Alexandre Meyer2009-08-201-12/+21
| | | | | | | | | | | gert1 reported some issues using disklib with HDT. As it turned out, the code that iterated through ebrs in an extended partition was broken: ebr offsets need to be relative to the start of that partition. Misc.: fix memory leak. Signed-off-by: Pierre-Alexandre Meyer <pierre@mouraf.org> Signed-off-by: Erwan Velu <erwan.velu@free.fr>
* Merge commit 'pam/disklib-fixes'Erwan Velu2009-08-1919-1578/+1931
|\
| * gpllib: Introduce typedefs for callbacksPierre-Alexandre Meyer2009-08-051-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
| * gpllib: More errno fixesPierre-Alexandre Meyer2009-08-052-11/+7
| | | | | | | | | | | | | | | | * 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>
| * gpllib: Enhance MakefilePierre-Alexandre Meyer2009-08-051-6/+2
| | | | | | | | | | | | | | Leverage Make built-ins rather than listing manually all objects files to compile. Signed-off-by: Pierre-Alexandre Meyer <pierre@mouraf.org>
| * gpllib: Fix compilationPierre-Alexandre Meyer2009-08-051-0/+2
| | | | | | | | | | | | ata.c was missing the inttypes.h header. Signed-off-by: Pierre-Alexandre Meyer <pierre@mouraf.org>
| * disklib: Change read/write interfacePierre-Alexandre Meyer2009-08-055-199/+109
| | | | | | | | | | | | | | 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>
| * disklib: Fix write_verify_sectorsPierre-Alexandre Meyer2009-08-051-1/+1
| | | | | | | | | | | | Compare the entire chunk (all sectors), not only the first one. Signed-off-by: Pierre-Alexandre Meyer <pierre@mouraf.org>
| * Merge commit 'hpa/master' into for-erwanPierre-Alexandre Meyer2009-08-0410-1313/+1304
| |\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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/gpllib/vpd/vpd.cH. Peter Anvin2009-05-291-56/+56
| | | | | | | | | | | | | | | | | | | | | | | | | | | Automatically reformat com32/gpllib/vpd/vpd.c 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/gpllib/dmi/dmi_processor.cH. Peter Anvin2009-05-291-376/+374
| | | | | | | | | | | | | | | | | | | | | | | | | | | Automatically reformat com32/gpllib/dmi/dmi_processor.c 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/gpllib/dmi/dmi_memory.cH. Peter Anvin2009-05-291-106/+105
| | | | | | | | | | | | | | | | | | | | | | | | | | | Automatically reformat com32/gpllib/dmi/dmi_memory.c 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/gpllib/dmi/dmi_ipmi.cH. Peter Anvin2009-05-291-20/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | Automatically reformat com32/gpllib/dmi/dmi_ipmi.c 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/gpllib/dmi/dmi_chassis.cH. Peter Anvin2009-05-291-59/+59
| | | | | | | | | | | | | | | | | | | | | | | | | | | Automatically reformat com32/gpllib/dmi/dmi_chassis.c 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/gpllib/dmi/dmi_bios.cH. Peter Anvin2009-05-291-42/+42
| | | | | | | | | | | | | | | | | | | | | | | | | | | Automatically reformat com32/gpllib/dmi/dmi_bios.c 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/gpllib/dmi/dmi_battery.cH. Peter Anvin2009-05-291-27/+27
| | | | | | | | | | | | | | | | | | | | | | | | | | | Automatically reformat com32/gpllib/dmi/dmi_battery.c 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/gpllib/dmi/dmi_base_board.cH. Peter Anvin2009-05-291-6/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | Automatically reformat com32/gpllib/dmi/dmi_base_board.c 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/gpllib/dmi/dmi.cH. Peter Anvin2009-05-291-527/+546
| | | | | | | | | | | | | | | | | | | | | | | | | | | Automatically reformat com32/gpllib/dmi/dmi.c 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/gpllib/cpuid.cH. Peter Anvin2009-05-291-223/+225
| | | | | | | | | | | | | | | | | | | | | | | | | | | Automatically reformat com32/gpllib/cpuid.c 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-236-6/+0
| | |\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-206-6/+0
| | | | | | | | | | | | | | | | Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
| | | * Add back "install: all" to the com32 devel directoriessyslinux-3.74-pre19H. Peter Anvin2009-04-061-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | "make install" in the com32 directory currently installs the devel environment, which should be build using the host toolchain... so make it so.
| | | * Makefiles: try to make "make install" do the right thingH. Peter Anvin2009-04-061-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | One more attempt at getting semi-sanity to "make install". Realistically, the install/netinstall/install-all/... needs to be pushed into the com32 Makefiles, but this is at least a quick hack. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
| * | | gpllib: refactor partitions detectionPierre-Alexandre Meyer2009-08-041-59/+48
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Re-implement the logic to parse extended partitions to correctly go through the linked list of partitions. Updated the CLI in hdt and tested it both on Qemu (Debian Lenny installation) and on DELL E6400 (6 partitions). The output seemed sane. 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/+32
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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: Add support for 3.3.12 OEM Strings (Type 11) (dmi)Pierre-Alexandre Meyer2009-05-271-0/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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/+45
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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/+51
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-1/+106
| |\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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/+105
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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: Prevent overflow in memory type (dmi)Pierre-Alexandre Meyer2009-05-141-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We can store up to MAX_DMI_MEMORY_ITEMS memory modules information. Make sure we don't overflow. (Impact: bug fix) Signed-off-by: Pierre-Alexandre Meyer <pierre@mouraf.org>