aboutsummaryrefslogtreecommitdiffstats
path: root/com32/lib
Commit message (Collapse)AuthorAgeFilesLines
* syslinux_derivative_info(): use the buffer we already haveH. Peter Anvin2009-02-181-4/+3
| | | | Use the data buffer already set aside for syslinux_derivative_info().
* Constructed data objects can't be common; hack derivative_infoH. Peter Anvin2009-02-181-7/+5
| | | | | | | | | - Constructed data objects can't be common. Earlier version of gcc didn't if the objects were explicitly listed extern, but newer ones need an explicit __attribute__((nocommon)) or -fno-common. - Make syslinux_derivative_info() save the entire reply.
* getcwd.c: need <string.h>H. Peter Anvin2009-02-181-0/+1
| | | | getcwd.c needs <string.h>
* COM32 API: Add functions for directory useGene Cumm2009-02-107-0/+181
| | | | | | | | | COM32: Add directory functions getcwd(), opendir(), readdir() and closedir(). This depends on the patch that I just submitted creating the COMBOOT API calls. Signed-off-by: Gene Cumm <gene.cumm@gmail.com> Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* Add comboot interface to access the keyboard remapping tableH. Peter Anvin2009-02-032-0/+45
| | | | | | Add a comboot interface to access the keyboard remapping table, which can be used for either querying or changing the keyboard map.
* com32: make _Exit just an ordinary symbolH. Peter Anvin2008-10-141-0/+7
| | | | | | | | Make _Exit just an ordinary symbol which aliases _exit. This avoids some versions of gcc complaining about the inline, which is rather unnecessary anyway. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* Older binutils wants parens around macrosDag Wieers2008-10-141-1/+1
| | | | | | | Older versions of gcc/binutils apparently really want parentheses around macro arguments. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* e820: pre-initialize bufferH. Peter Anvin2008-10-131-0/+2
| | | | | | | | Pre-initialize the e820 buffer to all zero, except for the active bit; we have found that BIOSes will make assumptions about the pre-existing value of the buffer and this seems the most conservative value. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* com32/lib: fix reversed test when looking for extattr in e820H. Peter Anvin2008-10-131-1/+1
| | | | | | | Fix reversed test when looking for extattr in e820: force the extattr values only when they are *not* present... Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* Support "extended attributes" for INT 15h, AX=E820hH. Peter Anvin2008-10-131-1/+8
| | | | | | | | | | | | | | | Some blithering idiot thought it was a good idea to introduce "extended attributes" for INT 15h, AX=E820h, and in doing so, breaking compatibility with ALL E820 users out there. F*cking morons. Implement handling of extended attributes in: - e820 parsing in the core - e820 parsing in libcom32 - e820 parsing *and proxying* in memdisk The latter is the really painful one. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* Remove line-leading gas-style comments in files compiled with -std=gnu99H. Peter Anvin2008-09-263-45/+47
| | | | | | | | Some versions of gcc barf if we have hash-style comments in files when -std=gnu99 is used. Remove from assembly files that are subject to being assembled that way. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* setjmp.S: use C-style commentsH. Peter Anvin2008-09-261-15/+15
| | | | | | | Earlier versions of cpp would get confused by the gas-style comments at line starts; replace them with C-style comments. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* Fix "make clean" confusionsyslinux-3.72H. Peter Anvin2008-09-251-4/+2
| | | | | | | | "make clean" must NOT remove stuff that "make installer" should not rebuild. This is a somewhat unfortunate choice of naming, but that's the way it is. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* com32/lib: fix "make clean" by proper parens for "find"H. Peter Anvin2008-09-251-1/+1
| | | | | | "-o" clauses bind looser than -print0, so we need parens. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* ansicon, vesacon: beep on ^GH. Peter Anvin2008-09-094-0/+16
| | | | | | If we get a ^G, issue a beep. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* Major Makefile cleanups; gcc 4.3.0 compatiblityH. Peter Anvin2008-08-201-2/+2
| | | | | Cleanup and centralize the Makefile system even more. Fix a gcc 4.3 incompatibility in memdisk (definition of strlen).
* pci: fix pci_scan()Sebastian Herbszt2008-08-121-2/+4
| | | | Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* pci: cosmetic fixesSebastian Herbszt2008-08-121-34/+34
| | | | Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* pci: revamp the PCI system to have a hierarchial formatH. Peter Anvin2008-08-121-179/+183
| | | | | | | | Create the concept of a PCI domain, as a hierarcy of busses, devices and functions. This avoids large static-sized arrays and allows for geographical addressing of devices. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* com32: compile with -std=gnu99H. Peter Anvin2008-08-121-1/+3
| | | | | | | Compile with -std=gnu99, this allows us to define initializers inside for() loops, which makes certain kinds of ugly macros easier to write. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* Fix lrand48() and rand()H. Peter Anvin2008-08-111-1/+1
| | | | | | | | | lrand48() and rand() had improper parenthesization, which caused it to return negative values. Spotted by Stefan Bucur :) Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* com32/lib: add zalloc()H. Peter Anvin2008-08-013-9/+19
| | | | | | Add the nonstandard, but often useful, zalloc() function. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* pci: store device addressH. Peter Anvin2008-08-011-3/+7
| | | | | | | When scanning PCI devices, store the device address for reference. Based on a patch by Sebastian Herbszt. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* Default to \n -> \r\n in ANSI and xserialH. Peter Anvin2008-06-243-3/+6
| | | | | | | | | | | Default to \n -> \r\n conversion in the ANSI and xserial modules, rather than relying on escape codes to make that behave. This effectively means that as far as the serial port is concerned, this behavior cannot be turned off (with less than having the xserial state machine interpret this sequence) and the escape code *should not* be used. That is fine for our applications, though.
* loadfile: make sure we don't trash errnoH. Peter Anvin2008-06-151-1/+6
| | | | Make sure we don't trash a useful value in errno.
* pci: fix off-by-one error and introduce MAX_PCI_FUNCSebastian Herbszt2008-06-131-7/+7
| | | | | | | | | | | | | | | | | | | | | | | In include/sys/pci.h we have #define MAX_PCI_BUSES 255 and struct pci_bus_list { struct pci_bus pci_bus[MAX_PCI_BUSES]; uint8_t count; }; And in lib/pci/scan.c for (bus = 0; bus <= MAX_PCI_BUSES; bus++) { pci_bus_list->pci_bus[bus].pci_device_count = 0; Fix possible overflows and introduce MAX_PCI_FUNC. - Sebastian
* Aligning memcpy/memmove/mempcpy/memset for libcom32H. Peter Anvin2008-06-065-80/+308
| | | | Aligning versions of memcpy/memmove/mempcpy/memset for libcom32.
* Centralize configurables; better "make install" etcH. Peter Anvin2008-05-292-12/+4
| | | | | | | Begin the process of centralizing configurables. Improve "make install" and "make netinstall"; add "make extbootinstall".
* Move files out of root into core, dos, and utilsH. Peter Anvin2008-05-291-1/+1
| | | | | | | | Move source files out of the root directory; the root is a mess and has become virtually unmaintainable. The Syslinux core now lives in core/; the Linux and generic utilities has moved into utils/, and copybs.com has moved into dos/; it had to go somewhere, and it seemed as good a place as any.
* Merge commit 'origin/master' into gpxe-addedH. Peter Anvin2008-05-281-2/+2
|\ | | | | | | | | | | | | Conflicts: NEWS version
| * Fixed the various Makefiles so that SYSLINUX compiles on platforms with GCC ↵Stefan Bucur2008-05-121-1/+1
| | | | | | | | -fstack-protector flag enabled by default.
| * syslinux 3.63: Use $(CC) for examining compiler optionsMaciej W. Rozycki2008-04-171-1/+1
| | | | | | | | | | Following changes to other Makefiles use $(CC) for examining compiler options here as well.
* | Merge commit 'syslinux-3.63' into gpxe-addedsyslinux-3.70-pre9H. Peter Anvin2008-04-102-190/+269
|\| | | | | | | | | | | | | Conflicts: NEWS com32/modules/Makefile
| * movebits: rewrite significant chunks of the algorithmsyslinux-3.63-pre5H. Peter Anvin2008-04-091-166/+246
| | | | | | | | | | | | | | | | | | Rewrite the algorithm to prefer entries which can be directly moved into their target slots; this should reduce the number of descriptors in most cases (although not necessarily *all* cases.) Try to clean up the code some while we're at it... the code is confusing enough as it is.
| * zonelist.c: Fix the coalescing of identical rangesH. Peter Anvin2008-04-091-7/+6
| | | | | | | | | | The old code could fail to coalesce backwards in the case where a range is totally obliterated. For now, just scan the whole list.
| * movebits: use the memmap data structure for the freelistH. Peter Anvin2008-04-081-152/+80
| | | | | | | | | | | | Use the syslinux_memmap data structure for the free memory list. This means we get range coalescing; this sometimes generates lists that are vastly shorter than without range coalescing.
| * movebits: handle the case of an upward overlap move with obstaclesH. Peter Anvin2008-04-081-115/+187
| | | | | | | | | | Handle the case of an upward move when there is something in the way. This happens when loading an SDI image.
* | Add stpcpy() and implement version/derivative queriesH. Peter Anvin2008-03-284-2/+119
| | | | | | | | | | Add stpcpy(), and actually implement syslinux_version() and syslinux_derivative_info().
* | Merge commit 'syslinux-3.63-pre2' into nolensyslinux-3.70-pre5H. Peter Anvin2008-03-201-22/+20
|\|
| * PCI detection code doesn't corrupt memory anymore (2nd try)Erwan2008-03-201-22/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | From : Erwan Velu <erwan.velu@free.fr> This patch fixes the pci detection stuff demo'd in pcitest.c32 - Fix a wrong type in malloc - Incorrect use of strdup - Replacing strncpy by strnlcpy (thx hpa) This two fixes makes pcitest.c32 working far better, no more crash when running it twice. I'd like to thank Sebastian Herbszt for its reports and tests. This patch was made for 3.62-pre16 but applies fine on 3.63-pre1. Signed-off-by:Erwan Velu <erwan.velu@free.fr> -------------------------------------------------------------------------------- Les opinions et prises de position emises par le signataire du present message lui sont propres et ne sauraient engager la responsabilite de la societe SEANODES. Ce message ainsi que les eventuelles pieces jointes constituent une correspondance privee et confidentielle a l'attention exclusive du destinataire designe ci-dessus. Si vous n'etes pas le destinataire du present message ou une personne susceptible de pouvoir le lui delivrer, il vous est signifie que toute divulgation, distribution ou copie de cette transmission est strictement interdite. Si vous avez recu ce message par erreur, nous vous remercions d'en informer l'expediteur par telephone ou de lui retourner le present message, puis d'effacer immediatement ce message de votre systeme. The views and opinions expressed by the author of this message are personal. SEANODES shall assume no liability, express or implied for such message. This e-mail and any attachments is a confidential correspondence intended only for use of the individual or entity named above. If you are not the intended recipient or the agent responsible for delivering the message to the intended recipient, you are hereby notified that any disclosure, distribution or copying of this communication is strictly prohibited. If you have received this communication in error, please notify the sender by phone or by replying this message, and then delete this message from your system.
* | Merge commit 'origin/master' into nolensyslinux-3.70-pre4H. Peter Anvin2008-03-031-1/+2
|\| | | | | | | | | | | Conflicts: version
| * Prevent inclusion of system include files when inappropriateH. Peter Anvin2008-03-031-1/+2
| | | | | | | | | | Use "-nostdinc -iwithprefix include" to prevent the inclusion of system header files, but still permitting *compiler* header files.
* | VESA: Simplify the lss16 decoderH. Peter Anvin2008-03-031-11/+6
| | | | | | | | Simplify the lss16 decoder slightly.
* | Drop unnecessary CLD instructions.H. Peter Anvin2008-03-035-20/+6
| | | | | | | | | | | | The EFI ABI spec states that DF=0 on ABI boundaries, and gcc expects this. Assume it is safe to rely upon everywhere; drop unnecessary cld instructions, except on entry and (obviously) after std.
* | VESA library: add support for reading lss16 imagesH. Peter Anvin2008-03-031-1/+130
| | | | | | | | Add support for reading lss16 images, for compatibility with the CLI.
* | Generic framework for reading compressed files using standard I/OH. Peter Anvin2008-02-298-95/+441
| | | | | | | | | | | | | | | | | | | | Add zopen(), zfopen(), and zloadfile() to transparently open and uncompress a gzip file (adding support for other formats is quite trivial. Once a file handle or file pointer is received, it can be treated like any other one (fstat will report it as a socket, since the length is unknown.)
* | Un-inline fclose()H. Peter Anvin2008-02-272-1/+12
| | | | | | | | | | gcc complains that fclose() is too big to be inlined with -Os, so humour it and move fclose() out of line.
* | background.c: remove unused filesize() functionH. Peter Anvin2008-02-271-9/+0
| | | | | | | | Remove obsolete and now unused filesize() function.
* | realloc(): put an absolute upper limit on slackH. Peter Anvin2008-02-271-1/+2
| | | | | | | | | | | | With loadfile() doing megabyte-sized trial-and-error allocations, we want to be able to do really set the size on the final allocation; thus constrain the amount of permitted slack to 4K max.
* | Comboot/Com32 changes for unspecified file lengthsH. Peter Anvin2008-02-273-35/+72
| | | | | | | | | | Handle unspecified file length for comboot/com32 modules; do changes to the appropriate part of libcom32 to handle this properly.