summaryrefslogtreecommitdiff
path: root/com32
Commit message (Collapse)AuthorAgeFilesLines
* chain.c32: error out on missing boot sector signatureH. Peter Anvin2008-07-301-0/+7
| | | | | | | | If we're booting a disk or partition, then error out if the loaded sector doesn't have a boot sector signature, rather than the otherwise-inevitable crash. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* vesamenu: avoid strcmp() with NULLH. Peter Anvin2008-07-221-1/+1
| | | | | Avoid touching memory at address zero when going from a background to a non-background.
* pci: resize pci_device arrayssyslinux-3.71-pre15Sebastian Herbszt2008-07-191-5/+5
| | | | | | | | | | | pci_bus->pci_device get's populated with functions so it should take up to MAX_PCI_DEVICES * MAX_PCI_FUNC elements. pci_device_list->pci_device get's populated with functions for every possible pci bus. Therefore it should take up to MAX_PCI_BUS * MAX_PCI_DEVICES * MAX_PCI_FUNC elements. Also adjust count variable types. - Sebastian
* ethersel: use library functionsSebastian Herbszt2008-07-191-26/+4
| | | | | | | Replace get_config() and execute() with syslinux_config_file() and syslinux_run_command(). - Sebastian
* <sys/cpu.h>: asm() formatting cleanupH. Peter Anvin2008-07-161-1/+2
| | | | | | Minor asm() formatting cleanup. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* <sys/cpu.h>: drop redundant "return"H. Peter Anvin2008-07-161-1/+1
| | | | | | Drop "return" for function returning void. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* com32: move cpuid inlines to <sys/cpu.h>H. Peter Anvin2008-07-162-73/+41
| | | | | | | | <sys/cpu.h> already has most of the CPUID inlines, put them all there. <cpuid.h> still have structures for the code that really should be librarized at some point. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* ifcpu64.c32: clean up the sourcessyslinux-3.71-pre14H. Peter Anvin2008-07-161-23/+18
| | | | | | Clean up the sources to make them easier to read. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* cpuid.h: add __constfuncH. Peter Anvin2008-07-161-5/+6
| | | | | | Add __constfunc to CPUID calls, so gcc knows it can CSE them. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* cpufeature.h: remove unused macrossyslinux-3.71-pre13H. Peter Anvin2008-07-161-29/+0
| | | | | | | Remove a bunch of unused macros (from Linux) which we don't need or use. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* ifcpu64.c32: simple module to choose a 32, 32pae, or 64-bit kernelH. Peter Anvin2008-07-162-1/+127
| | | | | | | A very simple module to choose between a 32-bit, 32-bit PAE, or a 64-bit kernel depending on the capabilities of the CPU. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* cpuid.[ch]: various cleanupsH. Peter Anvin2008-07-162-120/+128
| | | | | | Minor cleanups to the CPUID code Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* chain.c32: fix test for partition types which can be hiddensyslinux-3.71-pre11Sergey Vlasov2008-07-161-1/+1
| | | | | | | | | | | The result of shift in C is undefined if the shift count is greater than the width of type. On x86 the corresponding CPU instruction masks the shift count with 0x1f, therefore (mask >> (t & ~0x10)) & 1) gives false positives for types greater than 0x1f (e.g., the partition type 0x8e (Linux LVM) could be "hidden" to 0x9e). Signed-off-by: Sergey Vlasov <vsu@altlinux.ru> Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* chain.c32: fix bounce buffer handlingSergey Vlasov2008-07-161-4/+7
| | | | | | | | | | | | | | | Fix breakage in the "hide" option support patch: - The code which initialized the global variable "dapa" was lost in commit 81c203f2, therefore EBIOS access did not work properly. Fixed by removing the global variable completely and moving all bounce buffer handling into read_sector() and write_sector(). - write_sector() copied data to the bounce buffer, but then tried to use the pointer to the original buffer in BIOS calls. Signed-off-by: Sergey Vlasov <vsu@altlinux.ru> Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* chain.c32: explicitly verify after writing MBRsyslinux-3.71-pre7H. Peter Anvin2008-07-111-4/+20
| | | | | If we write the MBR, do verify by reading it back and comparing. Right now all we do is print an error, though.
* chain.c32: new "hide" optionH. Peter Anvin2008-07-111-9/+104
| | | | Option for chain.c32 to hide primary partitions on the boot drive.
* pcitest: display "1 bus found" instead of "1 buses found"Sebastian Herbszt2008-07-071-1/+1
| | | | | | Fix the text for pci_bus_list->count == 1 ("1 bus found"). - Sebastian
* Allow the initrd to be specified on a separate linesyslinux-3.71-pre4H. Peter Anvin2008-07-031-0/+14
| | | | | Allow the initrd to be specified on a separate line from command-line options (append). This apparently can help certain tools.
* Simple menu: really avoid disabled entriessyslinux-3.71-pre2H. Peter Anvin2008-07-021-22/+30
| | | | Really, really try to avoid stepping on disabled entries...
* chain.c32: allow "boot" as a drive specificationH. Peter Anvin2008-06-301-13/+32
| | | | | Allow "boot" as the drive specification; this can be used both with partition numbers and with loaders.
* mboot.c32: no need to include the ANSI enginesyslinux-3.70-pre24H. Peter Anvin2008-06-241-2/+3
| | | | We don't need the ANSI engine in mboot.c32.
* Default to \n -> \r\n in ANSI and xserialH. Peter Anvin2008-06-244-5/+8
| | | | | | | | | | | 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.
* chain.c32: use a more Linux-kernel-like syntaxH. Peter Anvin2008-06-201-22/+27
| | | | | Make the syntax for chain.c32 more Linux-kernel-like. This also makes parsing easier, so it's a win all around.
* chain.c: avoid comma-space in assembly stubsH. Peter Anvin2008-06-191-14/+14
| | | | | Comma-space takes up too much horizontal space, since we want to be able to comment properly.
* chain.c32: check the stub sources into the treeH. Peter Anvin2008-06-192-0/+44
| | | | | | Check the stub sources into the tree, even though they aren't used by the build; they are still useful when experimenting with changing this stuff.
* Add address aliases for freedos and msdosH. Peter Anvin2008-06-191-0/+6
|
* chain.c32: minor stylistic cleanupH. Peter Anvin2008-06-191-2/+1
|
* chain.c: we can't rely on dosmem and int13 in here...H. Peter Anvin2008-06-191-86/+119
| | | | | | | | dosmem and int13 can change during boot loader shutdown. It is therefore unsafe to rely on them retaining their value from running in chain.c32 itself. Instead, we have to install a suitable stub which makes that particular determination at runtime. Fortunately that is not all that hard to do.
* chain.c32: support loading DOS kernelsH. Peter Anvin2008-06-181-14/+88
| | | | | | | | | | | | Support loading files below 0x7c00, as required, for example, by DOS kernels. Furthermore, pass the drive number in BL as well as DL. With this, we can load the FreeDOS kernel with: chain.c32 hd0 -seg 0x60 -file /kernel.sys Should really clean up the syntax before 3.70 final, though, and provide a way to default to the syslinux device.
* <syslinux/bootrm.h>: fix order of SS and DSH. Peter Anvin2008-06-181-2/+2
| | | | | SS is segment 2, DS is segment 3; this header had them backwards. Fortunately not too many things relied on having DS != SS.
* chain.c32: finalize the NTLDR interfacesyslinux-3.70-pre18H. Peter Anvin2008-06-151-47/+78
| | | | Settle on a final implementation of the NTLDR support.
* 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-132-8/+9
| | | | | | | | | | | | | | | | | | | | | | | 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
* chain.c32: don't swap drives when already primarysyslinux-3.70-pre17H. Peter Anvin2008-06-121-3/+3
| | | | | Don't install the swap stub when we are already the primary drive, even if -swap is specified.
* chain.c32: support swapping BIOS drive numbersH. Peter Anvin2008-06-121-22/+83
| | | | Support installing a stub to swap BIOS drive numbers.
* chain: use shuffle API; support loading a boot fileH. Peter Anvin2008-06-121-27/+100
| | | | | Use the shuffle API, and support loading a boot file instead of the standard boot sector. This should be able to load NTLDR.
* 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-296-16/+10
| | | | | | | 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-296-6/+6
| | | | | | | | 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-286-7/+7
|\ | | | | | | | | | | | | Conflicts: NEWS version
| * Fixed the various Makefiles so that SYSLINUX compiles on platforms with GCC ↵Stefan Bucur2008-05-125-5/+5
| | | | | | | | -fstack-protector flag enabled by default.
| * chain.c32: fix booting from logical partitionsSergey Vlasov2008-04-241-1/+1
| | | | | | | | | | | | | | | | Booting from a logical partition failed with the "Requested logical partition not found" error due to a wrong test for partition signature in find_logical_partition(). Signed-off-by: Sergey Vlasov <vsu@altlinux.ru>
| * 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-104-191/+436
|\ \ | |/ | | | | | | | | | | 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.
| * sdi.c32: be a tad more verbose.H. Peter Anvin2008-04-081-1/+5
| | | | | | | | Print minimal message while loading.
| * 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.
| * COM32 module to load a Microsoft System Deployment ImageH. Peter Anvin2008-03-312-1/+163
| | | | | | | | COM32 module to load a Microsoft System Deployment Image (SDI) file.