summaryrefslogtreecommitdiff
path: root/core
Commit message (Collapse)AuthorAgeFilesLines
* diskboot: correct the patching of the floppy tablesyslinux-4.04-pre7H. Peter Anvin2011-02-061-1/+1
| | | | | | | | | The floppy table patching was somehow messed up when converting to GPT. The proper offset of FloppyTable at the point we patch is [di-12] and we use offset +4 inside that field. Reported-by: Juergen <jlborries@online.de> Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* disk: put a magic at the end of the boot sectorH. Peter Anvin2011-01-253-7/+13
| | | | | | | | | Put a magic signature at the end of the boot sector, and a backpointer to the code that contains the pointer to the main code extent. This is useful for integrity-checking tools, and could help the installer in the future. Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
* diskstart: move writestr_early out of boot sectorH. Peter Anvin2011-01-252-19/+26
| | | | | | | We can save 8 bytes in the boot sector by moving writestr_early out and putting the real routine in sector 1. Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
* diskio: Support EDD 4 16-byte device pathsH. Peter Anvin2011-01-171-2/+2
| | | | | | | | EDD 4 has 16-byte device path information. Make the EDD buffer big enough to capture that. Note that the location of the device path checksum actually depends on the device path length information field! Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
* diskio: add reminder that we need clear in the futureH. Peter Anvin2011-01-171-0/+3
| | | | | | | | | Currently, disk_init() can only be called once, and edd_params get statically initialized to zero. This will change once this function can be called more than once, and we depend on the pre-initialization to zero to avoid known BIOS bugs. Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
* core/diskboot.inc: fix bug; Sect1Ptr1_VALGene Cumm2010-12-211-1/+1
|
* core/diskstart.inc: Remove code copied to diskboot.incGene Cumm2010-12-201-421/+1
|
* core/diskboot.inc: The boot sector code from diskstart.incGene Cumm2010-12-201-0/+444
| | | | Split to allow it to be used by debugging/diagnostic images
* core/diskstart.inc: Sect1Ptr values moved to constantsGene Cumm2010-12-201-2/+5
| | | | | This allows another program to re-use the boot sector and define different values, once split.
* core/diskstart.inc: Use xint13 when it saves space or protectsGene Cumm2010-12-201-5/+4
| | | | Additional note on where it will cost to possibly not protect anything
* core/diskstart.inc: Wrap INT13h in xint13 to preserve ESGene Cumm2010-12-201-1/+3
| | | | | | Sometimes INT13h AH08h kills ES to return info about a "floppy" (since an unpartitioned HDD might look like a floppy). Also, change to tabs on previous line.
* core: Add workaround in the Makefile for GNU Make 3.82 bugH. Peter Anvin2010-12-161-1/+3
| | | | | | | Apparently GNU Make 3.82 mishandles pattern rules with fixed dependencies, sigh. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* core: remove HAS_LOCALBOOTSebastian Herbszt2010-12-166-20/+0
| | | | | | | HAS_LOCALBOOT is set unconditionally in config.inc. Signed-off-by: Sebastian Herbszt <herbszt@gmx.de> Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* core, diskstart: add more sanity checks for handover infoH. Peter Anvin2010-12-141-1/+4
| | | | | | | | | | In particular, somehow we failed to actually test for DS:SI = 0:0! This tests both for SI < 16 and DS:SI < 1024. The former of those tests is a bit iffy and probably should be removed. This should also be promoted into isohdpfx. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* syslinux.ld: ld 2.20.51 seems to want .bss16 explicitly (NOLOAD)H. Peter Anvin2010-12-141-2/+2
| | | | | | | ld 2.20.51 seems to want the .bss16 explicitly marked (NOLOAD). We do that for most of the other bss sections, so we might as well. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* core, pxe: Fix handling of unqualified DNS namesH. Peter Anvin2010-11-141-1/+1
| | | | | | | | Actually append the domain name to the end of an unqualified DNS name like we should have done all along. Reported-by: Gene Cumm <gene.cumm@gmail.com> Signed-off-by: H. Peter Anvin <hpa@zytor.com>
*-. Merge branch 'genec-rosh-for-hpa', remote branches ↵H. Peter Anvin2010-11-142-2/+24
|\ \ | | | | | | | | | 'genec/sample-make-for-hpa', 'genec/drmk-ver-for-hpa' and 'genec/pxechain-for-hpa'
| | * PXELINUX: shorten code in pxenv callGene Cumm2010-11-131-4/+2
| | | | | | | | | | | | | | | Now that both scenarios are clear (do/do not call timer_cleanup/ timer_init), shorten it to eliminate a needless jmp.
| | * PXELINUX: add gPXE PXENV_FILE_EXEC in addition to PXENV_RESTART_TFTP; commentsGene Cumm2010-11-131-2/+6
| | | | | | | | | | | | Both of these calls will not return if successful
| | * PXELINUX: Fix timer bugGene Cumm2010-11-051-0/+19
| |/ |/| | | | | | | Certain calls to the PXE stack could potentially remove us from memory. Revert the INT 1Ch timer to its previous state.
| * core/writedec: Remove writechr; fix overflow in .cloopGene Cumm2010-10-241-2/+3
|/ | | | writechr is found in other files and this prevents a compile error.
* core: fix handling new directory "/" for CONFIG in ISOLINUX and EXTLINUXGene Cumm2010-09-232-0/+4
|
* pxe: add a "pxeretry" option to deal with 404's in web appssyslinux-4.03-pre2H. Peter Anvin2010-08-264-0/+18
| | | | | | | | For web downloads, sometimes a mirror site will not be fully synced. Add an option to retry the open a specific number of times before giving up. Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
* diskio: remove redundant register writeDon Hiatt2010-08-131-2/+0
| | | | | The disk number is set twice in diskio.c/edd_rdwr_sectors() this patch removes the redundant setting.
* core: look for invalid MBR handover information addressH. Peter Anvin2010-08-111-3/+12
| | | | | | | | The Win7 MBR doesn't provide proper handover information. Instead, it leaves DS:SI = 0:0x7e00, so reject that information as invalid on grounds that it is pointed into the bootloader area. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* Make __free_tagged actually free memorySebastian Herbszt2010-07-271-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | __free_tagged called by comboot_cleanup_lowmem (core/mem/free.c) doesn't seem to work correctly. Memory allocated with lmalloc() isn't marked as free after the allocating module exits: boot: mem lowmem_buf: 0x000353e0 boot: mem lowmem_buf: 0x000553f0 boot: mem lowmem_buf: 0x00075400 boot: mem lowmem_buf: 0x00000000 boot: The expected behaviour boot: mem lowmem_buf: 0x000353e0 boot: mem lowmem_buf: 0x000353e0 boot: mem lowmem_buf: 0x000353e0 can be achieved with the following patch.
* core: define and use set_flags() helperH. Peter Anvin2010-07-263-7/+18
| | | | | | | Rather than opencoding the arithmetic flag mask, define an inline to make that happen properly. Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
* core: don't hang if no config file is foundH. Peter Anvin2010-07-255-9/+14
| | | | | | | | If we can't find a configuration file, we need to do something slightly more friendly than hanging. Reported-by: Sebastian Herbszt <herbszt@gmx.de> Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* pxe: fix byte order of output from parse_dotquad()H. Peter Anvin2010-07-191-1/+1
| | | | | | | parse_dotquad() incorrectly returned output in host byte order. Reported-by: Alexander Wuerstlein <arw@arw.name> Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* diskio: add a paranoia castH. Peter Anvin2010-07-171-1/+1
| | | | | | | Make sure we don't overflow the shift, even though that should never be possible. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* diskio: fix name for secpercyl field, remove unused type fieldH. Peter Anvin2010-07-173-12/+9
| | | | | | | | | | | Fix the name for the incorrectly named "t" (track) field; it is in fact the sectors/cylinder (secpercyl) field. Furthermore, remove the completely unused "type" field... right now the pointer to the rdwr_sectors field acts as a proxy, and if we need more complex stuff in the future it is probably better handled by pointing to an ops structure. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* diskio: remove locally coded ilog2()H. Peter Anvin2010-07-161-13/+1
| | | | | | Use the centrally coded ilog2() function. Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
* diskio: expand most fields; cache the number of total tracksH. Peter Anvin2010-07-162-9/+9
| | | | | | | | | Expand most fields in struct disk to 32 bits -- it makes the code smaller in general, and struct disk is not a common data element. Add a field for the number of tracks (number of heads*sectors). Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
* diskio: move strict CHS start value check into chs_rdwr_sectors()H. Peter Anvin2010-07-161-9/+15
| | | | | | It really makes more sense in chs_rdwr_sectors()... Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
* diskio: check early for an impossible LBA value for CHS requestsH. Peter Anvin2010-07-161-0/+3
| | | | | | | Make sure we don't end up trying to do a CHS request for a truly absurd value, that could possibly be misconverted. Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
* diskio: when falling back EDD->CHS make sure to get the offset rightH. Peter Anvin2010-07-161-1/+2
| | | | | | | | When we decide to go from EDD to CHS, make sure we convert from absolute back to a partition offset. The cylinder check should still be on the absolute value, however. Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
* diskio: remove redundant sector count capH. Peter Anvin2010-07-161-3/+0
| | | | | | | The sector count cap on CHS is automatically given as a result of the no-track-crossing rule. Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
* diskio: allow fallback from EDD to CHSH. Peter Anvin2010-07-161-39/+72
| | | | | | | At least one system has been found which require fallback from EDD to CHS, so actually make it doable. Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
* btrfs: print an error if finding compressed/encrypted dataH. Peter Anvin2010-07-052-1/+14
| | | | | | | | If we find compressed or encrypted data, print an error message instead of returning garbage. This is suboptimal, but at least handles the common subcase of an encrypted configuration file. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* core: add a ms-denominated timerH. Peter Anvin2010-07-053-3/+21
| | | | | | | | | Add a timer denominated in milliseconds. This is still driven by the 18.2 Hz timer interrupt, but counts "real" milliseconds, including handing the adjustment factor (which in reality means it advances by 55 for most timer ticks and 54 for some.) Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* core: split loadconfig.c into two filesH. Peter Anvin2010-07-022-29/+41
| | | | | | | Split loadconfig.c into two files. In particular, isolinux needs search_config() but not generic_load_config(). Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
* core: merge the configfile-searching code, isolinux generic namesH. Peter Anvin2010-07-023-42/+40
| | | | | | | | | | | | | | | | | | | | Merge the config file searching code between syslinux and isolinux, and make isolinux also recognize the generic names "syslinux" and "syslinux.cfg". Thus, isolinux now searches for configuration files in the following order: /boot/isolinux/isolinux.cfg /boot/isolinux/syslinux.cfg /isolinux/isolinux.cfg /isolinux/syslinux.cfg /boot/syslinux/isolinux.cfg /boot/syslinux/syslinux.cfg /syslinux/isolinux.cfg /syslinux/syslinux.cfg /isolinux.cfg /syslinux.cfg Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
* core: always canonicalize the configuration file nameH. Peter Anvin2010-07-021-1/+4
| | | | | | | | | The FAT installers may not produce a canonical pathname in the CurrentDirName field on entry. Make sure that the core doesn't croak when that happens, and still produces an absolute pathname for the configuration file. Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
* pxelinux: new IPAPPEND 4 to generate a SYSUUID= option.syslinux-4.01-pre3H. Peter Anvin2010-07-014-24/+58
| | | | | | | Add a new IPAPPEND option to generate a SYSUUID= option with the in-system UUID. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* core, diskio: reset controller between EDD retriesH. Peter Anvin2010-07-011-1/+13
| | | | | | | | | As documented in the old assembly code, reset the disk controller between retries when using EDD. We don't want to do that for CHS, since a reset shuts down the floppy motor, and we might be suffering a timeout. Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
* comboot.inc: vk_append is a field in a struct, not an addressH. Peter Anvin2010-07-011-4/+4
| | | | | | | | | We want to use VKernelBuf as temporary storage, not vk_append. vk_append is an offset into a larger buffer, and we ended up corrupting low BIOS memory. Reported-by: Joseph Cihula <joseph.cihula@intel.com> Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
* core, diskio: skip EDD/CHS detect for CD-ROMsH. Peter Anvin2010-07-011-53/+59
| | | | | | | | Skip EDD and CHS detection if we know it is a CD-ROM, because some CD-ROMs possibly report bad information, and/or screw up the stack, possibly permanently. Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
* core, diskio: move dprintfs to the intended locationH. Peter Anvin2010-07-011-4/+6
| | | | | | Move the dprintfs to the location that they were intended to use. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* core, diskio: put the error code in dprintf and printable messagesH. Peter Anvin2010-07-011-2/+8
| | | | | | | When we print an error message to the screen, include the error number. Furthermore, dprintf it on retries. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* diskstart: don't let the function number clobber the LBAH. Peter Anvin2010-06-291-3/+7
| | | | | | | | | The LBA for getonesec and getlinsec is in EDX:EAX, but both DL and AX are function inputs to INT 13h (drive number and function number). We need to preserve the LBA across *both* those, otherwise retries will not function. Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>