aboutsummaryrefslogtreecommitdiffstats
path: root/com32/gpllib
Commit message (Collapse)AuthorAgeFilesLines
* gpllib: fix sizeof(char *) misuseJonathan Boeing2015-05-031-10/+14
| | | | | | | | | | | | The code was passing sizeof(char *) - not the length of the buffer - to strlcpy and snprintf. Change the function to take the length of the buffer as a parameter. Fixes the warning: argument to 'sizeof' in 'snprintf' call is the same expression as the destination; did you mean to provide an explicit length? Signed-off-by: Jonathan Boeing <jonathan.n.boeing@gmail.com>
* build: sort sources to build in a more deterministic wayPhilippe Coval2015-01-051-1/+1
| | | | | | | | | | | | | | | | | It has been observed that binaries contents are depending on the order of linked objects. This order is caused by GNU make's wildcard function and the position of sources on filesystem. This change tries to prevent this kind of randomness. Also consider building using -j1 flag to make it even more reproductible. Change-Id: Ie8eee7f336e6f1fa2863c4150d967afd15519f1d Bug: http://bugzilla.syslinux.org/show_bug.cgi?id=57#related Signed-off-by: Philippe Coval <philippe.coval at open.eurogiciel.org>
* com32: change '%llx' to use PRIx64Martin Str|mberg2015-01-051-1/+1
| | | | | | | | | | | | Get rid of printf format warning format ‘%llx’ expects type ‘long long unsigned int’, but argument 2 has type ‘uint64_t’ Use <inttypes.h> PRIx64 instead of llx to get rid of gcc warning format ‘%llx’ expects type ‘long long unsigned int’, but argument 2 has type ‘uint64_t’ Author: Martin Str|mberg <ams@ludd.ltu.se> Signed-off-by: Gene Cumm <gene.cumm@gmail.com>
* acpi: Removing memset of bufferErwan Velu2014-01-291-1/+0
| | | | | | | | | | | | | | | There is no need to memset the buffer since the strncat will end the string with a \0. The memset was also almost wrong as doing a sizeof() on a char * could return 1 if buff was malloc'ed. We had chance as all the current calls are done with static buffers. Removing this memset call will make things clearer but also will prevent compilation warnings like : com32/gpllib/acpi/acpi.c:38:29: warning: argument to ‘sizeof’ in ‘memset’ call is the same expression as the destination; did you mean to provide an explicit length? [-Wsizeof-pointer-memaccess] memset(buffer, 0, sizeof(buffer));
* Merge tag 'syslinux-5.01' into firmwaresyslinux-6.00-pre4Matt Fleming2013-01-291-4/+4
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: Makefile NEWS com32/cmenu/Makefile com32/elflink/ldlinux/Makefile com32/gfxboot/Makefile com32/gpllib/Makefile com32/include/sys/module.h com32/lib/Makefile com32/lib/sys/module/elf_module.c com32/menu/Makefile com32/rosh/Makefile com32/samples/Makefile core/init.c mk/elf.mk Signed-off-by: Matt Fleming <matt.fleming@intel.com>
| * Rename libcom32gpl.c32 to libgpl.c32H. Peter Anvin2013-01-171-3/+3
| | | | | | | | | | | | Conform to 8.3 filenames for essential files. Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
| * Always strip all the modulesH. Peter Anvin2013-01-171-2/+2
| | | | | | | | | | | | | | | | Always strip the modules; they are too big unstripped. Specifically, we generate unstripped *.elf files, and then convert them to stripped *.c32 files. Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
* | Merge branch 'elflink' into firmwareMatt Fleming2013-01-081-1/+1
|\| | | | | | | | | | | | | | | | | | | | | Merge the changes since Syslinux-5.00. The main reason behind this merge is to pull in the following bug fix, commit 90b5864fc793 ("core/kaboom.c: Export __bad_SEG()"), which allows us to turn on debugging in mk/devel.mk without ldlinux.c32 failing to load. Conflicts: com32/elflink/ldlinux/Makefile version
| * elflink: set the sonames of shared librariesH. Peter Anvin2013-01-031-1/+1
| | | | | | | | | | Set the sonames of shared libraries to the filename, so we don't end up with full pathnames embedded in the files.
* | Merge tag 'syslinux-5.00' into firmwaresyslinux-6.00-pre3Matt Fleming2012-12-071-1/+1
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: Makefile com32/elflink/ldlinux/Makefile com32/lib/sys/module/elf_module.c core/cleanup.c core/comboot.inc core/conio.c core/fs/fs.c core/init.c core/mem/free.c core/mem/malloc.c core/timer.inc diag/geodsp/Makefile extlinux/main.c mk/embedded.mk modules/Makefile Signed-off-by: Matt Fleming <matt.fleming@intel.com>
| * gpllib: Distribute libcom32gpl.c32 in releasesMatt Fleming2012-11-271-1/+1
| | | | | | | | | | | | | | | | | | | | This is a partial revert of commit b26d1c8642a8 ("Clean up $(GPLLIB) leak"). While we do need to use $(C_LIBS) and respect $(NOGPL), we should also be distributing libcom32gpl.c32. Now that we have ELF modules, such as hdt.c32, that need to have some of their symbols dynamically resolved at runtime we need to distribute libcom32gpl.c32. Signed-off-by: Matt Fleming <matt.fleming@intel.com>
* | Add per-firmware object directory supportMatt Fleming2012-10-161-7/+9
|/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Now that we have multiple firmware backends it no longer makes sense to write object files to the same directory as their source. A better solution is to write the object files to a per-firmware directory under a top-level object directory. The top-level object directory can be specified on the command-line with the O= variable, e.g. make O=/tmp/obj. If no top-level object directory is specified an 'obj' directory is created in the top-level of the Syslinux source repository. All the existing make targets continue to work as before, however now they apply to all firmware backends, e.g. 'make installer' will build the BIOS, 32-bit EFI and 64-bit EFI installers and place them under $(OBJ)/bios, $(OBJ)/efi32 and $(OBJ)/efi64 respectively. Note unlike every other bit of Syslinux, the gpxe objects are still kept in the src directory, e.g. gpxe/src, since gpxe is only required by the BIOS backend. It is possible to specify a make target for a specific firmware or list of firmware with the following syntax, make [firmware[,firmware]] [target[,target]] To clean the object directory for just the BIOS firmware type, 'make bios clean' To build both the 32-bit and 64-bit EFI installers type, 'make efi32 efi64 installer' Since the Syslinux make infrastructure is now more complex a new file doc/building.txt has been created to explain how to build Syslinux. The top-level Makefile now exports some make variables for use in module Makefiles, - topdir - the top-level source directory of the Syslinux repository, e.g. /usr/src/syslinux - objdir - the top-level object directory for the firmware backend currently being built, e.g. /obj/syslinux/bios - SRC - the source directory in the Syslinux repository for the module currently being built, e.g. /usr/src/syslinux/com32/libupload - OBJ - the object directory for the module currently being built, e.g. /obj/syslinux/bios/com32/libupload Since we're rewriting the Makefile infrastructure anyway it seemed like a good idea to add parallel support. By writing subdirectories as prequisites for make targets the objects in those subdirectories can be built in parallel. Signed-off-by: Matt Fleming <matt.fleming@intel.com>
* Delete all references to __com32.cs_bounceMatt Fleming2012-06-084-19/+58
| | | | | | | | | The COM32 cs_bounce buffer is not usable with ELF modules, as we're trying to move to an environment where memory is dynamically allocated. All users of __com32.cs_bounce have been converted to using lmalloc() to allocate low memory. Signed-off-by: Matt Fleming <matt.fleming@intel.com>
* Merge remote-tracking branch 'zytor/master' into merge/elflink/masterMatt Fleming2012-05-311-66/+113
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | A lot of development has gone on in the 'master' branch since the last time we merged; new features, bug fixes, etc, etc. Conflicts: Makefile com32/Makefile com32/lib/Makefile com32/lib/syslinux/load_linux.c com32/modules/Makefile com32/modules/chain.c core/bootsect.inc core/init.inc version
| * gpllib/disk: Massive updates of fs labelsErwan Velu2011-12-221-66/+113
| | | | | | | | | | Inspired by Gerth and updated from both fdisk list & also from http://www.win.tue.nl/~aeb/partitions/partition_types-1.html
* | elflink: Make ELF the default object formatMatt Fleming2011-04-261-8/+6
|/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | com32/elflink/modules was originally created to house ELF modules and keep them separate from the COM32 modules as the elflink branch was being developed. However, this has inadvertently created a maintenance nightmare because code was copied from elsewhere in the tree into com32/elflink/modules, resulting in duplication. Bug fixes have been going into the original code but have not been merged onto the elflink branch, leaving the duplicate code in com32/elflink/modules buggy. So let's delete this directory. There really is no reason to keep ELF and COM32 modules separate because there's no reason to need both COM32 and ELF modules to coexist. ELF is a far superior object file format and all modules are not emitted as ELF objects. Now that we're outputting ELF modules we can use dynamic memory instead of the cs_bounce bounce buffer. This commit requires a certain amount of shuffling for some files. quicksort.c isn't a module and belongs as part of the util library. cli.h belongs in com32/include so that other modules can make use of the cli code in ldlinux.c32. All libraries are now ELF shared libraries which are only loaded to fixup unresolved symbols for executable modules and renamed from *.a to *.c32. This reduces the runtime memory footprint because libraries are only loaded when needed and because every executable no longer gets its own copy of code/data (as it would if linking with a static library). Also, remove MINLIBOBJS from libcom32.c32 because it is already part of libcom32min.a and we don't want to have any duplicate symbols between the core (which links with libcom32min.a) and libcom32.c32. Welcome to the New World Order of ELF modules! Signed-off-by: Matt Fleming <matt.fleming@linux.intel.com>
* Merge remote-tracking branch 'mfleming/for-hpa/makefile-cleanup'H. Peter Anvin2011-04-261-1/+2
|\ | | | | | | | | | | | | | | Resolved Conflicts: com32/hdt/Makefile com32/sysdump/Makefile Signed-off-by: H. Peter Anvin <hpa@zytor.com>
| * Makefile: Move Makefile fragments into mk/Matt Fleming2011-04-071-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Move the MCONFIG files into a mk/ directory and give them more descriptive names. This is purely a cosmetic change to make the 'include' directives a bit more coherent by making it obvious exactly which MCONFIG file we're including. For example, in com32/lua/src/Makefile we exchange the line, include ../../MCONFIG for the much more comprehensible, include $(MAKEDIR)/com32.mk Signed-off-by: Matt Fleming <matt.fleming@linux.intel.com>
* | cpuid: Using generic model if cyrix id is unknownErwan Velu2011-04-161-3/+6
| | | | | | | | | | | | | | When using the specific Cyrix call to determine the model, if the model is unknown, let's consider the generic call was right. This insure a better display of the model id.
* | cpuid: Improving Cyrix/NSC detectionErwan Velu2011-04-161-0/+126
| | | | | | | | | | This code add the specific detection code for Cyrix/NSC processor. Code came from the Linux kernel.
* | cpuid: Managing UNKNOWN CPU betterErwan Velu2011-04-141-1/+7
| | | | | | | | | | It's safe to manage the unknown cpu as a regular one. This will avoid weird behavior when CPU isn't well detected.
* | cpuid: add cpuid info for "Geode by NSC"Jim Cromie2011-04-131-0/+6
| | | | | | | | | | | | Without this, cpu_detect(), and set_generic_info() would take 416 seconds on a soekris 4801 and hdt would report ?????????? as the processor vendor.
* | acpi: moving flags_to_string to base codeErwan Velu2011-04-041-0/+19
| | | | | | | | This code is useful for many program, let's make it generic.
* | zzjson: Avoid printing empty line after each printErwan Velu2011-03-231-1/+1
| | | | | | | | This is useless and generates confusing outputs
* | cpuid: Simplied structure initErwan Velu2011-03-211-7/+1
| | | | | | | | Let's zeroify everything and then init what is different from 0;
* | cpuid: Fixing names & init.Erwan Velu2011-03-211-4/+4
| | | | | | | | The init code was nearly incorrect. Fixed regarding Shao's comments.
* | cpuid: Enable cpu flags members parsingErwan Velu2011-03-211-0/+23
| | | | | | | | | | | | | | | | This patch allow a program to parse the list of the cpu flags and retrieve its values, name & comments. I'd like to thank Shao Miller for helping me doing this code. He was really helpful and a good support. Thx Shao !
* | cpuid: Init flags structuresErwan Velu2011-03-211-0/+1
| | | | | | | | Let's zeroify it at init time.
* | zzjson: Use PRINT() instead of PUTC()Erwan Velu2011-03-201-1/+2
| | | | | | | | | | PUTC() call didn't got caught when using the bufprintf. We can use the PRINT() macro instead.
* | zzjson: Fixing compilation errorsErwan Velu2011-03-181-3/+3
| | | | | | | | Just a simple recasting.
* | zzjson: No need to keep the test caseErwan Velu2011-03-181-137/+0
| | | | | | | | This is useless.
* | zzjson: Adding zzjson 1.1.0Erwan Velu2011-03-187-2/+1070
|/
* ACPI: Adding BOOT supportErwan Velu2011-01-311-3/+8
|
* ACPI: Adding SLIC supportErwan Velu2011-01-311-0/+8
|
* ACPI: Adding MCFG supportErwan Velu2011-01-311-0/+7
|
* ACPI: Adding TCPA supportErwan Velu2011-01-311-0/+8
|
* ACPI: Adding HPET supportErwan Velu2011-01-311-0/+8
|
* ACPI: Improving tables detectionErwan Velu2011-01-314-130/+162
| | | | | | | | | | In some conditions, XSDT pointer could be null. In such conditions, we have to parse tables pointed by RSDP. This patch remove the table parsing from xsdt to acpi.c. If the XSDT detection fails, let's switch back to the RSDP entries. This was the case under KVM whereas VirtualBox features an XSDT.
* DMI: Adjusting structures size / Adding cpu coreLaurent Licour2011-01-304-22/+70
| | | | | This patch adds some correction of the dmi structures but also add the support of the cpu cores/threads.
* Merge remote branch 'origin/master' into chouffeErwan Velu2011-01-261-6/+24
|\
| * disklib: Detect DiskCryptor MBRGert Hulselmans2011-01-251-0/+2
| | | | | | | | | | | | Add detection code for DiskCryptor MBR to disklib. Signed-off-by: Gert Hulselmans <gerth@zytor.com>
| * disklib: Detect "FreeDOS (eXtended FDisk)" MBRGert Hulselmans2011-01-251-1/+3
| | | | | | | | | | | | Add detection code for "FreeDOS (eXtended FDisk)" MBR to disklib. Signed-off-by: Gert Hulselmans <gerth@zytor.com>
| * disklib: Detect "MS-DOS 3.30 through Windows 95 (A)" MBRGert Hulselmans2011-01-251-1/+3
| | | | | | | | | | | | Add detection code for "MS-DOS 3.30 through Windows 95 (A)" MBR to disklib. Signed-off-by: Gert Hulselmans <gerth@zytor.com>
| * disklib: Detect new Syslinux (normal + isohybrid) MBRGert Hulselmans2011-01-251-4/+13
| | | | | | | | | | | | | | Add detection code for new Syslinux (normal + isohybrid) MBR to disklib. Switch old Syslinux MBR and Master Boot LoaDeR detection code. Signed-off-by: Gert Hulselmans <gerth@zytor.com>
| * disklib: Detect Paragon MBRGert Hulselmans2011-01-251-0/+3
| | | | | | | | | | | | Add detection code for Paragon MBR to disklib. Signed-off-by: Gert Hulselmans <gerth@zytor.com>
* | ACPI: Fixing copyrightErwan Velu2011-01-2610-10/+10
| |
* | ACPI: Displaying MADT as APICErwan Velu2011-01-261-1/+1
| | | | | | | | Kernel shows this table as APIC, let's do the same
* | ACPI: Fixing pointer arithmeticErwan Velu2011-01-268-29/+50
| | | | | | | | Several adjustements were necessary ;o)
* | ACPI: Adding DEBUG_PRINTErwan Velu2011-01-253-0/+19
| | | | | | | | Adding a function to debug & print for ACPI.
* | ACPI: Fixing SSDT detectionErwan Velu2011-01-251-1/+1
| | | | | | | | This test error was crashing the program.