summaryrefslogtreecommitdiff
path: root/core/pxelinux.asm
Commit message (Collapse)AuthorAgeFilesLines
* core, pxe: Don't push on one stack and pop from the other in pxenvsyslinux-6.03-pre19H. Peter Anvin2014-07-291-0/+4
| | | | | | | | | | | | | | When saving/restoring the flags around the stack switch test, we cannot leave live data on the stack *across* the stack switch that we are going to use on the other side (unlike the "big" stack frame which we only use once we are back on the original stack.) Use register BP, which is not live at either point, as a temporary holding place for the flags from the stack. Reported-by: Frank Mehnert <frank.mehnert@googlemail.com> Link: http://bugzilla.syslinux.org/show_bug.cgi?id=54 Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* pxe: Re-add support for embedded DHCP optionssyslinux-6.03-pre15H. Peter Anvin2014-06-161-0/+1
| | | | | | | | | | Fix the support for embedded DHCP options. Although we were diligently saving them away, we never actually parsed them. This fixes embedded options for BIOS only -- for EFI we need to modify the encoding scheme so that it can fit inside an EFI PECOFF image. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* comapi: Remove the comapi interfaces completelyH. Peter Anvin2014-02-131-15/+2
| | | | | | | | | | Remove the last bits of the comapi interfaces completely. This does not install stub handlers for the INT 20-3Fh handlers, as we don't support loading old COMBOOT/COM32/COM32R images anymore. We could put those back if we really need them. Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
* bios: Remove shuffle and boot comapi callH. Peter Anvin2014-02-131-0/+4
| | | | | | | | Remove the shuffle and boot comapi call. This is the last of the comapi calls left; we should now be able to completely remove the comapi support. Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
* pxe: Export the initial stack and PXE(NV) structure, fix pxechnH. Peter Anvin2014-02-131-2/+1
| | | | | | | | | | Export the initial stack and PXE(NV) structure pointers properly, even for users which need seg:offs. Use this in pxechn.c rather than the already-removed INT 22h AX=000Ah call. Signed-off-by: H. Peter Anvin <hpa@linux.intel.com> Cc: Gene Cumm <gene.cumm@gmail.com>
* Merge branch 'elflink-pxe-fixes-for-mfleming-2' of ↵Matt Fleming2013-09-301-2/+3
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | git://github.com/geneC/syslinux into firmware Pull various network stack fixes from Gene Cumm and adapt to the 6.xx core_udp_* API, * 'elflink-pxe-fixes-for-mfleming-2' of git://github.com/geneC/syslinux: PXE ISR: Force polling on select hardware WORKAROUND core/lwip: Fix NULL pointer check PXE: use ddprintf macro com32: Define ddprintf() macro PXELINUX: specify PXE/lwIP undiif: show thread of execution on UNDIIF_ID_DEBUG core: dprintf() the banner. PXELINUX: Use sendto() instead of connect()/send()/disconnect() core: make mbox_post()/__sem_down_slow() check if valid core: mbox/semaphore NULL checks core/lwip/undi: Improve UNDIIF_ID_DEBUG messages Conflicts: core/fs/pxe/pxe.c core/fs/pxe/tftp.c core/init.c
| * PXELINUX: specify PXE/lwIPGene Cumm2013-09-231-2/+3
| | | | | | | | | | | | Styled after SYSLINUX Signed-off-by: Gene Cumm <gene.cumm@gmail.com>
* | Merge tag 'syslinux-5.11-pre8' into firmwaresyslinux-6.02-pre1Matt Fleming2013-07-081-2/+3
|\ \ | |/ | | | | | | | | | | | | | | | | | | syslinux-5.11-pre8 Conflicts: NEWS com32/lib/Makefile core/conio.c mk/devel.mk mk/elf.mk
| * idle: Consolidate idle implementationsMatt Fleming2013-07-031-1/+1
| | | | | | | | | | | | | | Duplicate code is bad. Move all the idle code to C and delete the old assembly stuff. Signed-off-by: Matt Fleming <matt.fleming@intel.com>
| * core: we only need one reset_idle()Matt Fleming2013-07-021-1/+2
| | | | | | | | | | | | | | | | | | | | We don't need both an assembly version of reset_idle and an implementation in C. Having these two functions has led to a bug where we may idle with interrupts disabled because an 'sti' is only performed in the assembly version. This lead to a hang waiting for user input. Cc: H. Peter Anvin <hpa@zytor.com> Signed-off-by: Matt Fleming <matt.fleming@intel.com>
* | Merge tag 'syslinux-5.11-pre3' into firmwaresyslinux-6.01-pre5Matt Fleming2013-06-281-1/+20
|\ \ | |/ | | | | | | | | | | syslinux-5.11-pre3 Conflicts: core/Makefile
| * PXELINUX: implement our own version of local_boot16Matt Fleming2013-06-261-1/+20
| | | | | | | | | | | | | | | | | | We need to do different things for PXE, such as reset the PXE environment when booting from the local disk from PXELINUX. This fixes a localboot regression. Signed-off-by: Matt Fleming <matt.fleming@intel.com>
* | Merge tag 'syslinux-5.10-pre2' into for-hpa/elflink/firmwareMatt Fleming2013-03-221-28/+30
|\ \ | |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | syslinux-5.10-pre2 Conflicts: NEWS com32/include/netinet/in.h com32/include/sys/cpu.h com32/lib/Makefile core/Makefile core/fs/diskio.c core/fs/pxe/pxe.h core/init.c core/mem/free.c core/mem/malloc.c mk/devel.mk version
| * net: Return of the legacy network stackMatt Fleming2013-03-061-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | While it's nice having the shiny new lwIP stack, there is definitely merit in being able to choose between two different network stacks. We want to keep the legacy network stack around as it is known to handle funky BIOS implementations and provides a good reference point when bugs are suspected in the lwIP code. Users now have a choice of .0 files. pxelinux.0 uses the legacy network stack, while lpxelinux.0 uses lwIP. Note that not every protocol is converted to using this new API. The http, ftp and tcp code is still inherently tied to the netconn API, and is only available with lpxelinux.0 and the lwIP stack. It's unlikely that this code will ever be fixed up to work with the legacy network stack. Network stack operations are abstracted behind the net_core_* interface, and each network stack has private data fields contained within a struct net_private. Cc: H. Peter Anvin <hpa@zytor.com> Cc: Eric W. Biederman <ebiederm@xmission.com> Cc: Gene Cumm <gene.cumm@gmail.com> Signed-off-by: Matt Fleming <matt.fleming@intel.com>
| * Merge branch 'lwip' into elflinkMatt Fleming2013-02-261-28/+28
| |\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Welcome to Syslinux 5.10. Conflicts: NEWS com32/lib/Makefile com32/lib/sys/open.c com32/lib/syslinux/ipappend.c com32/modules/Makefile com32/modules/prdhcp.c core/Makefile core/cmdline.inc core/com32.inc core/comboot.inc core/configinit.inc core/fs/chdir.c core/fs/fs.c core/fs/pxe/dnsresolv.c core/fs/pxe/pxe.c core/fs/pxe/pxe.h core/idle.c core/include/ctype.h core/init.inc core/mem/init.c core/parseconfig.inc core/runkernel.inc core/syslinux.ld core/ui.inc doc/comboot.txt version
| | * Generalize ipappend handling as "sysappend", and move to PM codeH. Peter Anvin2011-04-251-19/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Generalize the ipappend handling to cover all the derivatives, and rename it "sysappend" ("ipappend" is a valid alias for all derivatives.) Move all the string handling to protected mode. Currently only pxelinux exports strings, but the plan is to change that in the future. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
| | * core: pxe: don't switch to the PXE stack if we're on it...H. Peter Anvin2011-04-121-0/+22
| | | | | | | | | | | | | | | | | | | | | Don't switch to the PXE stack if we are already on it. This can happen if we take an interrupt inside the stack switch code. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
| | * core: pxe: real-mode interrupt service routineH. Peter Anvin2011-04-091-1/+6
| | | | | | | | | | | | | | | | | | | | | | | | Real-mode interrupt service routine for PXE. All it does is poll the PXE stack, sets a flag, then issues EOI. It is then up to the PM stack to wake up the receive thread and process the packet receives. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* | | Merge tag 'syslinux-5.01' into firmwaresyslinux-6.00-pre4Matt Fleming2013-01-291-1/+3
|\ \ \ | |/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
| * | PXELINUX: Fix IPAPPEND to include BOOTIF and SYSUUIDsyslinux-5.01-pre2Matt Fleming2013-01-141-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | commit 14531c47bc95 ("core: Delete code that is duplicated in ldlinux") erroneously deleted the BOOTIFStr and SYSUUIDStr entries from the PXELINUX-version of IPAppends, meaning that IPAPPEND 3 and IPAPPEND 4 didn't append the corresponding strings to the command line. Signed-off-by: Matt Fleming <matt.fleming@intel.com>
* | | Merge tag 'syslinux-5.00' into firmwaresyslinux-6.00-pre3Matt Fleming2012-12-071-9/+0
|\ \ \ | |/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
| * | Reduce the number of global variablesMatt Fleming2012-12-051-9/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In preparation for strictly limiting the list of variables that are exported (global) in the core, delete any unused variables, rewrite variable declarations in C that are not referenced by asm and delete files that are no longer included in other asm files. Cc: H. Peter Anvin <hpa@zytor.com> Signed-off-by: Matt Fleming <matt.fleming@intel.com>
* | | Merge tag 'syslinux-5.00-pre10' into for-hpa/elflink/firmwareMatt Fleming2012-11-141-13/+3
|\ \ \ | |/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | Pull in the latest prerelease that includes some bug fixes for ldlinux and a realloc() bug in core/. Conflicts: com32/cmenu/Makefile com32/elflink/ldlinux/Makefile com32/lib/Makefile core/pxelinux.asm
| * | CLI: Add Ctrl + V support for printing the Syslinux versionMatt Fleming2012-11-021-1/+2
| | | | | | | | | | | | | | | | | | | | | The cli code is missing support for printing the version string that is available in Syslinux 4.06 and earlier. Signed-off-by: Matt Fleming <matt.fleming@intel.com>
| * | pxe: Don't call open_config() from the pxe coreMatt Fleming2012-11-011-12/+1
| | | | | | | | | | | | | | | | | | | | | | | | Delete some stale comments about ldlinux.c32 requiring ConfigName to be initialised before it's launched - this is no longer true. ldlinux.c32 takes care of opening the config files. Signed-off-by: Matt Fleming <matt.fleming@intel.com>
* | | Create derivative-specific filesMatt Fleming2012-09-041-16/+1
| | | | | | | | | | | | | | | | | | | | | | | | Instead of having derivative-specific code within the assembly files and guarded by %if SYSLINUX, etc move all the code to C files so that the correct get_derivative_info() function can be wired up at runtime. Signed-off-by: Matt Fleming <matt.fleming@intel.com>
* | | Merge remote-tracking branch 'mfleming/elflink' into for-hpa/elflink/firmwareMatt Fleming2012-07-301-57/+117
|\ \ \ | |/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: Makefile com32/elflink/ldlinux/adv.c com32/elflink/ldlinux/kernel.c com32/elflink/ldlinux/ldlinux.c com32/include/bitsize/stddef.h com32/include/bitsize/stdint.h com32/include/stdint.h com32/include/sys/module.h com32/include/sys/x86_64/bitops.h com32/include/syslinux/linux.h com32/lib/Makefile com32/lib/sys/ansicon_write.c com32/lib/sys/module/elfutils.h com32/lib/sys/vesa/efi/fill.h com32/lib/syslinux/load_linux.c com32/lib/syslinux/serial.c com32/lib/syslinux/shuffle.c core/conio.c core/elflink/config.c core/elflink/load_env32.c core/graphics.c core/include/graphics.h core/init.c core/pxelinux.asm mk/elf.mk mk/lib.mk
| * | Merge remote-tracking branch 'mfleming/elflink-dot-zero' into elflinkH. Peter Anvin2012-06-071-0/+1
| |\ \ | | | | | | | | | | | | | | | | | | | | | | | | Resolved Conflicts: com32/elflink/ldlinux/execute.c Signed-off-by: H. Peter Anvin <hpa@zytor.com>
| | * | elflink: Fix boot sector bootingMatt Fleming2012-06-071-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This adds missing support for booting from a boot sector file such as .bs, .bss or .0, by re-implementing the old asm bootsec code from core/bootsect.inc in C. This has resulted in some external changes. We've had to make StackBuf a global symbol because we access it directly from execute.c. Also, we need to move dsinfo.c into MINLIBOBJS because ldlinux now needs to reference __syslinux_derivative_info. Signed-off-by: Matt Fleming <matt.fleming@intel.com>
| * | | pxe: move hardwired DHCP options into high memoryH. Peter Anvin2012-05-291-49/+46
| |/ / | | | | | | | | | | | | | | | | | | If we have hardwired DHCP options, move them into high memory instead of into the trackbuf. This eliminates yet another trackbuf user. Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
| * | PXELINUX: do not use hard-coded valuesPaulo Alcantara2012-05-121-4/+4
| | | | | | | | | | | | | | | | | | | | | PXENV_RESTART_TFTP and PXENV_FILE_EXEC flags are already declared in core/pxe.inc, so we don't need to use hard-coded values there. Signed-off-by: Paulo Alcantara <pcacjr@zytor.com>
| * | Remove core/ui.inc completely from SyslinuxPaulo Alcantara2012-04-111-4/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The old UI used by Syslinux is no longer supported. The 32-bit environment already provides us an awesome prompt. All Syslinux variants do not depend on it anymore, thus they were modified in order to support the new prompt provided by the ELF module ldlinux.c32. Signed-off-by: Paulo Alcantara <pcacjr@zytor.com>
| * | PXELINUX: call open_config() function before loading 32-bit environmentPaulo Alcantara2012-04-111-0/+10
| | | | | | | | | | | | | | | | | | | | | | | | ldlinux.c32 needs ConfigName variable to be set before jumping to 32-bit ELF space. As pxe_open_config() is called from open_config() in core/pxelinux.asm, it will set ConfigName variable accordingly. Signed-off-by: Paulo Alcantara <pcacjr@zytor.com>
| * | PXELINUX: get rid of core/ui.inc filePaulo Alcantara2012-04-111-6/+49
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | core/ui.inc is no longer used. As it used to contain the boot prompt code, there is replacement of it, the enter_cmdline() function (com32/elflink/ldlinux/ldlinux.c). There were some variables declared in core/ui.inc that are used by core/pxelinux.asm, so those were all moved out to core/pxelinux.asm as well. Signed-off-by: Paulo Alcantara <pcacjr@zytor.com>
| * | PXELINUX: do not load 32-bit environment twicePaulo Alcantara2012-04-111-1/+1
| | | | | | | | | | | | | | | | | | | | | Calling load_env32() once, it should never return. If it does, then jump to kaboom. Signed-off-by: Paulo Alcantara <pcacjr@zytor.com>
* | | disk: Add .disk_init() to firmware structMatt Fleming2011-12-161-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Each firmware has its own method of initialising a disk so allow each firmware backend to implement a separate disk_init() function. Make all the assembly callers of fs_init() jump through pm_fs_init(), which allows us to restrict the com32sys_t arguments to only those callers that really need it, e.g. the .asm files. Signed-off-by: Matt Fleming <matt.fleming@intel.com>
* | | core: Add firmware backend supportMatt Fleming2011-12-161-1/+1
|/ / | | | | | | | | | | | | | | In an upcoming patch series we're going to need to abstract the firmware operations because they will be provided by both BIOS and EFI. Signed-off-by: Matt Fleming <matt.fleming@intel.com>
* | pxelinux: Call load_env32()Matt Fleming2011-12-021-0/+1
| | | | | | | | | | | | Execute the elflink environment. Signed-off-by: Matt Fleming <matt.fleming@intel.com>
* | core: Delete code that is duplicated in ldlinuxMatt Fleming2011-12-021-49/+0
| | | | | | | | | | | | | | | | | | | | | | | | Lots of code that used to be implemented in the core is now implemented in ldlinux, but code from core was never deleted. Purge this code. Also, move all com32 loading to ldlinux since we need to be able to do various command line things (which are no longer available in the core). Signed-off-by: Matt Fleming <matt.fleming@intel.com>
* | core: Reimplement writestr in CMatt Fleming2011-12-011-1/+1
| | | | | | | | | | | | | | Implement writestr in C instead of asm and move writestr.inc into modules/ because it's required by modules/ver.asm. Signed-off-by: Matt Fleming <matt.fleming@intel.com>
* | core: Reimplement lots asm code in CMatt Fleming2011-12-011-4/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | There is an awful lot of code currently implemented in assembly when it could just as easily be implemented in C. Having it in C makes it much easier to share code between the BIOS and forthcoming EFI firmware backend. The following code fragments have been rewritten, - timer initialisation - adjust_screen() - check_esapes() and mem_init() - conio.inc - plaincon.inc - cleanup.inc - serirq.inc - font.inc - graphics - writehex Signed-off-by: Matt Fleming <matt.fleming@intel.com>
* | ldlinux: Add support for parsing "serial" config directiveMatt Fleming2011-06-071-0/+1
| | | | | | | | Signed-off-by: Matt Fleming <matt.fleming@linux.intel.com>
* | core: Load the 32-bit environment at startupMatt Fleming2011-05-271-3/+2
|/ | | | | | | Do the same as the other Syslinux variants and initialise the 32-bit environment when we boot. Signed-off-by: Matt Fleming <matt.fleming@linux.intel.com>
* 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: don't hang if no config file is foundH. Peter Anvin2010-07-251-5/+6
| | | | | | | | 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>
* pxelinux: use alignb not alignz in a bss sectionsH. Peter Anvin2010-06-211-1/+1
| | | | | | In .bss sections use alignb, not alignz. Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
* pxe: centralize all the IP information and export it to modulesH. Peter Anvin2010-06-181-3/+11
| | | | | | | | | It appears that there still are PXE stacks in the field which needs the crutch of being pointed to the default gateway. As such, put all the IP information into a single memory structure and allow modules to see it. Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
* core: fix "sector size" confusionsyslinux-4.00-pre45H. Peter Anvin2010-05-141-11/+0
| | | | | | | | | | | Fix the case where the "sector size" used by the pm filesystem driver isn't the same thing as the SECTOR_SIZE/SECTOR_SHIFT macros used in the assembly code. This is a per-device property, and in the particular case of isolinux hybrid, they are not even currently the same (for all others, they are the same for now, but not necessarily in the future.) Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>