├── .gitignore ├── COPYING ├── Makefile ├── Makefile.private ├── NEWS ├── README ├── README.md ├── codepage ├── Makefile ├── UnicodeData ├── cp1250.txt ├── cp1251.txt ├── cp1252.txt ├── cp1253.txt ├── cp1254.txt ├── cp1255.txt ├── cp1256.txt ├── cp1257.txt ├── cp1258.txt ├── cp437.txt ├── cp737.txt ├── cp775.txt ├── cp850.txt ├── cp852.txt ├── cp855.txt ├── cp857.txt ├── cp860.txt ├── cp861.txt ├── cp862.txt ├── cp863.txt ├── cp864.txt ├── cp865.txt ├── cp866.txt ├── cp869.txt ├── cp874.txt ├── cptable.pl ├── gensubset.pl ├── iso8859-1.txt ├── iso8859-10.txt ├── iso8859-11.txt ├── iso8859-13.txt ├── iso8859-14.txt ├── iso8859-15.txt ├── iso8859-16.txt ├── iso8859-2.txt ├── iso8859-3.txt ├── iso8859-4.txt ├── iso8859-5.txt ├── iso8859-6.txt ├── iso8859-7.txt ├── iso8859-8.txt └── iso8859-9.txt ├── com32 ├── LICENCE ├── Makefile ├── chain │ ├── Makefile │ ├── chain.c │ ├── chain.h │ ├── common.h │ ├── mangle.c │ ├── mangle.h │ ├── options.c │ ├── options.h │ ├── partiter.c │ ├── partiter.h │ ├── utility.c │ └── utility.h ├── cmenu │ ├── .gitignore │ ├── CHANGES │ ├── HISTORY │ ├── MANUAL │ ├── MENU_FORMAT │ ├── Makefile │ ├── README │ ├── TODO │ ├── adv_menu.tpl │ ├── complex.c │ ├── display.c │ ├── libmenu │ │ ├── com32io.c │ │ ├── com32io.h │ │ ├── des.c │ │ ├── des.h │ │ ├── help.c │ │ ├── help.h │ │ ├── menu.c │ │ ├── menu.h │ │ ├── passwords.c │ │ ├── passwords.h │ │ ├── syslnx.c │ │ ├── syslnx.h │ │ ├── tui.c │ │ └── tui.h │ ├── menugen.py │ ├── password │ ├── simple.c │ ├── test.menu │ └── test2.menu ├── gdbstub │ ├── Makefile │ ├── gdbstub.c │ ├── int.S │ ├── main.c │ ├── serial.c │ └── serial.h ├── gfxboot │ ├── .gitignore │ ├── Makefile │ ├── gfxboot.c │ └── realmode_callback.asm ├── gplinclude │ ├── README │ ├── acpi │ │ ├── acpi.h │ │ ├── boot.h │ │ ├── dsdt.h │ │ ├── ecdt.h │ │ ├── facs.h │ │ ├── fadt.h │ │ ├── hpet.h │ │ ├── madt.h │ │ ├── mcfg.h │ │ ├── rsdp.h │ │ ├── rsdt.h │ │ ├── sbst.h │ │ ├── slic.h │ │ ├── ssdt.h │ │ ├── structs.h │ │ ├── tcpa.h │ │ └── xsdt.h │ ├── cpuid.h │ ├── disk │ │ ├── bootloaders.h │ │ ├── common.h │ │ ├── errno_disk.h │ │ ├── error.h │ │ ├── geom.h │ │ ├── mbrs.h │ │ ├── msdos.h │ │ ├── partition.h │ │ ├── read.h │ │ ├── swsusp.h │ │ ├── util.h │ │ └── write.h │ ├── dmi │ │ ├── dmi.h │ │ ├── dmi_base_board.h │ │ ├── dmi_battery.h │ │ ├── dmi_bios.h │ │ ├── dmi_cache.h │ │ ├── dmi_chassis.h │ │ ├── dmi_ipmi.h │ │ ├── dmi_memory.h │ │ ├── dmi_processor.h │ │ └── dmi_system.h │ ├── memory.h │ ├── vpd │ │ └── vpd.h │ └── zzjson │ │ └── zzjson.h ├── gpllib │ ├── Makefile │ ├── acpi │ │ ├── acpi.c │ │ ├── dsdt.c │ │ ├── ecdt.c │ │ ├── facs.c │ │ ├── fadt.c │ │ ├── madt.c │ │ ├── rsdp.c │ │ ├── rsdt.c │ │ ├── sbst.c │ │ └── xsdt.c │ ├── cpuid.c │ ├── disk │ │ ├── ata.c │ │ ├── bootloaders.c │ │ ├── errno_disk.c │ │ ├── error.c │ │ ├── geom.c │ │ ├── labels.c │ │ ├── mbrs.c │ │ ├── msdos.c │ │ ├── read.c │ │ ├── swsusp.c │ │ ├── util.c │ │ └── write.c │ ├── dmi │ │ ├── dmi.c │ │ ├── dmi_base_board.c │ │ ├── dmi_battery.c │ │ ├── dmi_bios.c │ │ ├── dmi_cache.c │ │ ├── dmi_chassis.c │ │ ├── dmi_ipmi.c │ │ ├── dmi_memory.c │ │ └── dmi_processor.c │ ├── memory.c │ ├── vpd │ │ └── vpd.c │ └── zzjson │ │ ├── zzjson_create.c │ │ ├── zzjson_free.c │ │ ├── zzjson_parse.c │ │ ├── zzjson_print.c │ │ └── zzjson_query.c ├── hdt │ ├── .gitignore │ ├── Makefile │ ├── README │ ├── art │ │ ├── HDT.ai │ │ ├── HDT.svg │ │ ├── backgnd.png │ │ ├── display.png │ │ ├── hdt-black.png │ │ ├── hdt.png │ │ └── red.png │ ├── floppy │ │ ├── hdt.cfg │ │ └── mtools.conf │ ├── hdt-ata.c │ ├── hdt-ata.h │ ├── hdt-cli-acpi.c │ ├── hdt-cli-cpu.c │ ├── hdt-cli-disk.c │ ├── hdt-cli-dmi.c │ ├── hdt-cli-hdt.c │ ├── hdt-cli-kernel.c │ ├── hdt-cli-memory.c │ ├── hdt-cli-pci.c │ ├── hdt-cli-pxe.c │ ├── hdt-cli-syslinux.c │ ├── hdt-cli-vesa.c │ ├── hdt-cli-vpd.c │ ├── hdt-cli.c │ ├── hdt-cli.h │ ├── hdt-common.c │ ├── hdt-common.h │ ├── hdt-dump-acpi.c │ ├── hdt-dump-cpu.c │ ├── hdt-dump-disks.c │ ├── hdt-dump-dmi.c │ ├── hdt-dump-hdt.c │ ├── hdt-dump-kernel.c │ ├── hdt-dump-memory.c │ ├── hdt-dump-pci.c │ ├── hdt-dump-pxe.c │ ├── hdt-dump-syslinux.c │ ├── hdt-dump-vesa.c │ ├── hdt-dump-vpd.c │ ├── hdt-dump.c │ ├── hdt-dump.h │ ├── hdt-menu-about.c │ ├── hdt-menu-acpi.c │ ├── hdt-menu-disk.c │ ├── hdt-menu-dmi.c │ ├── hdt-menu-kernel.c │ ├── hdt-menu-memory.c │ ├── hdt-menu-pci.c │ ├── hdt-menu-processor.c │ ├── hdt-menu-pxe.c │ ├── hdt-menu-summary.c │ ├── hdt-menu-syslinux.c │ ├── hdt-menu-vesa.c │ ├── hdt-menu-vpd.c │ ├── hdt-menu.c │ ├── hdt-menu.h │ ├── hdt-util.c │ ├── hdt-util.h │ ├── hdt.c │ └── hdt.h ├── include │ ├── alloca.h │ ├── assert.h │ ├── bitsize │ │ ├── limits.h │ │ ├── stddef.h │ │ ├── stdint.h │ │ ├── stdintconst.h │ │ └── stdintlimits.h │ ├── bufprintf.h │ ├── colortbl.h │ ├── com32.h │ ├── console.h │ ├── cpufeature.h │ ├── ctype.h │ ├── dev.h │ ├── dhcp.h │ ├── dirent.h │ ├── dprintf.h │ ├── elf.h │ ├── endian.h │ ├── errno.h │ ├── fcntl.h │ ├── getopt.h │ ├── ilog2.h │ ├── inttypes.h │ ├── klibc │ │ ├── archsetjmp.h │ │ ├── compiler.h │ │ ├── diverr.h │ │ ├── endian.h │ │ ├── extern.h │ │ └── sysconfig.h │ ├── libansi.h │ ├── limits.h │ ├── math.h │ ├── minmax.h │ ├── netinet │ │ └── in.h │ ├── png.h │ ├── pngconf.h │ ├── setjmp.h │ ├── stdarg.h │ ├── stdbool.h │ ├── stddef.h │ ├── stdint.h │ ├── stdio.h │ ├── stdlib.h │ ├── string.h │ ├── suffix_number.h │ ├── sys │ │ ├── bitops.h │ │ ├── cpu.h │ │ ├── dirent.h │ │ ├── elf32.h │ │ ├── elf64.h │ │ ├── elfcommon.h │ │ ├── fpu.h │ │ ├── gpxe.h │ │ ├── io.h │ │ ├── pci.h │ │ ├── stat.h │ │ ├── time.h │ │ ├── times.h │ │ └── types.h │ ├── syslinux │ │ ├── adv.h │ │ ├── advconst.h │ │ ├── align.h │ │ ├── boot.h │ │ ├── bootpm.h │ │ ├── bootrm.h │ │ ├── config.h │ │ ├── disk.h │ │ ├── features.h │ │ ├── idle.h │ │ ├── io.h │ │ ├── keyboard.h │ │ ├── linux.h │ │ ├── loadfile.h │ │ ├── memscan.h │ │ ├── movebits.h │ │ ├── pmapi.h │ │ ├── pxe.h │ │ ├── pxe_api.h │ │ ├── reboot.h │ │ ├── resolve.h │ │ ├── vesacon.h │ │ ├── video.h │ │ └── zio.h │ ├── time.h │ ├── tinyjpeg.h │ ├── unistd.h │ ├── zconf.h │ └── zlib.h ├── lib │ ├── Makefile │ ├── abort.c │ ├── asprintf.c │ ├── atexit.c │ ├── atexit.h │ ├── atoi.c │ ├── atol.c │ ├── atoll.c │ ├── atox.c │ ├── bufprintf.c │ ├── calloc.c │ ├── chdir.c │ ├── chrreplace.c │ ├── com32.ld │ ├── creat.c │ ├── ctypes.c │ ├── dhcppack.c │ ├── dhcpunpack.c │ ├── dprintf.c │ ├── errno.c │ ├── exit.c │ ├── fclose.c │ ├── fdopendir.c │ ├── fgetc.c │ ├── fgets.c │ ├── fopen.c │ ├── fopendev.c │ ├── fprintf.c │ ├── fputc.c │ ├── fputs.c │ ├── fread.c │ ├── fread2.c │ ├── free.c │ ├── fwrite.c │ ├── fwrite2.c │ ├── getcwd.c │ ├── getopt.c │ ├── getopt_long.c │ ├── inet.c │ ├── init.h │ ├── jpeg │ │ ├── README │ │ ├── bgr24.c │ │ ├── bgra32.c │ │ ├── decode1.c │ │ ├── decode3.c │ │ ├── grey.c │ │ ├── jidctflt.c │ │ ├── rgb24.c │ │ ├── rgba32.c │ │ ├── tinyjpeg-internal.h │ │ ├── tinyjpeg.c │ │ └── yuv420p.c │ ├── libgcc │ │ ├── __ashldi3.S │ │ ├── __ashrdi3.S │ │ ├── __divdi3.c │ │ ├── __lshrdi3.S │ │ ├── __moddi3.c │ │ ├── __muldi3.S │ │ ├── __negdi2.S │ │ ├── __udivdi3.c │ │ ├── __udivmoddi4.c │ │ └── __umoddi3.c │ ├── libpng │ │ ├── ANNOUNCE │ │ ├── CHANGES │ │ ├── KNOWNBUG │ │ ├── LICENSE │ │ ├── README │ │ ├── TODO │ │ ├── Y2KINFO │ │ ├── example.c │ │ ├── libpng.3 │ │ ├── libpngpf.3 │ │ ├── png.5 │ │ ├── png.c │ │ ├── pngerror.c │ │ ├── pnggccrd.c │ │ ├── pngget.c │ │ ├── pngmem.c │ │ ├── pngpread.c │ │ ├── pngread.c │ │ ├── pngrio.c │ │ ├── pngrtran.c │ │ ├── pngrutil.c │ │ ├── pngset.c │ │ ├── pngtest.c │ │ ├── pngtrans.c │ │ ├── pngvcrd.c │ │ ├── pngwio.c │ │ ├── pngwrite.c │ │ ├── pngwtran.c │ │ └── pngwutil.c │ ├── lmalloc.c │ ├── lrand48.c │ ├── lstrdup.c │ ├── malloc.c │ ├── malloc.h │ ├── math │ │ ├── pow.S │ │ └── strtod.c │ ├── memccpy.c │ ├── memchr.c │ ├── memcmp.c │ ├── memcpy.S │ ├── memmem.c │ ├── memmove.S │ ├── mempcpy.S │ ├── memset.S │ ├── memswap.c │ ├── onexit.c │ ├── pci │ │ ├── bios.c │ │ ├── cfgtype.c │ │ ├── pci.h │ │ ├── readb.c │ │ ├── readl.c │ │ ├── readw.c │ │ ├── readx.c │ │ ├── scan.c │ │ ├── writeb.c │ │ ├── writel.c │ │ ├── writew.c │ │ └── writex.c │ ├── perror.c │ ├── printf.c │ ├── putchar.c │ ├── puts.c │ ├── qsort.c │ ├── realloc.c │ ├── seed48.c │ ├── setjmp.S │ ├── skipspace.c │ ├── snprintf.c │ ├── sprintf.c │ ├── srand48.c │ ├── sscanf.c │ ├── stack.c │ ├── stpcpy.c │ ├── stpncpy.c │ ├── strcasecmp.c │ ├── strcat.c │ ├── strchr.c │ ├── strcmp.c │ ├── strcpy.c │ ├── strdup.c │ ├── strerror.c │ ├── strlcat.c │ ├── strlcpy.c │ ├── strlen.c │ ├── strncasecmp.c │ ├── strncat.c │ ├── strncmp.c │ ├── strncpy.c │ ├── strndup.c │ ├── strnlen.c │ ├── strntoimax.c │ ├── strntoumax.c │ ├── strrchr.c │ ├── strreplace.c │ ├── strsep.c │ ├── strspn.c │ ├── strstr.c │ ├── strtoimax.c │ ├── strtok.c │ ├── strtol.c │ ├── strtoll.c │ ├── strtoul.c │ ├── strtoull.c │ ├── strtoumax.c │ ├── strtox.c │ ├── suffix_number.c │ ├── sys │ │ ├── ansi.c │ │ ├── ansi.h │ │ ├── ansicon_write.c │ │ ├── ansiserial_write.c │ │ ├── argv.c │ │ ├── cfarcall.c │ │ ├── close.c │ │ ├── colortable.c │ │ ├── entry.S │ │ ├── err_read.c │ │ ├── err_write.c │ │ ├── exit.S │ │ ├── farcall.c │ │ ├── file.h │ │ ├── fileclose.c │ │ ├── fileinfo.c │ │ ├── fileread.c │ │ ├── fstat.c │ │ ├── ftell.c │ │ ├── gpxe.c │ │ ├── intcall.c │ │ ├── isatty.c │ │ ├── libansi.c │ │ ├── line_input.c │ │ ├── null_read.c │ │ ├── null_write.c │ │ ├── open.c │ │ ├── openconsole.c │ │ ├── opendev.c │ │ ├── openmem.c │ │ ├── rawcon_read.c │ │ ├── rawcon_write.c │ │ ├── read.c │ │ ├── readdir.c │ │ ├── screensize.c │ │ ├── serial_write.c │ │ ├── sleep.c │ │ ├── stdcon_read.c │ │ ├── stdcon_write.c │ │ ├── times.c │ │ ├── vesa │ │ │ ├── alphatbl.pl │ │ │ ├── background.c │ │ │ ├── debug.h │ │ │ ├── drawtxt.c │ │ │ ├── fill.h │ │ │ ├── fmtpixel.c │ │ │ ├── i915resolution.c │ │ │ ├── initvesa.c │ │ │ ├── screencpy.c │ │ │ ├── vesa.h │ │ │ └── video.h │ │ ├── vesacon_write.c │ │ ├── vesaserial_write.c │ │ ├── write.c │ │ ├── x86_init_fpu.c │ │ ├── xserial_write.c │ │ ├── zeroregs.c │ │ ├── zfile.c │ │ └── zfopen.c │ ├── syslinux │ │ ├── addlist.c │ │ ├── adv.c │ │ ├── advwrite.c │ │ ├── cleanup.c │ │ ├── config.c │ │ ├── disk.c │ │ ├── dsinfo.c │ │ ├── dump_mmap.c │ │ ├── dump_movelist.c │ │ ├── features.c │ │ ├── floadfile.c │ │ ├── freelist.c │ │ ├── getadv.c │ │ ├── idle.c │ │ ├── initramfs.c │ │ ├── initramfs_archive.c │ │ ├── initramfs_file.c │ │ ├── initramfs_loadfile.c │ │ ├── ipappend.c │ │ ├── keyboard.c │ │ ├── load_linux.c │ │ ├── loadfile.c │ │ ├── localboot.c │ │ ├── memmap.c │ │ ├── memscan.c │ │ ├── movebits.c │ │ ├── pxe_dns.c │ │ ├── pxe_get_cached.c │ │ ├── pxe_get_nic.c │ │ ├── reboot.c │ │ ├── run_command.c │ │ ├── run_default.c │ │ ├── runimage.c │ │ ├── serial.c │ │ ├── setadv.c │ │ ├── setup_data.c │ │ ├── shuffle.c │ │ ├── shuffle_pm.c │ │ ├── shuffle_rm.c │ │ ├── version.c │ │ ├── video │ │ │ ├── fontquery.c │ │ │ ├── forcetext.c │ │ │ └── reportmode.c │ │ ├── zloadfile.c │ │ └── zonelist.c │ ├── vasprintf.c │ ├── vdprintf.c │ ├── vfprintf.c │ ├── vprintf.c │ ├── vsnprintf.c │ ├── vsprintf.c │ ├── vsscanf.c │ ├── zalloc.c │ └── zlib │ │ ├── FAQ │ │ ├── README │ │ ├── adler32.c │ │ ├── algorithm.txt │ │ ├── compress.c │ │ ├── crc32.c │ │ ├── crc32.h │ │ ├── deflate.c │ │ ├── deflate.h │ │ ├── infback.c │ │ ├── inffast.c │ │ ├── inffast.h │ │ ├── inffixed.h │ │ ├── inflate.c │ │ ├── inflate.h │ │ ├── inftrees.c │ │ ├── inftrees.h │ │ ├── trees.c │ │ ├── trees.h │ │ ├── uncompr.c │ │ ├── zconf.in.h │ │ ├── zlib.3 │ │ ├── zutil.c │ │ └── zutil.h ├── libupload │ ├── .gitignore │ ├── Makefile │ ├── cpio.c │ ├── ctime.c │ ├── ctime.h │ ├── serial.c │ ├── serial.h │ ├── srecsend.h │ ├── tftp.h │ ├── upload_backend.h │ ├── upload_srec.c │ ├── upload_tftp.c │ ├── upload_ymodem.c │ ├── ymodem.txt │ └── zout.c ├── libutil │ ├── Makefile │ ├── ansiline.c │ ├── ansiraw.c │ ├── base64.c │ ├── crypt-md5.c │ ├── get_key.c │ ├── include │ │ ├── base64.h │ │ ├── consoles.h │ │ ├── getkey.h │ │ ├── libutil.h │ │ ├── md5.h │ │ ├── minmax.h │ │ ├── sha1.h │ │ └── xcrypt.h │ ├── keyname.c │ ├── md5.c │ ├── sha1hash.c │ ├── sha256crypt.c │ ├── sha512crypt.c │ └── unbase64.c ├── lua │ ├── COPYRIGHT │ ├── HISTORY │ ├── INSTALL │ ├── Makefile-orig │ ├── README │ ├── doc │ │ ├── amazon.gif │ │ ├── contents.html │ │ ├── cover.png │ │ ├── logo.gif │ │ ├── lua.1 │ │ ├── lua.css │ │ ├── lua.html │ │ ├── luac.1 │ │ ├── luac.html │ │ ├── manual.css │ │ ├── manual.html │ │ ├── readme.html │ │ └── syslinux.asc │ ├── etc │ │ ├── Makefile │ │ ├── README │ │ ├── all.c │ │ ├── lua.hpp │ │ ├── lua.ico │ │ ├── lua.pc │ │ ├── luavs.bat │ │ ├── min.c │ │ ├── noparser.c │ │ └── strict.lua │ ├── src │ │ ├── Makefile │ │ ├── Makefile-orig │ │ ├── cpu.c │ │ ├── dhcp.c │ │ ├── dhcp.h │ │ ├── dmi.c │ │ ├── lapi.c │ │ ├── lapi.h │ │ ├── lauxlib.c │ │ ├── lauxlib.h │ │ ├── lbaselib.c │ │ ├── lcode.c │ │ ├── lcode.h │ │ ├── ldblib.c │ │ ├── ldebug.c │ │ ├── ldebug.h │ │ ├── ldo.c │ │ ├── ldo.h │ │ ├── ldump.c │ │ ├── lfunc.c │ │ ├── lfunc.h │ │ ├── lgc.c │ │ ├── lgc.h │ │ ├── linit.c │ │ ├── liolib.c │ │ ├── llex.c │ │ ├── llex.h │ │ ├── llimits.h │ │ ├── lmathlib.c │ │ ├── lmem.c │ │ ├── lmem.h │ │ ├── loadlib.c │ │ ├── lobject.c │ │ ├── lobject.h │ │ ├── lopcodes.c │ │ ├── lopcodes.h │ │ ├── loslib.c │ │ ├── lparser.c │ │ ├── lparser.h │ │ ├── lstate.c │ │ ├── lstate.h │ │ ├── lstring.c │ │ ├── lstring.h │ │ ├── lstrlib.c │ │ ├── ltable.c │ │ ├── ltable.h │ │ ├── ltablib.c │ │ ├── ltm.c │ │ ├── ltm.h │ │ ├── lua.c │ │ ├── lua.h │ │ ├── luac.c │ │ ├── luaconf.h │ │ ├── lualib.h │ │ ├── lundump.c │ │ ├── lundump.h │ │ ├── lvm.c │ │ ├── lvm.h │ │ ├── lzio.c │ │ ├── lzio.h │ │ ├── pci.c │ │ ├── print.c │ │ ├── syslinux.c │ │ └── vesa.c │ └── test │ │ ├── README │ │ ├── bisect.lua │ │ ├── cf.lua │ │ ├── cpu.lua │ │ ├── dmi.lua │ │ ├── echo.lua │ │ ├── env.lua │ │ ├── factorial.lua │ │ ├── fib.lua │ │ ├── fibfor.lua │ │ ├── globals.lua │ │ ├── hello.lua │ │ ├── life.lua │ │ ├── luac.lua │ │ ├── pci.lua │ │ ├── printf.lua │ │ ├── readonly.lua │ │ ├── sieve.lua │ │ ├── sort.lua │ │ ├── syslinux-derivative.lua │ │ ├── syslinux.lua │ │ ├── table.lua │ │ ├── trace-calls.lua │ │ ├── trace-globals.lua │ │ ├── vesa.lua │ │ └── xd.lua ├── mboot │ ├── Makefile │ ├── apm.c │ ├── initvesa.c │ ├── map.c │ ├── mb_header.h │ ├── mb_info.h │ ├── mboot.c │ ├── mboot.h │ ├── mem.c │ ├── solaris.c │ ├── syslinux.c │ └── vesa.h ├── menu │ ├── Makefile │ ├── background.c │ ├── colors.c │ ├── drain.c │ ├── execute.c │ ├── menu.c │ ├── menu.h │ ├── menumain.c │ ├── passwd.c │ ├── printmsg.c │ ├── readconfig.c │ ├── refstr.c │ ├── refstr.h │ └── vesamenu.c ├── modules │ ├── Makefile │ ├── cat.c │ ├── cmd.c │ ├── config.c │ ├── cpuid.c │ ├── cpuidtest.c │ ├── disk.c │ ├── dmi_utils.c │ ├── dmitest.c │ ├── elf.c │ ├── ethersel.c │ ├── gpxecmd.c │ ├── host.c │ ├── ifcpu.c │ ├── ifcpu64.c │ ├── ifmemdsk.c │ ├── ifplop.c │ ├── kbdmap.c │ ├── kontron_wdt.c │ ├── kontron_wdt.h │ ├── linux.c │ ├── ls.c │ ├── meminfo.c │ ├── pcitest.c │ ├── pmload.c │ ├── prdhcp.c │ ├── pwd.c │ ├── pxechn.c │ ├── reboot.c │ ├── sanboot.c │ ├── sdi.c │ ├── stubs │ │ ├── copydown.asm │ │ └── swapstub.asm │ ├── vesainfo.c │ ├── vpdtest.c │ ├── whichsys.c │ └── zzjson.c ├── rosh │ ├── Makefile │ ├── rosh.c │ └── rosh.h ├── samples │ ├── Makefile │ ├── advdump.c │ ├── entrydump.c │ ├── fancyhello.c │ ├── hello.c │ ├── keytest.c │ ├── localboot.c │ ├── resolv.c │ └── serialinfo.c ├── sysdump │ ├── Makefile │ ├── README │ ├── acpi.c │ ├── cpuid.c │ ├── dmi.c │ ├── main.c │ ├── memmap.c │ ├── memory.c │ ├── pci.c │ ├── rbtree.c │ ├── rbtree.h │ ├── sysdump.h │ └── vesa.c └── tools │ ├── .gitignore │ ├── Makefile │ ├── include │ └── tools │ │ └── le_byteshift.h │ └── relocs.c ├── core ├── Makefile ├── abort.inc ├── adv.inc ├── bcopy32.inc ├── bcopyxx.inc ├── bios.inc ├── bootsect.inc ├── call16.c ├── callback.inc ├── cleanup.inc ├── cmdline.inc ├── codepage.S ├── com32.inc ├── comboot.inc ├── common.inc ├── config.inc ├── configinit.inc ├── conio.inc ├── console.c ├── diskboot.inc ├── diskfs.inc ├── diskstart.inc ├── extern.inc ├── font.inc ├── fs │ ├── btrfs │ │ ├── btrfs.c │ │ ├── btrfs.h │ │ └── crc32c.h │ ├── cache.c │ ├── chdir.c │ ├── diskio.c │ ├── ext2 │ │ ├── bmap.c │ │ ├── ext2.c │ │ └── ext2_fs.h │ ├── fat │ │ ├── fat.c │ │ └── fat_fs.h │ ├── fs.c │ ├── getcwd.c │ ├── getfssec.c │ ├── iso9660 │ │ ├── iso9660.c │ │ └── iso9660_fs.h │ ├── lib │ │ ├── close.c │ │ ├── loadconfig.c │ │ ├── mangle.c │ │ └── searchconfig.c │ ├── loadhigh.c │ ├── newconfig.c │ ├── nonextextent.c │ ├── ntfs │ │ ├── ntfs.c │ │ ├── ntfs.h │ │ └── runlist.h │ ├── pxe │ │ ├── dhcp_option.c │ │ ├── dnsresolv.c │ │ ├── idle.c │ │ ├── portnum.c │ │ ├── pxe.c │ │ └── pxe.h │ └── readdir.c ├── genhash.pl ├── getc.inc ├── graphics.inc ├── head.inc ├── highmem.inc ├── idle.c ├── idle.inc ├── include │ ├── cache.h │ ├── codepage.h │ ├── core.h │ ├── ctype.h │ ├── disk.h │ ├── fs.h │ └── pmapi.h ├── init.inc ├── io.inc ├── isolinux-debug.asm ├── isolinux.asm ├── kaboom.c ├── kernel.inc ├── keywords ├── keywords.inc ├── layout.inc ├── ldlinux.asm ├── loadhigh.inc ├── localboot.inc ├── lstadjust.pl ├── lzo │ ├── enter.ash │ ├── leave.ash │ ├── lzo1c_d.ash │ ├── lzo1f_d.ash │ ├── lzo1x_d.ash │ ├── lzo1x_f1.S │ └── lzo_asm.h ├── macros.inc ├── mem │ ├── free.c │ ├── init.c │ ├── malloc.c │ └── malloc.h ├── parsecmd.inc ├── parseconfig.inc ├── plaincon.inc ├── pm.inc ├── pmapi.c ├── pmcall.inc ├── prefix.inc ├── printf.c ├── pxe.inc ├── pxelinux.asm ├── rawcon.inc ├── regdump.inc ├── rllpack.c ├── runkernel.inc ├── serirq.inc ├── stack.inc ├── strcasecmp.c ├── strcpy.inc ├── strncasecmp.c ├── syslinux.ld ├── timer.inc ├── tracers.inc ├── ui.inc ├── writedec.inc ├── writehex.inc └── writestr.inc ├── devel └── Nindent ├── diag ├── Makefile ├── README ├── geodsp │ ├── Makefile │ ├── README │ ├── geodsp1s.asm │ ├── geodsplib.inc │ ├── geodspms.asm │ ├── mk-lba-img.c │ └── mk-lba-img.pl └── mbr │ ├── Makefile │ ├── README │ └── handoff.S ├── doc ├── CodingStyle.txt ├── SubmittingPatches.txt ├── chain.txt ├── comboot.txt ├── distrib.txt ├── extlinux.txt ├── gpt.txt ├── isolinux.txt ├── keytab-lilo.txt ├── logo │ ├── LICENSE │ └── syslinux-100.png ├── mboot.txt ├── memdisk.txt ├── menu.txt ├── pxechn.txt ├── pxelinux.txt ├── rfc5071.txt ├── sdi.txt ├── syslinux.txt └── usbkey.txt ├── dos ├── Makefile ├── __divdi3.c ├── __udivmoddi4.c ├── argv.c ├── atou.c ├── code16.h ├── conio.c ├── crt0.S ├── ctype.h ├── dosexe.ld ├── errno.h ├── free.c ├── getsetsl.c ├── header.S ├── int2526.S ├── inttypes.h ├── ldlinux.S ├── malloc.c ├── malloc.h ├── memcpy.S ├── memmove.S ├── memset.S ├── mystuff.h ├── perror.c ├── printf.c ├── skipatou.c ├── stdint.h ├── stdio.h ├── stdlib.h ├── strchr.c ├── string.h ├── strntoumax.c ├── strtoul.c ├── sysexits.h └── syslinux.c ├── dosutil ├── .gitignore ├── Makefile ├── README ├── copybs.asm ├── eltorito.asm ├── eltorito.txt ├── mdiskchk.c └── mdiskchk.com ├── dummy.c ├── extlinux ├── Makefile ├── btrfs.h ├── fat.h ├── main.c ├── mountinfo.c ├── mountinfo.h └── ntfs.h ├── gen-id.sh ├── gpxe ├── .gitignore ├── COPYING ├── COPYRIGHTS ├── LOG ├── Makefile ├── README ├── VERSION ├── gpxe.diff ├── pxelinux.gpxe ├── pxelinuxk.gpxe └── src │ ├── .gitignore │ ├── Makefile │ ├── Makefile.housekeeping │ ├── arch │ ├── i386 │ │ ├── Makefile │ │ ├── Makefile.efi │ │ ├── Makefile.pcbios │ │ ├── README.i386 │ │ ├── core │ │ │ ├── aout_loader.c │ │ │ ├── basemem_packet.c │ │ │ ├── cpu.c │ │ │ ├── dumpregs.c │ │ │ ├── freebsd_loader.c │ │ │ ├── gdbidt.S │ │ │ ├── gdbmach.c │ │ │ ├── nulltrap.c │ │ │ ├── pic8259.c │ │ │ ├── rdtsc_timer.c │ │ │ ├── relocate.c │ │ │ ├── setjmp.S │ │ │ ├── stack.S │ │ │ ├── stack16.S │ │ │ ├── timer2.c │ │ │ ├── video_subr.c │ │ │ ├── virtaddr.S │ │ │ ├── wince_loader.c │ │ │ └── x86_io.c │ │ ├── drivers │ │ │ └── net │ │ │ │ ├── undi.c │ │ │ │ ├── undiisr.S │ │ │ │ ├── undiload.c │ │ │ │ ├── undinet.c │ │ │ │ ├── undionly.c │ │ │ │ ├── undipreload.c │ │ │ │ └── undirom.c │ │ ├── firmware │ │ │ └── pcbios │ │ │ │ ├── basemem.c │ │ │ │ ├── bios_console.c │ │ │ │ ├── e820mangler.S │ │ │ │ ├── fakee820.c │ │ │ │ ├── gateA20.c │ │ │ │ ├── hidemem.c │ │ │ │ ├── memmap.c │ │ │ │ └── pnpbios.c │ │ ├── hci │ │ │ └── commands │ │ │ │ └── pxe_cmd.c │ │ ├── image │ │ │ ├── bootsector.c │ │ │ ├── bzimage.c │ │ │ ├── com32.c │ │ │ ├── comboot.c │ │ │ ├── elfboot.c │ │ │ ├── eltorito.c │ │ │ ├── multiboot.c │ │ │ ├── nbi.c │ │ │ └── pxe_image.c │ │ ├── include │ │ │ ├── basemem.h │ │ │ ├── basemem_packet.h │ │ │ ├── bios.h │ │ │ ├── bios_disks.h │ │ │ ├── biosint.h │ │ │ ├── bits │ │ │ │ ├── byteswap.h │ │ │ │ ├── compiler.h │ │ │ │ ├── cpu.h │ │ │ │ ├── eltorito.h │ │ │ │ ├── endian.h │ │ │ │ ├── errfile.h │ │ │ │ ├── io.h │ │ │ │ ├── nap.h │ │ │ │ ├── smbios.h │ │ │ │ ├── stdint.h │ │ │ │ ├── timer.h │ │ │ │ ├── uaccess.h │ │ │ │ └── umalloc.h │ │ │ ├── bochs.h │ │ │ ├── bootsector.h │ │ │ ├── bzimage.h │ │ │ ├── comboot.h │ │ │ ├── fakee820.h │ │ │ ├── gateA20.h │ │ │ ├── gdbmach.h │ │ │ ├── gpxe │ │ │ │ ├── abft.h │ │ │ │ ├── bios_nap.h │ │ │ │ ├── bios_smbios.h │ │ │ │ ├── bios_timer.h │ │ │ │ ├── ibft.h │ │ │ │ ├── memtop_umalloc.h │ │ │ │ ├── rdtsc_timer.h │ │ │ │ ├── sbft.h │ │ │ │ ├── timer2.h │ │ │ │ └── x86_io.h │ │ │ ├── int13.h │ │ │ ├── kir.h │ │ │ ├── libkir.h │ │ │ ├── librm.h │ │ │ ├── limits.h │ │ │ ├── memsizes.h │ │ │ ├── multiboot.h │ │ │ ├── pic8259.h │ │ │ ├── pnpbios.h │ │ │ ├── pxe.h │ │ │ ├── pxe_api.h │ │ │ ├── pxe_call.h │ │ │ ├── pxe_types.h │ │ │ ├── pxeparent.h │ │ │ ├── realmode.h │ │ │ ├── registers.h │ │ │ ├── setjmp.h │ │ │ ├── undi.h │ │ │ ├── undiload.h │ │ │ ├── undinet.h │ │ │ ├── undipreload.h │ │ │ ├── undirom.h │ │ │ └── vga.h │ │ ├── interface │ │ │ ├── pcbios │ │ │ │ ├── abft.c │ │ │ │ ├── aoeboot.c │ │ │ │ ├── bios_nap.c │ │ │ │ ├── bios_smbios.c │ │ │ │ ├── bios_timer.c │ │ │ │ ├── biosint.c │ │ │ │ ├── ib_srpboot.c │ │ │ │ ├── ibft.c │ │ │ │ ├── int13.c │ │ │ │ ├── iscsiboot.c │ │ │ │ ├── keepsan.c │ │ │ │ ├── memtop_umalloc.c │ │ │ │ ├── pcibios.c │ │ │ │ └── sbft.c │ │ │ ├── pxe │ │ │ │ ├── pxe_call.c │ │ │ │ ├── pxe_entry.S │ │ │ │ ├── pxe_errors.c │ │ │ │ ├── pxe_file.c │ │ │ │ ├── pxe_loader.c │ │ │ │ ├── pxe_preboot.c │ │ │ │ ├── pxe_tftp.c │ │ │ │ ├── pxe_udp.c │ │ │ │ └── pxe_undi.c │ │ │ ├── pxeparent │ │ │ │ ├── pxeparent.c │ │ │ │ └── pxeparent_dhcp.c │ │ │ └── syslinux │ │ │ │ ├── com32_call.c │ │ │ │ ├── com32_wrapper.S │ │ │ │ ├── comboot_call.c │ │ │ │ └── comboot_resolv.c │ │ ├── kir-Makefile │ │ ├── prefix │ │ │ ├── bootpart.S │ │ │ ├── dskprefix.S │ │ │ ├── hdprefix.S │ │ │ ├── hromprefix.S │ │ │ ├── kkpxeprefix.S │ │ │ ├── kpxeprefix.S │ │ │ ├── libprefix.S │ │ │ ├── lkrnprefix.S │ │ │ ├── mbr.S │ │ │ ├── nbiprefix.S │ │ │ ├── nullprefix.S │ │ │ ├── pxeprefix.S │ │ │ ├── romprefix.S │ │ │ ├── undiloader.S │ │ │ ├── unnrv2b.S │ │ │ ├── unnrv2b16.S │ │ │ ├── usbdisk.S │ │ │ └── xromprefix.S │ │ ├── scripts │ │ │ ├── i386-kir.lds │ │ │ └── i386.lds │ │ └── transitions │ │ │ ├── libkir.S │ │ │ ├── libpm.S │ │ │ ├── librm.S │ │ │ └── librm_mgmt.c │ ├── x86 │ │ ├── Makefile │ │ ├── Makefile.efi │ │ ├── core │ │ │ ├── pcidirect.c │ │ │ └── x86_string.c │ │ ├── include │ │ │ ├── bits │ │ │ │ ├── pci_io.h │ │ │ │ └── string.h │ │ │ └── gpxe │ │ │ │ ├── efi │ │ │ │ └── efix86_nap.h │ │ │ │ ├── pcibios.h │ │ │ │ └── pcidirect.h │ │ ├── interface │ │ │ └── efi │ │ │ │ └── efix86_nap.c │ │ ├── prefix │ │ │ ├── efidrvprefix.c │ │ │ └── efiprefix.c │ │ └── scripts │ │ │ └── efi.lds │ └── x86_64 │ │ ├── Makefile │ │ ├── Makefile.efi │ │ └── include │ │ ├── bits │ │ ├── byteswap.h │ │ ├── compiler.h │ │ ├── endian.h │ │ ├── errfile.h │ │ ├── io.h │ │ ├── nap.h │ │ ├── smbios.h │ │ ├── stdint.h │ │ ├── timer.h │ │ ├── uaccess.h │ │ └── umalloc.h │ │ ├── gdbmach.h │ │ └── limits.h │ ├── config │ ├── .gitignore │ ├── config.c │ ├── config_net80211.c │ ├── config_romprefix.c │ ├── console.h │ ├── defaults.h │ ├── defaults │ │ ├── efi.h │ │ └── pcbios.h │ ├── general.h │ ├── ioapi.h │ ├── isa.h │ ├── nap.h │ ├── serial.h │ ├── timer.h │ └── umalloc.h │ ├── core │ ├── acpi.c │ ├── ansiesc.c │ ├── asprintf.c │ ├── base64.c │ ├── basename.c │ ├── bitmap.c │ ├── bitops.c │ ├── btext.c │ ├── console.c │ ├── cpio.c │ ├── ctype.c │ ├── cwuri.c │ ├── debug.c │ ├── device.c │ ├── downloader.c │ ├── errno.c │ ├── exec.c │ ├── filter.c │ ├── gdbserial.c │ ├── gdbstub.c │ ├── gdbudp.c │ ├── getkey.c │ ├── getopt.c │ ├── hw.c │ ├── i82365.c │ ├── image.c │ ├── init.c │ ├── interface.c │ ├── iobuf.c │ ├── job.c │ ├── linebuf.c │ ├── main.c │ ├── malloc.c │ ├── misc.c │ ├── monojob.c │ ├── null_nap.c │ ├── nvo.c │ ├── open.c │ ├── pc_kbd.c │ ├── pcmcia.c │ ├── posix_io.c │ ├── process.c │ ├── proto_eth_slow.c │ ├── random.c │ ├── refcnt.c │ ├── resolv.c │ ├── serial.c │ ├── serial_console.c │ ├── settings.c │ ├── string.c │ ├── stringextra.c │ ├── timer.c │ ├── uri.c │ ├── uuid.c │ ├── vsprintf.c │ └── xfer.c │ ├── crypto │ ├── aes_wrap.c │ ├── arc4.c │ ├── asn1.c │ ├── axtls │ │ ├── aes.c │ │ ├── bigint.c │ │ ├── bigint.h │ │ ├── bigint_impl.h │ │ ├── crypto.h │ │ ├── os_port.h │ │ ├── rsa.c │ │ └── sha1.c │ ├── axtls_aes.c │ ├── axtls_sha1.c │ ├── cbc.c │ ├── chap.c │ ├── crandom.c │ ├── crc32.c │ ├── crypto_null.c │ ├── hmac.c │ ├── md5.c │ ├── sha1extra.c │ └── x509.c │ ├── doc │ ├── build_sys.dox │ └── pxe_extensions │ ├── doxygen.cfg │ ├── drivers │ ├── bitbash │ │ ├── bitbash.c │ │ ├── i2c_bit.c │ │ └── spi_bit.c │ ├── block │ │ ├── ata.c │ │ ├── ramdisk.c │ │ ├── scsi.c │ │ └── srp.c │ ├── bus │ │ ├── eisa.c │ │ ├── isa.c │ │ ├── isa_ids.c │ │ ├── isapnp.c │ │ ├── mca.c │ │ ├── pci.c │ │ ├── pcibackup.c │ │ ├── pciextra.c │ │ ├── virtio-pci.c │ │ └── virtio-ring.c │ ├── infiniband │ │ ├── MT25218_PRM.h │ │ ├── MT25408_PRM.h │ │ ├── arbel.c │ │ ├── arbel.h │ │ ├── hermon.c │ │ ├── hermon.h │ │ ├── linda.c │ │ ├── linda.h │ │ ├── linda_fw.c │ │ ├── mlx_bitops.h │ │ ├── qib_7220_regs.h │ │ └── qib_genbits.pl │ ├── net │ │ ├── 3c503.c │ │ ├── 3c509-eisa.c │ │ ├── 3c509.c │ │ ├── 3c509.h │ │ ├── 3c515.c │ │ ├── 3c515.txt │ │ ├── 3c529.c │ │ ├── 3c595.c │ │ ├── 3c595.h │ │ ├── 3c5x9.c │ │ ├── 3c90x.c │ │ ├── 3c90x.h │ │ ├── amd8111e.c │ │ ├── amd8111e.h │ │ ├── ath5k │ │ │ ├── ath5k.c │ │ │ ├── ath5k.h │ │ │ ├── ath5k_attach.c │ │ │ ├── ath5k_caps.c │ │ │ ├── ath5k_desc.c │ │ │ ├── ath5k_dma.c │ │ │ ├── ath5k_eeprom.c │ │ │ ├── ath5k_gpio.c │ │ │ ├── ath5k_initvals.c │ │ │ ├── ath5k_pcu.c │ │ │ ├── ath5k_phy.c │ │ │ ├── ath5k_qcu.c │ │ │ ├── ath5k_reset.c │ │ │ ├── ath5k_rfkill.c │ │ │ ├── base.h │ │ │ ├── desc.h │ │ │ ├── eeprom.h │ │ │ ├── reg.h │ │ │ ├── rfbuffer.h │ │ │ └── rfgain.h │ │ ├── atl1e.c │ │ ├── atl1e.h │ │ ├── b44.c │ │ ├── b44.h │ │ ├── bnx2.c │ │ ├── bnx2.h │ │ ├── bnx2_fw.h │ │ ├── cs89x0.c │ │ ├── cs89x0.h │ │ ├── cs89x0.txt │ │ ├── davicom.c │ │ ├── depca.c │ │ ├── dmfe.c │ │ ├── e1000 │ │ │ ├── e1000.c │ │ │ ├── e1000.h │ │ │ ├── e1000_hw.c │ │ │ ├── e1000_hw.h │ │ │ └── e1000_osdep.h │ │ ├── eepro.c │ │ ├── eepro100.c │ │ ├── eepro100.h │ │ ├── epic100.c │ │ ├── epic100.h │ │ ├── etherfabric.c │ │ ├── etherfabric.h │ │ ├── etherfabric_nic.h │ │ ├── forcedeth.c │ │ ├── hfa384x.h │ │ ├── ipoib.c │ │ ├── legacy.c │ │ ├── mtd80x.c │ │ ├── mtnic.c │ │ ├── mtnic.h │ │ ├── myri10ge.c │ │ ├── myri10ge_mcp.h │ │ ├── natsemi.c │ │ ├── natsemi.h │ │ ├── ne.c │ │ ├── ne2k_isa.c │ │ ├── ns83820.c │ │ ├── ns8390.c │ │ ├── ns8390.h │ │ ├── p80211hdr.h │ │ ├── pcnet32.c │ │ ├── phantom │ │ │ ├── nx_bitops.h │ │ │ ├── nxhal_nic_interface.h │ │ │ ├── phantom.c │ │ │ ├── phantom.h │ │ │ └── phantom_hw.h │ │ ├── pnic.c │ │ ├── pnic_api.h │ │ ├── prism2.c │ │ ├── prism2_pci.c │ │ ├── prism2_plx.c │ │ ├── r8169.c │ │ ├── r8169.h │ │ ├── rtl8139.c │ │ ├── rtl818x │ │ │ ├── rtl8180.c │ │ │ ├── rtl8180_grf5101.c │ │ │ ├── rtl8180_max2820.c │ │ │ ├── rtl8180_sa2400.c │ │ │ ├── rtl8185.c │ │ │ ├── rtl8185_rtl8225.c │ │ │ ├── rtl818x.c │ │ │ └── rtl818x.h │ │ ├── sis190.c │ │ ├── sis190.h │ │ ├── sis900.c │ │ ├── sis900.h │ │ ├── skge.c │ │ ├── skge.h │ │ ├── sky2.c │ │ ├── sky2.h │ │ ├── smc9000.c │ │ ├── smc9000.h │ │ ├── sundance.c │ │ ├── tg3.c │ │ ├── tg3.h │ │ ├── tlan.c │ │ ├── tlan.h │ │ ├── tulip.c │ │ ├── tulip.txt │ │ ├── via-rhine.c │ │ ├── via-velocity.c │ │ ├── via-velocity.h │ │ ├── virtio-net.c │ │ ├── virtio-net.h │ │ ├── w89c840.c │ │ ├── wd.c │ │ └── wlan_compat.h │ └── nvs │ │ ├── nvs.c │ │ ├── spi.c │ │ └── threewire.c │ ├── hci │ ├── commands │ │ ├── autoboot_cmd.c │ │ ├── config_cmd.c │ │ ├── dhcp_cmd.c │ │ ├── digest_cmd.c │ │ ├── gdbstub_cmd.c │ │ ├── ifmgmt_cmd.c │ │ ├── image_cmd.c │ │ ├── iwmgmt_cmd.c │ │ ├── login_cmd.c │ │ ├── nvo_cmd.c │ │ ├── route_cmd.c │ │ ├── sanboot_cmd.c │ │ └── time_cmd.c │ ├── editstring.c │ ├── mucurses │ │ ├── alert.c │ │ ├── ansi_screen.c │ │ ├── clear.c │ │ ├── colour.c │ │ ├── cursor.h │ │ ├── edging.c │ │ ├── kb.c │ │ ├── mucurses.c │ │ ├── mucurses.h │ │ ├── print.c │ │ ├── print_nadv.c │ │ ├── slk.c │ │ ├── widgets │ │ │ └── editbox.c │ │ ├── winattrs.c │ │ ├── windows.c │ │ └── wininit.c │ ├── readline.c │ ├── shell.c │ ├── shell_banner.c │ ├── strerror.c │ ├── tui │ │ ├── login_ui.c │ │ └── settings_ui.c │ └── wireless_errors.c │ ├── image │ ├── efi_image.c │ ├── elf.c │ ├── embedded.c │ ├── script.c │ └── segment.c │ ├── include │ ├── .gitignore │ ├── alloca.h │ ├── assert.h │ ├── big_bswap.h │ ├── bootp.h │ ├── btext.h │ ├── byteswap.h │ ├── cmdline.h │ ├── cmdlinelib.h │ ├── cmdlist.h │ ├── coff.h │ ├── compiler.h │ ├── console.h │ ├── cpu.h │ ├── ctype.h │ ├── curses.h │ ├── elf.h │ ├── endian.h │ ├── errno.h │ ├── etherboot.h │ ├── fs.h │ ├── getopt.h │ ├── gpxe │ │ ├── acpi.h │ │ ├── aes.h │ │ ├── ansiesc.h │ │ ├── aoe.h │ │ ├── api.h │ │ ├── arc4.h │ │ ├── arp.h │ │ ├── asn1.h │ │ ├── ata.h │ │ ├── base64.h │ │ ├── bitbash.h │ │ ├── bitmap.h │ │ ├── bitops.h │ │ ├── blockdev.h │ │ ├── cbc.h │ │ ├── chap.h │ │ ├── command.h │ │ ├── cpio.h │ │ ├── crc32.h │ │ ├── crypto.h │ │ ├── device.h │ │ ├── dhcp.h │ │ ├── dhcpopts.h │ │ ├── dhcppkt.h │ │ ├── dns.h │ │ ├── downloader.h │ │ ├── eapol.h │ │ ├── editbox.h │ │ ├── editstring.h │ │ ├── efi │ │ │ ├── Base.h │ │ │ ├── Guid │ │ │ │ ├── PcAnsi.h │ │ │ │ └── SmBios.h │ │ │ ├── Ia32 │ │ │ │ └── ProcessorBind.h │ │ │ ├── IndustryStandard │ │ │ │ ├── Pci22.h │ │ │ │ └── PeImage.h │ │ │ ├── LICENCE │ │ │ ├── Pi │ │ │ │ ├── PiBootMode.h │ │ │ │ ├── PiDependency.h │ │ │ │ ├── PiDxeCis.h │ │ │ │ ├── PiFirmwareFile.h │ │ │ │ ├── PiFirmwareVolume.h │ │ │ │ ├── PiHob.h │ │ │ │ └── PiMultiPhase.h │ │ │ ├── PiDxe.h │ │ │ ├── ProcessorBind.h │ │ │ ├── Protocol │ │ │ │ ├── ComponentName2.h │ │ │ │ ├── Cpu.h │ │ │ │ ├── CpuIo.h │ │ │ │ ├── DebugSupport.h │ │ │ │ ├── DevicePath.h │ │ │ │ ├── DriverBinding.h │ │ │ │ ├── NetworkInterfaceIdentifier.h │ │ │ │ ├── PciIo.h │ │ │ │ ├── PciRootBridgeIo.h │ │ │ │ ├── SimpleNetwork.h │ │ │ │ ├── SimpleTextIn.h │ │ │ │ └── SimpleTextOut.h │ │ │ ├── Uefi.h │ │ │ ├── Uefi │ │ │ │ ├── UefiBaseType.h │ │ │ │ ├── UefiGpt.h │ │ │ │ ├── UefiInternalFormRepresentation.h │ │ │ │ ├── UefiMultiPhase.h │ │ │ │ ├── UefiPxe.h │ │ │ │ └── UefiSpec.h │ │ │ ├── X64 │ │ │ │ └── ProcessorBind.h │ │ │ ├── efi.h │ │ │ ├── efi_io.h │ │ │ ├── efi_pci.h │ │ │ ├── efi_smbios.h │ │ │ ├── efi_timer.h │ │ │ ├── efi_uaccess.h │ │ │ ├── efi_umalloc.h │ │ │ └── import.pl │ │ ├── eisa.h │ │ ├── elf.h │ │ ├── errfile.h │ │ ├── errortab.h │ │ ├── ethernet.h │ │ ├── fakedhcp.h │ │ ├── features.h │ │ ├── filter.h │ │ ├── ftp.h │ │ ├── gdbserial.h │ │ ├── gdbstub.h │ │ ├── gdbudp.h │ │ ├── hidemem.h │ │ ├── hmac.h │ │ ├── http.h │ │ ├── i2c.h │ │ ├── ib_cm.h │ │ ├── ib_cmrc.h │ │ ├── ib_mad.h │ │ ├── ib_mcast.h │ │ ├── ib_mi.h │ │ ├── ib_packet.h │ │ ├── ib_pathrec.h │ │ ├── ib_sma.h │ │ ├── ib_smc.h │ │ ├── ib_srp.h │ │ ├── icmp.h │ │ ├── icmp6.h │ │ ├── ieee80211.h │ │ ├── if_arp.h │ │ ├── if_ether.h │ │ ├── image.h │ │ ├── in.h │ │ ├── infiniband.h │ │ ├── init.h │ │ ├── interface.h │ │ ├── io.h │ │ ├── iobuf.h │ │ ├── ip.h │ │ ├── ip6.h │ │ ├── ipoib.h │ │ ├── isa.h │ │ ├── isa_ids.h │ │ ├── isapnp.h │ │ ├── iscsi.h │ │ ├── job.h │ │ ├── keys.h │ │ ├── linebuf.h │ │ ├── linux_compat.h │ │ ├── list.h │ │ ├── login_ui.h │ │ ├── malloc.h │ │ ├── mca.h │ │ ├── md5.h │ │ ├── memmap.h │ │ ├── monojob.h │ │ ├── nap.h │ │ ├── ndp.h │ │ ├── net80211.h │ │ ├── netdevice.h │ │ ├── null_nap.h │ │ ├── nvo.h │ │ ├── nvs.h │ │ ├── open.h │ │ ├── pci.h │ │ ├── pci_ids.h │ │ ├── pci_io.h │ │ ├── pcibackup.h │ │ ├── posix_io.h │ │ ├── process.h │ │ ├── profile.h │ │ ├── ramdisk.h │ │ ├── rarp.h │ │ ├── rc80211.h │ │ ├── refcnt.h │ │ ├── resolv.h │ │ ├── retry.h │ │ ├── rotate.h │ │ ├── rsa.h │ │ ├── sanboot.h │ │ ├── scsi.h │ │ ├── sec80211.h │ │ ├── segment.h │ │ ├── serial.h │ │ ├── settings.h │ │ ├── settings_ui.h │ │ ├── sha1.h │ │ ├── shell.h │ │ ├── shell_banner.h │ │ ├── smbios.h │ │ ├── socket.h │ │ ├── spi.h │ │ ├── spi_bit.h │ │ ├── srp.h │ │ ├── tables.h │ │ ├── tcp.h │ │ ├── tcpip.h │ │ ├── tftp.h │ │ ├── threewire.h │ │ ├── timer.h │ │ ├── tls.h │ │ ├── uaccess.h │ │ ├── udp.h │ │ ├── umalloc.h │ │ ├── uri.h │ │ ├── uuid.h │ │ ├── virtio-pci.h │ │ ├── virtio-ring.h │ │ ├── vsprintf.h │ │ ├── wpa.h │ │ ├── x509.h │ │ └── xfer.h │ ├── hci │ │ └── ifmgmt_cmd.h │ ├── i82365.h │ ├── libgen.h │ ├── little_bswap.h │ ├── mii.h │ ├── nic.h │ ├── old_tcp.h │ ├── pc_kbd.h │ ├── pcmcia-opts.h │ ├── pcmcia.h │ ├── readline │ │ └── readline.h │ ├── stdarg.h │ ├── stddef.h │ ├── stdint.h │ ├── stdio.h │ ├── stdlib.h │ ├── string.h │ ├── strings.h │ ├── sys │ │ └── time.h │ ├── sys_info.h │ ├── time.h │ ├── unistd.h │ └── usr │ │ ├── autoboot.h │ │ ├── dhcpmgmt.h │ │ ├── ifmgmt.h │ │ ├── imgmgmt.h │ │ ├── iwmgmt.h │ │ └── route.h │ ├── interface │ ├── efi │ │ ├── efi_console.c │ │ ├── efi_init.c │ │ ├── efi_io.c │ │ ├── efi_pci.c │ │ ├── efi_smbios.c │ │ ├── efi_snp.c │ │ ├── efi_strerror.c │ │ ├── efi_timer.c │ │ ├── efi_uaccess.c │ │ └── efi_umalloc.c │ └── smbios │ │ ├── smbios.c │ │ └── smbios_settings.c │ ├── libgcc │ ├── __divdi3.c │ ├── __moddi3.c │ ├── __udivdi3.c │ ├── __udivmoddi4.c │ ├── __umoddi3.c │ ├── icc.c │ ├── libgcc.h │ └── memcpy.c │ ├── net │ ├── 80211 │ │ ├── net80211.c │ │ ├── rc80211.c │ │ ├── sec80211.c │ │ ├── wep.c │ │ ├── wpa.c │ │ ├── wpa_ccmp.c │ │ ├── wpa_psk.c │ │ └── wpa_tkip.c │ ├── aoe.c │ ├── arp.c │ ├── cachedhcp.c │ ├── dhcpopts.c │ ├── dhcppkt.c │ ├── eapol.c │ ├── ethernet.c │ ├── fakedhcp.c │ ├── icmp.c │ ├── icmpv6.c │ ├── infiniband.c │ ├── infiniband │ │ ├── ib_cm.c │ │ ├── ib_cmrc.c │ │ ├── ib_mcast.c │ │ ├── ib_mi.c │ │ ├── ib_packet.c │ │ ├── ib_pathrec.c │ │ ├── ib_sma.c │ │ ├── ib_smc.c │ │ └── ib_srp.c │ ├── iobpad.c │ ├── ipv4.c │ ├── ipv6.c │ ├── mii.c │ ├── ndp.c │ ├── netdev_settings.c │ ├── netdevice.c │ ├── nullnet.c │ ├── rarp.c │ ├── retry.c │ ├── tcp.c │ ├── tcp │ │ ├── ftp.c │ │ ├── http.c │ │ ├── https.c │ │ └── iscsi.c │ ├── tcpip.c │ ├── tls.c │ ├── udp.c │ └── udp │ │ ├── dhcp.c │ │ ├── dns.c │ │ ├── slam.c │ │ └── tftp.c │ ├── tests │ ├── comboot │ │ ├── shuffle-simple.asm │ │ └── version.asm │ ├── gdbstub_test.S │ ├── gdbstub_test.gdb │ ├── linebuf_test.c │ ├── memcpy_test.c │ ├── umalloc_test.c │ └── uri_test.c │ ├── usr │ ├── autoboot.c │ ├── dhcpmgmt.c │ ├── ifmgmt.c │ ├── imgmgmt.c │ ├── iwmgmt.c │ ├── pxemenu.c │ └── route.c │ └── util │ ├── .gitignore │ ├── Makefile │ ├── Option │ └── ROM.pm │ ├── catrom.pl │ ├── diffsize.pl │ ├── disrom.pl │ ├── efirom.c │ ├── elf2efi.c │ ├── geniso │ ├── genliso │ ├── gensdsk │ ├── get-pci-ids │ ├── hijack.c │ ├── iccfix.c │ ├── licence.pl │ ├── makerom.pl │ ├── mergerom.pl │ ├── modrom.pl │ ├── mucurses_test.c │ ├── nrv2b.c │ ├── padimg.pl │ ├── parserom.pl │ ├── sortobjdump.pl │ ├── swapdevids.pl │ ├── symcheck.pl │ └── zbin.c ├── libfat ├── cache.c ├── fat.h ├── fatchain.c ├── libfat.h ├── libfatint.h ├── open.c ├── searchdir.c └── ulint.h ├── libinstaller ├── Makefile ├── advconst.h ├── advio.c ├── bin2c.pl ├── ext2fs │ └── ext2_fs.h ├── fs.c ├── getopt │ ├── getopt.h │ └── getopt_long.c ├── linux │ ├── fiemap.h │ └── loop.h ├── linuxioctl.h ├── setadv.c ├── setadv.h ├── syslinux.h ├── syslxcom.c ├── syslxcom.h ├── syslxfs.h ├── syslxint.h ├── syslxmod.c ├── syslxopt.c └── syslxopt.h ├── linux ├── Makefile └── syslinux.c ├── lzo ├── .gitignore ├── LZO.TXT ├── Makefile ├── include │ └── lzo │ │ ├── lzo1.h │ │ ├── lzo1a.h │ │ ├── lzo1b.h │ │ ├── lzo1c.h │ │ ├── lzo1f.h │ │ ├── lzo1x.h │ │ ├── lzo1y.h │ │ ├── lzo1z.h │ │ ├── lzo2a.h │ │ ├── lzo_asm.h │ │ ├── lzoconf.h │ │ ├── lzodefs.h │ │ └── lzoutil.h ├── prepcore.c └── src │ ├── compr1b.h │ ├── compr1c.h │ ├── config1x.h │ ├── lzo1_d.ch │ ├── lzo1x_1.c │ ├── lzo1x_1k.c │ ├── lzo1x_1l.c │ ├── lzo1x_1o.c │ ├── lzo1x_9x.c │ ├── lzo1x_c.ch │ ├── lzo1x_d.ch │ ├── lzo1x_d1.c │ ├── lzo1x_d2.c │ ├── lzo1x_d3.c │ ├── lzo1x_o.c │ ├── lzo1x_oo.ch │ ├── lzo_conf.h │ ├── lzo_crc.c │ ├── lzo_dict.h │ ├── lzo_dll.ch │ ├── lzo_init.c │ ├── lzo_mchw.ch │ ├── lzo_ptr.c │ ├── lzo_ptr.h │ ├── lzo_str.c │ ├── lzo_swd.ch │ ├── lzo_util.c │ ├── miniacc.h │ ├── stats1a.h │ ├── stats1b.h │ └── stats1c.h ├── man ├── extlinux.1 ├── gethostip.1 ├── lss16toppm.1 ├── ppmtolss16.1 ├── syslinux.1 └── syslinux2ansi.1 ├── mbr ├── Makefile ├── adjust.h ├── altmbr.S ├── checksize.pl ├── gptmbr.S ├── isohdpfx.S ├── isohdppx.S ├── mbr.S ├── mbr.ld └── oldmbr.asm ├── memdisk ├── Makefile ├── acpi.h ├── bda.h ├── compiler.h ├── conio.c ├── conio.h ├── ctypes.c ├── dskprobe.c ├── dskprobe.h ├── e820.h ├── e820data ├── e820func.c ├── e820test.c ├── eltorito.c ├── eltorito.h ├── fdgeo.pl ├── inflate.c ├── memcpy.S ├── memdisk.h ├── memdisk.inc ├── memdisk.ld ├── memdisk16.asm ├── memdisk_chs_512.asm ├── memdisk_edd_512.asm ├── memdisk_iso_2048.asm ├── memdisk_iso_512.asm ├── memmove.S ├── memset.S ├── msetup.c ├── mstructs.h ├── postprocess.pl ├── setup.c ├── start32.S ├── strntoumax.c ├── strtoull.c ├── strtox.c ├── suffix_number.c ├── testdata1 ├── testdata2 ├── testdata3 ├── unzip.c └── version.h ├── memdump ├── Makefile ├── README ├── __divdi3.c ├── __udivmoddi4.c ├── argv.c ├── code16.h ├── com16.ld ├── conio.c ├── crt0.S ├── errno.h ├── file.h ├── inttypes.h ├── io.h ├── main.c ├── malloc.h ├── memcpy.S ├── memset.S ├── mystuff.h ├── printf.c ├── serial.c ├── skipatou.c ├── srecsend.c ├── srecsend.h ├── stdbool.h ├── stdint.h ├── stdio.h ├── stdlib.h ├── string.h ├── strtoul.c ├── ymodem.txt ├── ymsend.c └── ymsend.h ├── mime └── image │ └── x-lss16.xml ├── mk ├── build.mk ├── com32.mk ├── devel.mk ├── embedded.mk ├── lib.mk ├── rosh.mk └── syslinux.mk ├── modules ├── Makefile ├── int18.asm ├── poweroff.asm ├── pxechain.asm └── ver.asm ├── mtools ├── Makefile └── syslinux.c ├── now.pl ├── sample ├── Makefile ├── m16-640x640-syslinux.jpg ├── sample.msg ├── syslinux_splash.jpg └── syslogo.ppm.gz ├── syslinux.spec.in ├── utils ├── Makefile ├── bin2hex.pl ├── gethostip.c ├── isohdpfxarray.pl ├── isohybrid.c ├── isohybrid.h ├── isohybrid.in ├── keytab-lilo ├── lss16toppm ├── md5pass ├── memdiskfind.c ├── mkdiskimage.in ├── ppmtolss16 ├── pxelinux-options ├── sha1pass └── syslinux2ansi ├── version ├── version.pl ├── win ├── hello.c ├── ntfssect.c ├── ntfssect.h ├── ntfstest.c ├── ntfstest.rc ├── sysexits.h └── syslinux.c ├── win32 ├── Makefile ├── README ├── find-mingw32.sh └── ntfstest │ └── Makefile └── win64 ├── Makefile ├── README ├── find-mingw64.sh └── ntfstest └── Makefile /.gitignore: -------------------------------------------------------------------------------- 1 | *.0 2 | *.a 3 | *.bin 4 | *.bss 5 | *.c32 6 | *.com 7 | *.cp 8 | *.d 9 | *.elf 10 | *.exe 11 | *.gen 12 | *.img 13 | *.img.xz 14 | *.lib 15 | *.lnx 16 | *.lo 17 | *.lsr 18 | *.lst 19 | *.map 20 | *.o 21 | *.obj 22 | *.orig 23 | *.raw 24 | *.rej 25 | *.s 26 | *.sec 27 | *.sys 28 | *_bin.c 29 | *~ 30 | \#* 31 | .\#* 32 | .depend 33 | /com32/lib/sys/vesa/alphatbl.c 34 | /diag/geodsp/mk-lba-img 35 | /extlinux/extlinux 36 | /memdisk/memdisk 37 | /mtools/syslinux 38 | /release 39 | /sample/syslogo.lss 40 | /linux/syslinux 41 | /linux/syslinux-nomtools 42 | /utils/gethostip 43 | /utils/isohdpfx.c 44 | /utils/isohybrid 45 | /utils/isohybrid.pl 46 | /utils/memdiskfind 47 | /utils/mkdiskimage 48 | /version.h 49 | /version.mk 50 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | This is an unmodified replica of syslinux repo from 2 | git://git.kernel.org/pub/scm/boot/syslinux/syslinux.git. There is no active 3 | development done here. 4 | -------------------------------------------------------------------------------- /codepage/Makefile: -------------------------------------------------------------------------------- 1 | PERL = perl 2 | CPSRC = $(wildcard *.txt) 3 | GENFILES = $(patsubst %.txt,%.cp,$(CPSRC)) 4 | 5 | .SUFFIXES: .txt .cp 6 | 7 | all: $(GENFILES) 8 | 9 | # This generates codepage files where the display and filesystem 10 | # codepages are both the same. 11 | %.cp: %.txt cptable.pl UnicodeData 12 | $(PERL) cptable.pl UnicodeData $< $< $@ 13 | 14 | tidy: 15 | rm -f *.cp *.bin 16 | 17 | clean: tidy 18 | 19 | dist: tidy 20 | 21 | spotless: clean 22 | -------------------------------------------------------------------------------- /com32/Makefile: -------------------------------------------------------------------------------- 1 | SUBDIRS = libupload tools lib gpllib libutil modules mboot menu samples rosh cmenu \ 2 | hdt gfxboot sysdump lua/src chain 3 | 4 | all tidy dist clean spotless install: 5 | set -e; for d in $(SUBDIRS); do $(MAKE) -C $$d $@; done 6 | -------------------------------------------------------------------------------- /com32/chain/chain.h: -------------------------------------------------------------------------------- 1 | #ifndef _COM32_CHAIN_CHAIN_H 2 | #define _COM32_CHAIN_CHAIN_H 3 | 4 | #include 5 | 6 | struct data_area { 7 | void *data; 8 | addr_t base; 9 | addr_t size; 10 | }; 11 | 12 | #endif 13 | 14 | /* vim: set ts=8 sts=4 sw=4 noet: */ 15 | -------------------------------------------------------------------------------- /com32/chain/common.h: -------------------------------------------------------------------------------- 1 | #ifndef _COM32_CHAIN_COMMON_H 2 | #define _COM32_CHAIN_COMMON_H 3 | 4 | #define ADDRMAX 0x9EFFFu 5 | #define ADDRMIN 0x500u 6 | 7 | #endif 8 | 9 | /* vim: set ts=8 sts=4 sw=4 noet: */ 10 | -------------------------------------------------------------------------------- /com32/cmenu/.gitignore: -------------------------------------------------------------------------------- 1 | test.c 2 | test2.c 3 | -------------------------------------------------------------------------------- /com32/cmenu/TODO: -------------------------------------------------------------------------------- 1 | * Write COMBOOT code to read .menu files and parse them directly 2 | - take the name of menu file to parse from commandline 3 | -------------------------------------------------------------------------------- /com32/cmenu/libmenu/des.h: -------------------------------------------------------------------------------- 1 | 2 | #ifndef _DES_H_ 3 | #define _DES_H_ 4 | 5 | // des crypt 6 | extern char *crypt(const char *key, const char *salt); 7 | 8 | #endif 9 | -------------------------------------------------------------------------------- /com32/cmenu/password: -------------------------------------------------------------------------------- 1 | # This file should be available as /isolinux/password 2 | # for complex.c to use. 3 | # 4 | # All lines starting with # and empty lines are ignored 5 | # 6 | # All non-comment lines here are of the form 7 | # USERNAME:PWDHASH:PERM1:PERM2:...: 8 | # 9 | # where USERNAME is maximum of 12 chars, 10 | # PWDHASH is maximum of 40 chars (DES ENCRYPTED) 11 | # PERM1,... are arbitrary strings 12 | # 13 | # The current lines correspond to 14 | # user1:secret1, user2:secret2, user3:secret3 15 | 16 | user1:LcMRo3YZGtP0c:editcmd 17 | user2:FqewzyxP78a7A: 18 | user3:MKjmc.IHoXBNU:root 19 | -------------------------------------------------------------------------------- /com32/gdbstub/serial.h: -------------------------------------------------------------------------------- 1 | #ifndef _GPXE_SERIAL_H 2 | #define _GPXE_SERIAL_H 3 | 4 | /** @file 5 | * 6 | * Serial driver functions 7 | * 8 | */ 9 | 10 | extern void serial_putc(int ch); 11 | extern int serial_getc(void); 12 | extern void serial_init(void); 13 | 14 | #endif /* _GPXE_SERIAL_H */ 15 | -------------------------------------------------------------------------------- /com32/gfxboot/.gitignore: -------------------------------------------------------------------------------- 1 | *.tmp 2 | -------------------------------------------------------------------------------- /com32/gplinclude/README: -------------------------------------------------------------------------------- 1 | Put header files for LGPL or GPL library functions in this directory. 2 | -------------------------------------------------------------------------------- /com32/gplinclude/disk/bootloaders.h: -------------------------------------------------------------------------------- 1 | /* ----------------------------------------------------------------------- * 2 | * 3 | * Copyright 2009 Pierre-Alexandre Meyer 4 | * 5 | * This file is part of Syslinux, and is made available under 6 | * the terms of the GNU General Public License version 2. 7 | * 8 | * ----------------------------------------------------------------------- */ 9 | 10 | #ifndef __BOOTLOADERS_H_ 11 | #define __BOOTLOADERS_H_ 12 | 13 | #include 14 | #include 15 | #include 16 | 17 | int get_bootloader_string(struct driveinfo *, const struct part_entry *, 18 | char *, const int); 19 | #endif /* __BOOTLOADERS_H_ */ 20 | -------------------------------------------------------------------------------- /com32/gplinclude/disk/error.h: -------------------------------------------------------------------------------- 1 | /* ----------------------------------------------------------------------- * 2 | * 3 | * Copyright 2009 Pierre-Alexandre Meyer 4 | * 5 | * This file is part of Syslinux, and is made available under 6 | * the terms of the GNU General Public License version 2. 7 | * 8 | * ----------------------------------------------------------------------- */ 9 | 10 | #ifndef _ERROR_H_ 11 | #define _ERROR_H_ 12 | void get_error(const char *); 13 | #endif /* _ERROR_H_ */ 14 | -------------------------------------------------------------------------------- /com32/gplinclude/disk/mbrs.h: -------------------------------------------------------------------------------- 1 | /* ----------------------------------------------------------------------- * 2 | * 3 | * Copyright 2009 Pierre-Alexandre Meyer 4 | * 5 | * This file is part of Syslinux, and is made available under 6 | * the terms of the GNU General Public License version 2. 7 | * 8 | * ----------------------------------------------------------------------- */ 9 | 10 | #ifndef __MBRS_H_ 11 | #define __MBRS_H_ 12 | 13 | #include 14 | #include 15 | 16 | void get_mbr_string(const uint32_t, void *, const int); 17 | uint32_t get_mbr_id(const struct driveinfo *); 18 | #endif /* __MBRS_H_ */ 19 | -------------------------------------------------------------------------------- /com32/gplinclude/disk/msdos.h: -------------------------------------------------------------------------------- 1 | /* ----------------------------------------------------------------------- * 2 | * 3 | * Copyright 2009 Pierre-Alexandre Meyer 4 | * 5 | * This file is part of Syslinux, and is made available under 6 | * the terms of the GNU General Public License version 2. 7 | * 8 | * ----------------------------------------------------------------------- */ 9 | 10 | #ifndef _MSDOS_H_ 11 | #define _MSDOS_H_ 12 | 13 | #include 14 | #include 15 | 16 | typedef void (*p_callback) (struct driveinfo *, struct part_entry *, int, int); 17 | int parse_partition_table(struct driveinfo *, p_callback); 18 | 19 | #endif /* _MSDOS_H_ */ 20 | -------------------------------------------------------------------------------- /com32/gplinclude/disk/read.h: -------------------------------------------------------------------------------- 1 | /* ----------------------------------------------------------------------- * 2 | * 3 | * Copyright 2009 Pierre-Alexandre Meyer 4 | * 5 | * This file is part of Syslinux, and is made available under 6 | * the terms of the GNU General Public License version 2. 7 | * 8 | * ----------------------------------------------------------------------- */ 9 | 10 | #ifndef _READ_H_ 11 | #define _READ_H_ 12 | 13 | #include 14 | 15 | int read_mbr(int, void *); 16 | int dev_read(int, void *, unsigned int, int); 17 | int read_sectors(struct driveinfo *, void *, const unsigned int, const int); 18 | #endif /* _READ_H */ 19 | -------------------------------------------------------------------------------- /com32/gplinclude/disk/swsusp.h: -------------------------------------------------------------------------------- 1 | #ifndef _SWSUSP_H_ 2 | #define _SWSUSP_H_ 3 | 4 | #include 5 | #include 6 | #include 7 | 8 | #define SWSUSP_SIG "S1SUSPEND" 9 | 10 | struct swsusp_header { 11 | char reserved[PAGE_SIZE - 20 - sizeof(unsigned long) - sizeof(int)]; 12 | unsigned long image; 13 | unsigned int flags; /* Flags to pass to the "boot" kernel */ 14 | char orig_sig[10]; 15 | char sig[10]; 16 | } __attribute__ ((packed)); 17 | 18 | int swsusp_check(struct driveinfo *, struct part_entry *); 19 | #endif /* _SWSUSP_H */ 20 | -------------------------------------------------------------------------------- /com32/gplinclude/disk/util.h: -------------------------------------------------------------------------------- 1 | /* ----------------------------------------------------------------------- * 2 | * 3 | * Copyright 2009 Pierre-Alexandre Meyer 4 | * 5 | * Some parts borrowed from chain.c32: 6 | * 7 | * Copyright 2003-2009 H. Peter Anvin - All Rights Reserved 8 | * Copyright 2009 Intel Corporation; author: H. Peter Anvin 9 | * 10 | * This file is part of Syslinux, and is made available under 11 | * the terms of the GNU General Public License version 2. 12 | * 13 | * ----------------------------------------------------------------------- */ 14 | 15 | #ifndef _UTIL_H_ 16 | #define _UTIL_H_ 17 | 18 | #include 19 | 20 | int int13_retry(const com32sys_t * inreg, com32sys_t * outreg); 21 | #endif /* _UTIL_H_ */ 22 | -------------------------------------------------------------------------------- /com32/gpllib/disk/errno_disk.c: -------------------------------------------------------------------------------- 1 | /* ----------------------------------------------------------------------- * 2 | * 3 | * Copyright 2009 Pierre-Alexandre Meyer 4 | * 5 | * This file is part of Syslinux, and is made available under 6 | * the terms of the GNU General Public License version 2. 7 | * 8 | * ----------------------------------------------------------------------- */ 9 | 10 | #include 11 | 12 | int errno_disk; 13 | -------------------------------------------------------------------------------- /com32/gpllib/disk/error.c: -------------------------------------------------------------------------------- 1 | /* ----------------------------------------------------------------------- * 2 | * 3 | * Copyright 2009 Pierre-Alexandre Meyer 4 | * 5 | * This file is part of Syslinux, and is made available under 6 | * the terms of the GNU General Public License version 2. 7 | * 8 | * ----------------------------------------------------------------------- */ 9 | 10 | #include 11 | #include 12 | #include 13 | 14 | /** 15 | * get_error - decode a disk error status 16 | * @s: Preallocated buffer 17 | * 18 | * Fill @buffer_ptr with the last errno_disk 19 | **/ 20 | void get_error(const char *s) 21 | { 22 | fprintf(stderr, "%s: error %d\n", s, errno_disk); 23 | } 24 | -------------------------------------------------------------------------------- /com32/hdt/.gitignore: -------------------------------------------------------------------------------- 1 | floppy/memtest.bin 2 | floppy/pci.ids.gz 3 | floppy/syslinux.cfg 4 | *.img 5 | *.iso 6 | iso/ 7 | *gz 8 | hdt*checksums 9 | -------------------------------------------------------------------------------- /com32/hdt/art/HDT.ai: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TritonDataCenter/syslinux/b78ed9f973e228e886229ccd9ab41dc228cb81b6/com32/hdt/art/HDT.ai -------------------------------------------------------------------------------- /com32/hdt/art/backgnd.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TritonDataCenter/syslinux/b78ed9f973e228e886229ccd9ab41dc228cb81b6/com32/hdt/art/backgnd.png -------------------------------------------------------------------------------- /com32/hdt/art/display.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TritonDataCenter/syslinux/b78ed9f973e228e886229ccd9ab41dc228cb81b6/com32/hdt/art/display.png -------------------------------------------------------------------------------- /com32/hdt/art/hdt-black.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TritonDataCenter/syslinux/b78ed9f973e228e886229ccd9ab41dc228cb81b6/com32/hdt/art/hdt-black.png -------------------------------------------------------------------------------- /com32/hdt/art/hdt.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TritonDataCenter/syslinux/b78ed9f973e228e886229ccd9ab41dc228cb81b6/com32/hdt/art/hdt.png -------------------------------------------------------------------------------- /com32/hdt/art/red.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TritonDataCenter/syslinux/b78ed9f973e228e886229ccd9ab41dc228cb81b6/com32/hdt/art/red.png -------------------------------------------------------------------------------- /com32/hdt/floppy/mtools.conf: -------------------------------------------------------------------------------- 1 | # Floppy image for HDT 2 | drive a: file="hdt.img" 3 | -------------------------------------------------------------------------------- /com32/include/alloca.h: -------------------------------------------------------------------------------- 1 | /* 2 | * alloca.h 3 | * 4 | * Just call the builtin alloca() function 5 | */ 6 | 7 | #ifndef _ALLOCA_H 8 | #define _ALLOCA_H 9 | 10 | #define alloca(size) __builtin_alloca(size) 11 | 12 | #endif /* _ALLOCA_H */ 13 | -------------------------------------------------------------------------------- /com32/include/assert.h: -------------------------------------------------------------------------------- 1 | #ifndef _ASSERT_H 2 | #define _ASSERT_H 3 | 4 | /* Assert not currently supported */ 5 | #define assert(X) ((void)0) 6 | 7 | #endif /* _ASSERT_H */ 8 | -------------------------------------------------------------------------------- /com32/include/bitsize/limits.h: -------------------------------------------------------------------------------- 1 | /* 2 | * bits32/limits.h 3 | */ 4 | 5 | #ifndef _BITSIZE_LIMITS_H 6 | #define _BITSIZE_LIMITS_H 7 | 8 | #define LONG_BIT 32 9 | 10 | #define LONG_MIN (-2147483647L-1) 11 | #define LONG_MAX 2147483647L 12 | #define ULONG_MAX 4294967295UL 13 | 14 | #endif /* _BITSIZE_LIMITS_H */ 15 | -------------------------------------------------------------------------------- /com32/include/bitsize/stddef.h: -------------------------------------------------------------------------------- 1 | /* 2 | * bits32/stddef.h 3 | */ 4 | 5 | #ifndef _BITSIZE_STDDEF_H 6 | #define _BITSIZE_STDDEF_H 7 | 8 | #define _SIZE_T 9 | typedef unsigned int size_t; 10 | 11 | #define _PTRDIFF_T 12 | typedef signed long ptrdiff_t; 13 | 14 | #endif /* _BITSIZE_STDDEF_H */ 15 | -------------------------------------------------------------------------------- /com32/include/bitsize/stdintconst.h: -------------------------------------------------------------------------------- 1 | /* 2 | * bits32/stdintconst.h 3 | */ 4 | 5 | #ifndef _BITSIZE_STDINTCONST_H 6 | #define _BITSIZE_STDINTCONST_H 7 | 8 | #define INT_FAST16_C(c) INT32_C(c) 9 | #define INT_FAST32_C(c) INT32_C(c) 10 | 11 | #define UINT_FAST16_C(c) UINT32_C(c) 12 | #define UINT_FAST32_C(c) UINT32_C(c) 13 | 14 | #define INTPTR_C(c) INT32_C(c) 15 | #define UINTPTR_C(c) UINT32_C(c) 16 | #define PTRDIFF_C(c) INT32_C(c) 17 | 18 | #endif /* _BITSIZE_STDINTCONST_H */ 19 | -------------------------------------------------------------------------------- /com32/include/bitsize/stdintlimits.h: -------------------------------------------------------------------------------- 1 | /* 2 | * bits32/stdintlimits.h 3 | */ 4 | 5 | #ifndef _BITSIZE_STDINTLIMITS_H 6 | #define _BITSIZE_STDINTLIMITS_H 7 | 8 | #define INT_FAST16_MIN INT32_MIN 9 | #define INT_FAST32_MIN INT32_MIN 10 | #define INT_FAST16_MAX INT32_MAX 11 | #define INT_FAST32_MAX INT32_MAX 12 | #define UINT_FAST16_MAX UINT32_MAX 13 | #define UINT_FAST32_MAX UINT32_MAX 14 | 15 | #define INTPTR_MIN INT32_MIN 16 | #define INTPTR_MAX INT32_MAX 17 | #define UINTPTR_MAX UINT32_MAX 18 | 19 | #define PTRDIFF_MIN INT32_MIN 20 | #define PTRDIFF_MAX INT32_MAX 21 | 22 | #endif /* _BITSIZE_STDINTLIMITS_H */ 23 | -------------------------------------------------------------------------------- /com32/include/bufprintf.h: -------------------------------------------------------------------------------- 1 | #define BUFPAD 4096 2 | 3 | struct print_buf { 4 | char *buf; 5 | size_t len; 6 | size_t size; 7 | }; 8 | 9 | int vbufprintf(struct print_buf *buf, const char *format, va_list ap); 10 | int bufprintf(struct print_buf *buf, const char *format, ...); 11 | -------------------------------------------------------------------------------- /com32/include/dirent.h: -------------------------------------------------------------------------------- 1 | /* 2 | * dirent.h 3 | */ 4 | 5 | #ifndef _DIRENT_H 6 | #define _DIRENT_H 7 | 8 | #include 9 | #include 10 | #include 11 | #include 12 | 13 | #include 14 | 15 | __extern DIR *opendir(const char *); 16 | __extern struct dirent *readdir(DIR *); 17 | __extern int closedir(DIR *); 18 | __extern DIR *fdopendir(int); 19 | 20 | #endif /* Not _DIRENT_H */ 21 | -------------------------------------------------------------------------------- /com32/include/elf.h: -------------------------------------------------------------------------------- 1 | /* 2 | * elf.h 3 | */ 4 | 5 | #ifndef _ELF_H 6 | #define _ELF_H 7 | 8 | #include 9 | #include 10 | 11 | #endif /* _ELF_H */ 12 | -------------------------------------------------------------------------------- /com32/include/endian.h: -------------------------------------------------------------------------------- 1 | /* 2 | * endian.h 3 | */ 4 | 5 | #ifndef _ENDIAN_H 6 | #define _ENDIAN_H 7 | 8 | #include 9 | 10 | #define LITTLE_ENDIAN __LITTLE_ENDIAN 11 | #define BIG_ENDIAN __BIG_ENDIAN 12 | #define PDP_ENDIAN __PDP_ENDIAN 13 | #define BYTE_ORDER __BYTE_ORDER 14 | 15 | #endif /* _ENDIAN_H */ 16 | -------------------------------------------------------------------------------- /com32/include/fcntl.h: -------------------------------------------------------------------------------- 1 | /* 2 | * fcntl.h 3 | */ 4 | 5 | #ifndef _FCNTL_H 6 | #define _FCNTL_H 7 | 8 | #include 9 | #include 10 | #include 11 | 12 | /* None of these are actually supported, although O_RDONLY works */ 13 | /* Note this is different from the classical Unix way of doing it */ 14 | #define O_RDONLY 1 15 | #define O_WRONLY 2 16 | #define O_RDWR 3 17 | #define O_CREAT 0100 18 | #define O_EXCL 0200 19 | #define O_TRUNC 01000 20 | #define O_APPEND 02000 21 | 22 | __extern int open(const char *, int, ...); 23 | 24 | #endif /* _FCNTL_H */ 25 | -------------------------------------------------------------------------------- /com32/include/getopt.h: -------------------------------------------------------------------------------- 1 | #ifndef _GETOPT_H 2 | #define _GETOPT_H 3 | 4 | #include 5 | 6 | struct option { 7 | const char *name; 8 | int has_arg; 9 | int *flag; 10 | int val; 11 | }; 12 | 13 | enum { 14 | no_argument = 0, 15 | required_argument = 1, 16 | optional_argument = 2, 17 | }; 18 | 19 | __extern int getopt_long(int, char *const *, const char *, 20 | const struct option *, int *); 21 | 22 | #endif /* _GETOPT_H */ 23 | -------------------------------------------------------------------------------- /com32/include/klibc/archsetjmp.h: -------------------------------------------------------------------------------- 1 | /* 2 | * arch/i386/include/klibc/archsetjmp.h 3 | */ 4 | 5 | #ifndef _KLIBC_ARCHSETJMP_H 6 | #define _KLIBC_ARCHSETJMP_H 7 | 8 | struct __jmp_buf { 9 | unsigned int __ebx; 10 | unsigned int __esp; 11 | unsigned int __ebp; 12 | unsigned int __esi; 13 | unsigned int __edi; 14 | unsigned int __eip; 15 | }; 16 | 17 | typedef struct __jmp_buf jmp_buf[1]; 18 | 19 | #endif /* _SETJMP_H */ 20 | -------------------------------------------------------------------------------- /com32/include/klibc/diverr.h: -------------------------------------------------------------------------------- 1 | static inline void __divide_error(void) 2 | { 3 | asm volatile ("int $0"); /* Divide by zero */ 4 | } 5 | -------------------------------------------------------------------------------- /com32/include/klibc/extern.h: -------------------------------------------------------------------------------- 1 | /* 2 | * klibc/extern.h 3 | */ 4 | 5 | #ifndef _KLIBC_EXTERN_H 6 | #define _KLIBC_EXTERN_H 7 | 8 | #ifdef __cplusplus 9 | #define __extern extern "C" 10 | #else 11 | #define __extern extern 12 | #endif 13 | 14 | #endif /* _KLIBC_EXTERN_H */ 15 | -------------------------------------------------------------------------------- /com32/include/math.h: -------------------------------------------------------------------------------- 1 | #ifndef _MATH_H 2 | #define _MATH_H 3 | 4 | #ifndef __DBL_MIN_EXP__ 5 | # define __DBL_MIN_EXP__ (-1021) 6 | #endif 7 | #ifndef __DBL_MAX_EXP__ 8 | # define __DBL_MAX_EXP__ 1024 9 | #endif 10 | 11 | double pow(double, double); 12 | double fabs(double); 13 | double strtod(const char *, char **); 14 | 15 | #endif /* _MATH_H */ 16 | -------------------------------------------------------------------------------- /com32/include/setjmp.h: -------------------------------------------------------------------------------- 1 | /* 2 | * setjmp.h 3 | */ 4 | 5 | #ifndef _SETJMP_H 6 | #define _SETJMP_H 7 | 8 | #include 9 | #include 10 | #include 11 | 12 | #include 13 | 14 | __extern int setjmp(jmp_buf); 15 | __extern __noreturn longjmp(jmp_buf, int); 16 | 17 | typedef jmp_buf sigjmp_buf; 18 | 19 | #define sigsetjmp(__env, __save) setjmp(__env) 20 | #define siglongjmp(__env, __val) longjmp(__env, __val) 21 | 22 | #endif /* _SETJMP_H */ 23 | -------------------------------------------------------------------------------- /com32/include/stdarg.h: -------------------------------------------------------------------------------- 1 | /* 2 | * stdarg.h 3 | * 4 | * This is just a wrapper for the gcc one, but defines va_copy() 5 | * even if gcc doesn't. 6 | */ 7 | 8 | /* Note: the _STDARG_H macro belongs to the gcc header... */ 9 | #include_next 10 | 11 | /* Older gcc considers this an extension, so it's double underbar only */ 12 | #ifndef va_copy 13 | #define va_copy(d,s) __va_copy(d,s) 14 | #endif 15 | -------------------------------------------------------------------------------- /com32/include/stdbool.h: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | * stdbool.h 4 | */ 5 | 6 | #ifndef _STDBOOL_H 7 | #define _STDBOOL_H 8 | 9 | #ifndef __cplusplus 10 | 11 | #if !defined(__STDC_VERSION__) || (__STDC_VERSION__ < 199901L) 12 | # if !defined(__GNUC__) ||(__GNUC__ < 3) 13 | typedef char _Bool; /* For C compilers without _Bool */ 14 | # endif 15 | #endif 16 | 17 | #define bool _Bool 18 | #define true 1 19 | #define false 0 20 | 21 | #else 22 | 23 | /* C++ */ 24 | #define bool bool 25 | #define true true 26 | #define false false 27 | 28 | #endif 29 | 30 | #define __bool_true_false_are_defined 1 31 | 32 | #endif /* _STDBOOL_H */ 33 | -------------------------------------------------------------------------------- /com32/include/stddef.h: -------------------------------------------------------------------------------- 1 | /* 2 | * stddef.h 3 | */ 4 | 5 | #ifndef _STDDEF_H 6 | #define _STDDEF_H 7 | 8 | #ifndef __KLIBC__ 9 | # define __KLIBC__ 1 10 | #endif 11 | 12 | #include 13 | 14 | #undef NULL 15 | #ifdef __cplusplus 16 | # define NULL 0 17 | #else 18 | # define NULL ((void *)0) 19 | #endif 20 | 21 | #undef offsetof 22 | #define offsetof(t,m) ((size_t)&((t *)0)->m) 23 | 24 | #endif /* _STDDEF_H */ 25 | -------------------------------------------------------------------------------- /com32/include/sys/fpu.h: -------------------------------------------------------------------------------- 1 | #ifndef _SYS_FPU_H 2 | #define _SYS_FPU_H 3 | 4 | extern int x86_init_fpu(void); 5 | 6 | #endif /* _SYS_FPU_H */ 7 | -------------------------------------------------------------------------------- /com32/include/sys/gpxe.h: -------------------------------------------------------------------------------- 1 | #ifndef _GPXE_H 2 | #define _GPXE_H 3 | 4 | #include 5 | 6 | struct s_PXENV_FILE_CHECK_API { 7 | uint16_t Status; 8 | uint16_t Size; 9 | uint32_t Magic; 10 | uint32_t Provider; 11 | uint32_t APIMask; 12 | uint32_t Flags; 13 | }; 14 | 15 | bool is_gpxe(void); 16 | #endif 17 | -------------------------------------------------------------------------------- /com32/include/sys/time.h: -------------------------------------------------------------------------------- 1 | #ifndef _SYS_TIME_H 2 | #define _SYS_TIME_H 3 | 4 | /* empty */ 5 | 6 | #endif 7 | -------------------------------------------------------------------------------- /com32/include/sys/times.h: -------------------------------------------------------------------------------- 1 | /* 2 | * sys/times.h 3 | */ 4 | 5 | #ifndef _SYS_TIMES_H 6 | #define _SYS_TIMES_H 7 | 8 | #include 9 | 10 | struct tms { 11 | /* Empty */ 12 | }; 13 | 14 | #define HZ 1000 15 | #define CLK_TCK HZ 16 | 17 | typedef uint32_t clock_t; 18 | 19 | clock_t times(struct tms *); 20 | 21 | #endif /* _SYS_TIMES_H */ 22 | -------------------------------------------------------------------------------- /com32/include/sys/types.h: -------------------------------------------------------------------------------- 1 | /* 2 | * sys/types.h 3 | */ 4 | 5 | #ifndef _SYS_TYPES_H 6 | #define _SYS_TYPES_H 7 | 8 | #include 9 | #include 10 | #include 11 | 12 | typedef ptrdiff_t ssize_t; 13 | typedef int mode_t; 14 | typedef size_t off_t; 15 | 16 | #endif 17 | -------------------------------------------------------------------------------- /com32/include/syslinux/loadfile.h: -------------------------------------------------------------------------------- 1 | #ifndef LIBUTIL_LOADFILE_H 2 | #define LIBUTIL_LOADFILE_H 3 | 4 | #include 5 | #include 6 | 7 | /* loadfile() returns the true size of the file, but will guarantee valid, 8 | zero-padded memory out to this boundary. */ 9 | #define LOADFILE_ZERO_PAD 64 10 | 11 | int loadfile(const char *, void **, size_t *); 12 | int zloadfile(const char *, void **, size_t *); 13 | int floadfile(FILE *, void **, size_t *, const void *, size_t); 14 | 15 | #endif 16 | -------------------------------------------------------------------------------- /com32/include/syslinux/zio.h: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | */ 4 | 5 | #ifndef _SYSLINUX_ZIO_H 6 | #define _SYSLINUX_ZIO_H 7 | 8 | #include 9 | 10 | int zopen(const char *, int, ...); 11 | FILE *zfopen(const char *, const char *); 12 | 13 | #endif /* _SYSLINUX_ZIO_H */ 14 | -------------------------------------------------------------------------------- /com32/include/time.h: -------------------------------------------------------------------------------- 1 | #ifndef _TIME_H 2 | #define _TIME_H 3 | 4 | /* empty */ 5 | 6 | #endif 7 | -------------------------------------------------------------------------------- /com32/lib/abort.c: -------------------------------------------------------------------------------- 1 | /* 2 | * abort.c 3 | */ 4 | 5 | #include 6 | #include 7 | 8 | void abort(void) 9 | { 10 | _exit(255); 11 | } 12 | -------------------------------------------------------------------------------- /com32/lib/asprintf.c: -------------------------------------------------------------------------------- 1 | /* 2 | * asprintf.c 3 | */ 4 | 5 | #include 6 | #include 7 | #include 8 | 9 | int asprintf(char **bufp, const char *format, ...) 10 | { 11 | va_list ap, ap1; 12 | int rv; 13 | int bytes; 14 | char *p; 15 | 16 | va_start(ap, format); 17 | va_copy(ap1, ap); 18 | 19 | bytes = vsnprintf(NULL, 0, format, ap1) + 1; 20 | va_end(ap1); 21 | 22 | *bufp = p = malloc(bytes); 23 | if (!p) 24 | return -1; 25 | 26 | rv = vsnprintf(p, bytes, format, ap); 27 | va_end(ap); 28 | 29 | return rv; 30 | } 31 | -------------------------------------------------------------------------------- /com32/lib/atexit.c: -------------------------------------------------------------------------------- 1 | /* 2 | * atexit.c 3 | */ 4 | 5 | #include 6 | 7 | int atexit(void (*fctn) (void)) 8 | { 9 | return on_exit((void (*)(int, void *))fctn, NULL); 10 | } 11 | -------------------------------------------------------------------------------- /com32/lib/atexit.h: -------------------------------------------------------------------------------- 1 | /* 2 | * atexit.h 3 | * 4 | * atexit()/on_exit() internal definitions 5 | */ 6 | 7 | #ifndef ATEXIT_H 8 | #define ATEXIT_H 9 | 10 | struct atexit { 11 | void (*fctn) (int, void *); 12 | void *arg; /* on_exit() parameter */ 13 | struct atexit *next; 14 | }; 15 | 16 | #endif /* ATEXIT_H */ 17 | -------------------------------------------------------------------------------- /com32/lib/atoi.c: -------------------------------------------------------------------------------- 1 | #define TYPE int 2 | #define NAME atoi 3 | #include "atox.c" 4 | -------------------------------------------------------------------------------- /com32/lib/atol.c: -------------------------------------------------------------------------------- 1 | #define TYPE long 2 | #define NAME atol 3 | #include "atox.c" 4 | -------------------------------------------------------------------------------- /com32/lib/atoll.c: -------------------------------------------------------------------------------- 1 | #define TYPE long long 2 | #define NAME atoll 3 | #include "atox.c" 4 | -------------------------------------------------------------------------------- /com32/lib/atox.c: -------------------------------------------------------------------------------- 1 | /* 2 | * atox.c 3 | * 4 | * atoi(), atol(), atoll() 5 | */ 6 | 7 | #include 8 | #include 9 | #include 10 | 11 | TYPE NAME(const char *nptr) 12 | { 13 | return (TYPE) strntoumax(nptr, (char **)NULL, 10, ~(size_t) 0); 14 | } 15 | -------------------------------------------------------------------------------- /com32/lib/calloc.c: -------------------------------------------------------------------------------- 1 | /* 2 | * calloc.c 3 | */ 4 | 5 | #include 6 | #include 7 | 8 | /* FIXME: This should look for multiplication overflow */ 9 | 10 | void *calloc(size_t nmemb, size_t size) 11 | { 12 | return zalloc(size * nmemb); 13 | } 14 | -------------------------------------------------------------------------------- /com32/lib/chdir.c: -------------------------------------------------------------------------------- 1 | /* 2 | * chdir.c 3 | */ 4 | 5 | #include 6 | #include 7 | #include 8 | 9 | #include 10 | #include 11 | 12 | int chdir(const char *path) 13 | { 14 | return __com32.cs_pm->chdir(path); 15 | } 16 | -------------------------------------------------------------------------------- /com32/lib/chrreplace.c: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | /* Replace char 'old' by char 'new' in source */ 4 | void chrreplace(char *source, char old, char new) 5 | { 6 | while (*source) { 7 | source++; 8 | if (source[0] == old) source[0]=new; 9 | } 10 | } 11 | 12 | -------------------------------------------------------------------------------- /com32/lib/creat.c: -------------------------------------------------------------------------------- 1 | /* 2 | * creat.c 3 | */ 4 | 5 | #include 6 | #include 7 | #include 8 | 9 | int creat(const char *pathname, mode_t mode) 10 | { 11 | return open(pathname, O_CREAT | O_WRONLY | O_TRUNC, mode); 12 | } 13 | -------------------------------------------------------------------------------- /com32/lib/dprintf.c: -------------------------------------------------------------------------------- 1 | /* 2 | * dprintf.c 3 | */ 4 | 5 | #include 6 | #include 7 | 8 | #undef DEBUG 9 | #define DEBUG 1 10 | #include 11 | 12 | #ifndef dprintf 13 | void dprintf(const char *format, ...) 14 | { 15 | va_list ap; 16 | 17 | va_start(ap, format); 18 | vdprintf(format, ap); 19 | va_end(ap); 20 | } 21 | #endif 22 | -------------------------------------------------------------------------------- /com32/lib/errno.c: -------------------------------------------------------------------------------- 1 | /* 2 | * errno.c 3 | * 4 | */ 5 | #include 6 | 7 | int errno; 8 | -------------------------------------------------------------------------------- /com32/lib/fclose.c: -------------------------------------------------------------------------------- 1 | /* 2 | * fclose.c 3 | */ 4 | 5 | #include 6 | #include 7 | 8 | int fclose(FILE * __f) 9 | { 10 | return close(fileno(__f)); 11 | } 12 | -------------------------------------------------------------------------------- /com32/lib/fdopendir.c: -------------------------------------------------------------------------------- 1 | /* 2 | * fdopendir.c 3 | */ 4 | 5 | #include 6 | #include 7 | #include 8 | 9 | DIR *fdopendir(int __fd) 10 | { 11 | (void)__fd; 12 | 13 | errno = ENOSYS; 14 | return NULL; 15 | } 16 | -------------------------------------------------------------------------------- /com32/lib/fgetc.c: -------------------------------------------------------------------------------- 1 | /* 2 | * fgetc.c 3 | * 4 | * Extremely slow fgetc implementation, using _fread(). If people 5 | * actually need character-oriented input to be fast, we may actually 6 | * have to implement buffering. Sigh. 7 | */ 8 | 9 | #include 10 | #include 11 | #include 12 | #include 13 | 14 | int fgetc(FILE * f) 15 | { 16 | unsigned char ch; 17 | 18 | return (_fread(&ch, 1, f) == 1) ? (int)ch : EOF; 19 | } 20 | -------------------------------------------------------------------------------- /com32/lib/fgets.c: -------------------------------------------------------------------------------- 1 | /* 2 | * fgets.c 3 | * 4 | * This will be very slow due to the implementation of getc(), 5 | * but we can't afford to drain characters we don't need from 6 | * the input. 7 | */ 8 | 9 | #include 10 | 11 | char *fgets(char *s, int n, FILE * f) 12 | { 13 | int ch; 14 | char *p = s; 15 | 16 | while (n > 1) { 17 | ch = getc(f); 18 | if (ch == EOF) { 19 | *p = '\0'; 20 | return (p == s) ? NULL : s; 21 | } 22 | *p++ = ch; 23 | if (ch == '\n') 24 | break; 25 | n--; 26 | } 27 | if (n) 28 | *p = '\0'; 29 | 30 | return s; 31 | } 32 | -------------------------------------------------------------------------------- /com32/lib/fprintf.c: -------------------------------------------------------------------------------- 1 | /* 2 | * fprintf.c 3 | */ 4 | 5 | #include 6 | #include 7 | 8 | int fprintf(FILE * file, const char *format, ...) 9 | { 10 | va_list ap; 11 | int rv; 12 | 13 | va_start(ap, format); 14 | rv = vfprintf(file, format, ap); 15 | va_end(ap); 16 | return rv; 17 | } 18 | -------------------------------------------------------------------------------- /com32/lib/fputc.c: -------------------------------------------------------------------------------- 1 | /* 2 | * fputc.c 3 | * 4 | * gcc "printf decompilation" expects this to exist... 5 | */ 6 | 7 | #include 8 | 9 | int fputc(int c, FILE * f) 10 | { 11 | unsigned char ch = c; 12 | 13 | return _fwrite(&ch, 1, f) == 1 ? ch : EOF; 14 | } 15 | -------------------------------------------------------------------------------- /com32/lib/fputs.c: -------------------------------------------------------------------------------- 1 | /* 2 | * fputs.c 3 | * 4 | * This isn't quite fputs() in the stdio sense, since we don't 5 | * have stdio, but it takes a file descriptor argument instead 6 | * of the FILE *. 7 | */ 8 | 9 | #include 10 | #include 11 | 12 | int fputs(const char *s, FILE * file) 13 | { 14 | return _fwrite(s, strlen(s), file); 15 | } 16 | -------------------------------------------------------------------------------- /com32/lib/fread.c: -------------------------------------------------------------------------------- 1 | /* 2 | * fread.c 3 | */ 4 | 5 | #include 6 | #include 7 | #include 8 | 9 | size_t _fread(void *buf, size_t count, FILE * f) 10 | { 11 | size_t bytes = 0; 12 | ssize_t rv; 13 | char *p = buf; 14 | 15 | while (count) { 16 | rv = read(fileno(f), p, count); 17 | if (rv == -1) { 18 | if (errno == EINTR || errno == EAGAIN) 19 | continue; 20 | else 21 | break; 22 | } else if (rv == 0) { 23 | break; 24 | } 25 | 26 | p += rv; 27 | bytes += rv; 28 | count -= rv; 29 | } 30 | 31 | return bytes; 32 | } 33 | -------------------------------------------------------------------------------- /com32/lib/fread2.c: -------------------------------------------------------------------------------- 1 | /* 2 | * fread2.c 3 | * 4 | * The actual fread() function as a non-inline 5 | */ 6 | 7 | #define __NO_FREAD_FWRITE_INLINES 8 | #include 9 | 10 | size_t fread(void *ptr, size_t size, size_t nmemb, FILE * f) 11 | { 12 | return _fread(ptr, size * nmemb, f) / size; 13 | } 14 | -------------------------------------------------------------------------------- /com32/lib/fwrite.c: -------------------------------------------------------------------------------- 1 | /* 2 | * fwrite.c 3 | */ 4 | 5 | #include 6 | #include 7 | #include 8 | 9 | size_t _fwrite(const void *buf, size_t count, FILE * f) 10 | { 11 | size_t bytes = 0; 12 | ssize_t rv; 13 | const char *p = buf; 14 | 15 | while (count) { 16 | rv = write(fileno(f), p, count); 17 | if (rv == -1) { 18 | if (errno == EINTR || errno == EAGAIN) 19 | continue; 20 | else 21 | break; 22 | } else if (rv == 0) { 23 | break; 24 | } 25 | 26 | p += rv; 27 | bytes += rv; 28 | count -= rv; 29 | } 30 | 31 | return bytes; 32 | } 33 | -------------------------------------------------------------------------------- /com32/lib/fwrite2.c: -------------------------------------------------------------------------------- 1 | /* 2 | * fwrite2.c 3 | * 4 | * The actual fwrite() function as a non-inline 5 | */ 6 | 7 | #define __NO_FREAD_FWRITE_INLINES 8 | #include 9 | 10 | size_t fwrite(const void *ptr, size_t size, size_t nmemb, FILE * f) 11 | { 12 | return _fwrite(ptr, size * nmemb, f) / size; 13 | } 14 | -------------------------------------------------------------------------------- /com32/lib/getcwd.c: -------------------------------------------------------------------------------- 1 | /* 2 | * getcwd.c 3 | */ 4 | 5 | #include 6 | #include 7 | 8 | char *getcwd(char *buf, size_t size) 9 | { 10 | return __com32.cs_pm->getcwd(buf, size); 11 | } 12 | -------------------------------------------------------------------------------- /com32/lib/init.h: -------------------------------------------------------------------------------- 1 | /* 2 | * init.h 3 | * 4 | * Magic to set up initializers 5 | */ 6 | 7 | #ifndef _INIT_H 8 | #define _INIT_H 1 9 | 10 | #include 11 | 12 | #define COM32_INIT(x) static const void * const __COM32_INIT \ 13 | __attribute__((section(".init_array"),unused)) = (const void * const)&x 14 | 15 | #endif /* _INIT_H */ 16 | -------------------------------------------------------------------------------- /com32/lib/libgcc/__ashldi3.S: -------------------------------------------------------------------------------- 1 | /* 2 | * arch/i386/libgcc/__ashldi3.S 3 | * 4 | * 64-bit shl 5 | */ 6 | .text 7 | .align 4 8 | .globl __ashldi3 9 | .type __ashldi3,@function 10 | __ashldi3: 11 | #ifndef REGPARM 12 | movl 4(%esp),%eax 13 | movl 8(%esp),%edx 14 | movb 12(%esp),%cl 15 | #endif 16 | cmpb $32,%cl 17 | jae 1f 18 | 19 | shldl %cl,%eax,%edx 20 | shl %cl,%eax 21 | ret 22 | 23 | 1: 24 | xorl %edx,%edx 25 | shl %cl,%eax 26 | xchgl %edx,%eax 27 | ret 28 | 29 | .size __ashldi3,.-__ashldi3 30 | -------------------------------------------------------------------------------- /com32/lib/libgcc/__ashrdi3.S: -------------------------------------------------------------------------------- 1 | /* 2 | * arch/i386/libgcc/__ashrdi3.S 3 | * 4 | * 64-bit sar 5 | */ 6 | .text 7 | .align 4 8 | .globl __ashrdi3 9 | .type __ashrdi3,@function 10 | __ashrdi3: 11 | #ifndef REGPARM 12 | movl 4(%esp),%eax 13 | movl 8(%esp),%edx 14 | movb 12(%esp),%cl 15 | #endif 16 | cmpb $32,%cl 17 | jae 1f 18 | 19 | shrdl %cl,%edx,%eax 20 | sarl %cl,%edx 21 | ret 22 | 23 | 1: 24 | sarl %cl,%edx 25 | movl %edx,%eax 26 | cdq 27 | ret 28 | 29 | .size __ashrdi3,.-__ashrdi3 30 | -------------------------------------------------------------------------------- /com32/lib/libgcc/__divdi3.c: -------------------------------------------------------------------------------- 1 | /* 2 | * arch/i386/libgcc/__divdi3.c 3 | */ 4 | 5 | #include 6 | #include 7 | 8 | extern uint64_t __udivmoddi4(uint64_t num, uint64_t den, uint64_t * rem); 9 | 10 | int64_t __divdi3(int64_t num, int64_t den) 11 | { 12 | int minus = 0; 13 | int64_t v; 14 | 15 | if (num < 0) { 16 | num = -num; 17 | minus = 1; 18 | } 19 | if (den < 0) { 20 | den = -den; 21 | minus ^= 1; 22 | } 23 | 24 | v = __udivmoddi4(num, den, NULL); 25 | if (minus) 26 | v = -v; 27 | 28 | return v; 29 | } 30 | -------------------------------------------------------------------------------- /com32/lib/libgcc/__lshrdi3.S: -------------------------------------------------------------------------------- 1 | /* 2 | * arch/i386/libgcc/__lshrdi3.S 3 | * 4 | * 64-bit shr 5 | */ 6 | .text 7 | .align 4 8 | .globl __lshrdi3 9 | .type __lshrdi3,@function 10 | __lshrdi3: 11 | #ifndef REGPARM 12 | movl 4(%esp),%eax 13 | movl 8(%esp),%edx 14 | movb 12(%esp),%cl 15 | #endif 16 | cmpb $32,%cl 17 | jae 1f 18 | 19 | shrdl %cl,%edx,%eax 20 | shrl %cl,%edx 21 | ret 22 | 23 | 1: 24 | shrl %cl,%edx 25 | xorl %eax,%eax 26 | xchgl %edx,%eax 27 | ret 28 | 29 | .size __lshrdi3,.-__lshrdi3 30 | -------------------------------------------------------------------------------- /com32/lib/libgcc/__moddi3.c: -------------------------------------------------------------------------------- 1 | /* 2 | * arch/i386/libgcc/__moddi3.c 3 | */ 4 | 5 | #include 6 | #include 7 | 8 | extern uint64_t __udivmoddi4(uint64_t num, uint64_t den, uint64_t * rem); 9 | 10 | int64_t __moddi3(int64_t num, int64_t den) 11 | { 12 | int minus = 0; 13 | int64_t v; 14 | 15 | if (num < 0) { 16 | num = -num; 17 | minus = 1; 18 | } 19 | if (den < 0) { 20 | den = -den; 21 | minus ^= 1; 22 | } 23 | 24 | (void)__udivmoddi4(num, den, (uint64_t *)&v); 25 | if (minus) 26 | v = -v; 27 | 28 | return v; 29 | } 30 | -------------------------------------------------------------------------------- /com32/lib/libgcc/__muldi3.S: -------------------------------------------------------------------------------- 1 | /* 2 | * arch/i386/libgcc/__muldi3.S 3 | * 4 | * 64*64 = 64 bit unsigned multiplication 5 | */ 6 | 7 | .text 8 | .align 4 9 | .globl __muldi3 10 | .type __muldi3,@function 11 | __muldi3: 12 | push %esi 13 | #ifndef REGPARM 14 | movl 8(%esp),%eax 15 | movl %eax,%esi 16 | movl 16(%esp),%ecx 17 | mull %ecx 18 | imull 12(%esp),%ecx 19 | imull 20(%esp),%esi 20 | addl %ecx,%edx 21 | addl %esi,%edx 22 | #else 23 | movl %eax,%esi 24 | push %edx 25 | mull %ecx 26 | imull 8(%esp),%esi 27 | addl %esi,%edx 28 | pop %esi 29 | imull %esi,%ecx 30 | addl %ecx,%edx 31 | #endif 32 | pop %esi 33 | ret 34 | .size __muldi3,.-__muldi3 35 | -------------------------------------------------------------------------------- /com32/lib/libgcc/__negdi2.S: -------------------------------------------------------------------------------- 1 | /* 2 | * arch/i386/libgcc/__negdi2.S 3 | * 4 | * 64-bit negation 5 | */ 6 | 7 | .text 8 | .align 4 9 | .globl __negdi2 10 | .type __negdi2,@function 11 | __negdi2: 12 | #ifndef REGPARM 13 | movl 4(%esp),%eax 14 | movl 8(%esp),%edx 15 | #endif 16 | negl %edx 17 | negl %eax 18 | sbbl $0,%edx 19 | ret 20 | 21 | .size __negdi2,.-__negdi2 22 | -------------------------------------------------------------------------------- /com32/lib/libgcc/__udivdi3.c: -------------------------------------------------------------------------------- 1 | /* 2 | * arch/i386/libgcc/__divdi3.c 3 | */ 4 | 5 | #include 6 | #include 7 | 8 | extern uint64_t __udivmoddi4(uint64_t num, uint64_t den, uint64_t * rem); 9 | 10 | uint64_t __udivdi3(uint64_t num, uint64_t den) 11 | { 12 | return __udivmoddi4(num, den, NULL); 13 | } 14 | -------------------------------------------------------------------------------- /com32/lib/libgcc/__udivmoddi4.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | 4 | uint64_t __udivmoddi4(uint64_t num, uint64_t den, uint64_t * rem_p) 5 | { 6 | uint64_t quot = 0, qbit = 1; 7 | 8 | if (den == 0) { 9 | __divide_error(); 10 | return 0; /* If trap returns... */ 11 | } 12 | 13 | /* Left-justify denominator and count shift */ 14 | while ((int64_t) den >= 0) { 15 | den <<= 1; 16 | qbit <<= 1; 17 | } 18 | 19 | while (qbit) { 20 | if (den <= num) { 21 | num -= den; 22 | quot += qbit; 23 | } 24 | den >>= 1; 25 | qbit >>= 1; 26 | } 27 | 28 | if (rem_p) 29 | *rem_p = num; 30 | 31 | return quot; 32 | } 33 | -------------------------------------------------------------------------------- /com32/lib/libgcc/__umoddi3.c: -------------------------------------------------------------------------------- 1 | /* 2 | * arch/i386/libgcc/__umoddi3.c 3 | */ 4 | 5 | #include 6 | #include 7 | 8 | extern uint64_t __udivmoddi4(uint64_t num, uint64_t den, uint64_t * rem); 9 | 10 | uint64_t __umoddi3(uint64_t num, uint64_t den) 11 | { 12 | uint64_t v; 13 | 14 | (void)__udivmoddi4(num, den, &v); 15 | return v; 16 | } 17 | -------------------------------------------------------------------------------- /com32/lib/libpng/pngvcrd.c: -------------------------------------------------------------------------------- 1 | /* pnggvrd.c was removed from libpng-1.2.20. */ 2 | -------------------------------------------------------------------------------- /com32/lib/lstrdup.c: -------------------------------------------------------------------------------- 1 | /* 2 | * lstrdup.c 3 | */ 4 | 5 | #include 6 | #include 7 | #include 8 | 9 | char *lstrdup(const char *s) 10 | { 11 | int l = strlen(s) + 1; 12 | char *d = lmalloc(l); 13 | 14 | if (d) 15 | memcpy(d, s, l); 16 | 17 | return d; 18 | } 19 | -------------------------------------------------------------------------------- /com32/lib/math/pow.S: -------------------------------------------------------------------------------- 1 | /* 2 | * pow.S 3 | * 4 | * double pow(double base, double exponent) 5 | */ 6 | 7 | .text 8 | .globl pow 9 | .type pow,@function 10 | pow: 11 | fldl 12(%esp) 12 | fldl 4(%esp) 13 | fyl2x 14 | fld %st(0) 15 | frndint 16 | fsubr %st,%st(1) 17 | fxch %st(1) 18 | f2xm1 19 | fld1 20 | faddp %st,%st(1) 21 | fscale 22 | fstp %st(1) 23 | ret 24 | 25 | .size pow,.-pow 26 | -------------------------------------------------------------------------------- /com32/lib/memccpy.c: -------------------------------------------------------------------------------- 1 | /* 2 | * memccpy.c 3 | * 4 | * memccpy() 5 | */ 6 | 7 | #include 8 | #include 9 | 10 | void *memccpy(void *dst, const void *src, int c, size_t n) 11 | { 12 | char *q = dst; 13 | const char *p = src; 14 | char ch; 15 | 16 | while (n--) { 17 | *q++ = ch = *p++; 18 | if (ch == (char)c) 19 | return q; 20 | } 21 | 22 | return NULL; /* No instance of "c" found */ 23 | } 24 | -------------------------------------------------------------------------------- /com32/lib/memchr.c: -------------------------------------------------------------------------------- 1 | /* 2 | * memchr.c 3 | */ 4 | 5 | #include 6 | #include 7 | 8 | void *memchr(const void *s, int c, size_t n) 9 | { 10 | const unsigned char *sp = s; 11 | 12 | while (n--) { 13 | if (*sp == (unsigned char)c) 14 | return (void *)sp; 15 | } 16 | 17 | return NULL; 18 | } 19 | -------------------------------------------------------------------------------- /com32/lib/memcmp.c: -------------------------------------------------------------------------------- 1 | /* 2 | * memcmp.c 3 | */ 4 | 5 | #include 6 | 7 | int memcmp(const void *s1, const void *s2, size_t n) 8 | { 9 | const unsigned char *c1 = s1, *c2 = s2; 10 | int d = 0; 11 | 12 | while (n--) { 13 | d = (int)*c1++ - (int)*c2++; 14 | if (d) 15 | break; 16 | } 17 | 18 | return d; 19 | } 20 | -------------------------------------------------------------------------------- /com32/lib/memswap.c: -------------------------------------------------------------------------------- 1 | /* 2 | * memswap() 3 | * 4 | * Swaps the contents of two nonoverlapping memory areas. 5 | * This really could be done faster... 6 | */ 7 | 8 | #include 9 | 10 | void memswap(void *m1, void *m2, size_t n) 11 | { 12 | char *p = m1; 13 | char *q = m2; 14 | char tmp; 15 | 16 | while (n--) { 17 | tmp = *p; 18 | *p = *q; 19 | *q = tmp; 20 | 21 | p++; 22 | q++; 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /com32/lib/pci/bios.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include "pci/pci.h" 4 | 5 | uint32_t __pci_read_write_bios(uint32_t call, uint32_t v, pciaddr_t a) 6 | { 7 | com32sys_t rs; 8 | memset(&rs, 0, sizeof rs); 9 | rs.eax.w[0] = call; 10 | rs.ebx.w[0] = a >> 8; /* bus:device:function */ 11 | rs.edi.b[0] = a; /* address:reg */ 12 | rs.ecx.l = v; 13 | rs.eflags.l = EFLAGS_CF; 14 | __intcall(0x1a, &rs, &rs); 15 | 16 | return (rs.eflags.l & EFLAGS_CF) ? ~(uint32_t) 0 : rs.ecx.l; 17 | } 18 | -------------------------------------------------------------------------------- /com32/lib/pci/pci.h: -------------------------------------------------------------------------------- 1 | /* 2 | * pci/pci.h 3 | * 4 | * Common internal header file 5 | */ 6 | 7 | #ifndef PCI_PCI_H 8 | 9 | #include 10 | #include 11 | 12 | extern enum pci_config_type __pci_cfg_type; 13 | extern uint32_t __pci_read_write_bios(uint32_t call, uint32_t v, pciaddr_t a); 14 | 15 | #endif /* PCI_PCI_H */ 16 | -------------------------------------------------------------------------------- /com32/lib/pci/readb.c: -------------------------------------------------------------------------------- 1 | #define TYPE uint8_t 2 | #define BWL(x) x ## b 3 | #define BIOSCALL 0xb108 4 | #include "pci/readx.c" 5 | -------------------------------------------------------------------------------- /com32/lib/pci/readl.c: -------------------------------------------------------------------------------- 1 | #define TYPE uint32_t 2 | #define BWL(x) x ## l 3 | #define BIOSCALL 0xb10a 4 | #include "pci/readx.c" 5 | -------------------------------------------------------------------------------- /com32/lib/pci/readw.c: -------------------------------------------------------------------------------- 1 | #define TYPE uint16_t 2 | #define BWL(x) x ## w 3 | #define BIOSCALL 0xb109 4 | #include "pci/readx.c" 5 | -------------------------------------------------------------------------------- /com32/lib/pci/writeb.c: -------------------------------------------------------------------------------- 1 | #define TYPE uint8_t 2 | #define BWL(x) x ## b 3 | #define BIOSCALL 0xb10b 4 | #include "pci/writex.c" 5 | -------------------------------------------------------------------------------- /com32/lib/pci/writel.c: -------------------------------------------------------------------------------- 1 | #define TYPE uint32_t 2 | #define BWL(x) x ## l 3 | #define BIOSCALL 0xb10d 4 | #include "pci/writex.c" 5 | -------------------------------------------------------------------------------- /com32/lib/pci/writew.c: -------------------------------------------------------------------------------- 1 | #define TYPE uint16_t 2 | #define BWL(x) x ## w 3 | #define BIOSCALL 0xb10c 4 | #include "pci/writex.c" 5 | -------------------------------------------------------------------------------- /com32/lib/perror.c: -------------------------------------------------------------------------------- 1 | /* 2 | * perror.c 3 | */ 4 | 5 | #include 6 | #include 7 | #include 8 | 9 | void perror(const char *s) 10 | { 11 | fprintf(stderr, "%s: error %d\n", s, errno); 12 | } 13 | -------------------------------------------------------------------------------- /com32/lib/printf.c: -------------------------------------------------------------------------------- 1 | /* 2 | * printf.c 3 | */ 4 | 5 | #include 6 | #include 7 | 8 | int printf(const char *format, ...) 9 | { 10 | va_list ap; 11 | int rv; 12 | 13 | va_start(ap, format); 14 | rv = vfprintf(stdout, format, ap); 15 | va_end(ap); 16 | return rv; 17 | } 18 | -------------------------------------------------------------------------------- /com32/lib/putchar.c: -------------------------------------------------------------------------------- 1 | /* 2 | * putchar.c 3 | * 4 | * gcc "printf decompilation" expects this to exist... 5 | */ 6 | 7 | #include 8 | 9 | #undef putchar 10 | 11 | int putchar(int c) 12 | { 13 | unsigned char ch = c; 14 | 15 | return _fwrite(&ch, 1, stdout) == 1 ? ch : EOF; 16 | } 17 | -------------------------------------------------------------------------------- /com32/lib/puts.c: -------------------------------------------------------------------------------- 1 | /* 2 | * puts.c 3 | */ 4 | 5 | #include 6 | 7 | int puts(const char *s) 8 | { 9 | if (fputs(s, stdout) < 0) 10 | return -1; 11 | 12 | return _fwrite("\n", 1, stdout); 13 | } 14 | -------------------------------------------------------------------------------- /com32/lib/seed48.c: -------------------------------------------------------------------------------- 1 | /* 2 | * seed48.c 3 | */ 4 | 5 | #include 6 | #include 7 | #include 8 | 9 | extern unsigned short __rand48_seed[3]; 10 | 11 | unsigned short *seed48(const unsigned short xsubi[3]) 12 | { 13 | static unsigned short oldseed[3]; 14 | memcpy(oldseed, __rand48_seed, sizeof __rand48_seed); 15 | memcpy(__rand48_seed, xsubi, sizeof __rand48_seed); 16 | 17 | return oldseed; 18 | } 19 | -------------------------------------------------------------------------------- /com32/lib/skipspace.c: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | char *skipspace(const char *p) 4 | { 5 | while (isspace((unsigned char)*p)) 6 | p++; 7 | return (char *)p; 8 | } 9 | -------------------------------------------------------------------------------- /com32/lib/snprintf.c: -------------------------------------------------------------------------------- 1 | /* 2 | * snprintf.c 3 | */ 4 | 5 | #include 6 | 7 | int snprintf(char *buffer, size_t n, const char *format, ...) 8 | { 9 | va_list ap; 10 | int rv; 11 | 12 | va_start(ap, format); 13 | rv = vsnprintf(buffer, n, format, ap); 14 | va_end(ap); 15 | return rv; 16 | } 17 | -------------------------------------------------------------------------------- /com32/lib/sprintf.c: -------------------------------------------------------------------------------- 1 | /* 2 | * sprintf.c 3 | */ 4 | 5 | #include 6 | #include 7 | 8 | int sprintf(char *buffer, const char *format, ...) 9 | { 10 | va_list ap; 11 | int rv; 12 | 13 | va_start(ap, format); 14 | rv = vsnprintf(buffer, ~(size_t) 0, format, ap); 15 | va_end(ap); 16 | 17 | return rv; 18 | } 19 | -------------------------------------------------------------------------------- /com32/lib/srand48.c: -------------------------------------------------------------------------------- 1 | /* 2 | * srand48.c 3 | */ 4 | 5 | #include 6 | #include 7 | 8 | extern unsigned short __rand48_seed[3]; 9 | 10 | void srand48(long seedval) 11 | { 12 | __rand48_seed[0] = 0x330e; 13 | __rand48_seed[1] = (unsigned short)seedval; 14 | __rand48_seed[2] = (unsigned short)((uint32_t) seedval >> 16); 15 | } 16 | -------------------------------------------------------------------------------- /com32/lib/sscanf.c: -------------------------------------------------------------------------------- 1 | /* 2 | * sscanf() 3 | */ 4 | 5 | #include 6 | 7 | int sscanf(const char *str, const char *format, ...) 8 | { 9 | va_list ap; 10 | int rv; 11 | 12 | va_start(ap, format); 13 | rv = vsscanf(str, format, ap); 14 | va_end(ap); 15 | 16 | return rv; 17 | } 18 | -------------------------------------------------------------------------------- /com32/lib/stack.c: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | /* Default stack size 8 MB */ 4 | size_t __stack_size = 8 << 20; 5 | -------------------------------------------------------------------------------- /com32/lib/stpcpy.c: -------------------------------------------------------------------------------- 1 | /* 2 | * stpcpy.c 3 | * 4 | * stpcpy() 5 | */ 6 | 7 | #include 8 | 9 | char *stpcpy(char *dst, const char *src) 10 | { 11 | char *q = dst; 12 | const char *p = src; 13 | char ch; 14 | 15 | for (;;) { 16 | *q = ch = *p++; 17 | if (!ch) 18 | break; 19 | q++; 20 | } 21 | 22 | return q; 23 | } 24 | -------------------------------------------------------------------------------- /com32/lib/stpncpy.c: -------------------------------------------------------------------------------- 1 | /* 2 | * stpncpy.c 3 | * 4 | * stpncpy() 5 | */ 6 | 7 | #include 8 | 9 | char *stpncpy(char *dst, const char *src, size_t n) 10 | { 11 | char *q = dst; 12 | const char *p = src; 13 | char ch; 14 | 15 | while (n--) { 16 | *q = ch = *p++; 17 | if (!ch) 18 | break; 19 | q++; 20 | } 21 | 22 | return q; 23 | } 24 | -------------------------------------------------------------------------------- /com32/lib/strcasecmp.c: -------------------------------------------------------------------------------- 1 | /* 2 | * strcasecmp.c 3 | */ 4 | 5 | #include 6 | #include 7 | 8 | int strcasecmp(const char *s1, const char *s2) 9 | { 10 | const unsigned char *c1 = (const unsigned char *)s1; 11 | const unsigned char *c2 = (const unsigned char *)s2; 12 | unsigned char ch; 13 | int d = 0; 14 | 15 | while (1) { 16 | /* toupper() expects an unsigned char (implicitly cast to int) 17 | as input, and returns an int, which is exactly what we want. */ 18 | d = toupper(ch = *c1++) - toupper(*c2++); 19 | if (d || !ch) 20 | break; 21 | } 22 | 23 | return d; 24 | } 25 | -------------------------------------------------------------------------------- /com32/lib/strcat.c: -------------------------------------------------------------------------------- 1 | /* 2 | * strcat.c 3 | */ 4 | 5 | #include 6 | 7 | char *strcat(char *dst, const char *src) 8 | { 9 | strcpy(strchr(dst, '\0'), src); 10 | return dst; 11 | } 12 | -------------------------------------------------------------------------------- /com32/lib/strchr.c: -------------------------------------------------------------------------------- 1 | /* 2 | * strchr.c 3 | */ 4 | 5 | #include 6 | 7 | char *strchr(const char *s, int c) 8 | { 9 | while (*s != (char)c) { 10 | if (!*s) 11 | return NULL; 12 | s++; 13 | } 14 | 15 | return (char *)s; 16 | } 17 | -------------------------------------------------------------------------------- /com32/lib/strcmp.c: -------------------------------------------------------------------------------- 1 | /* 2 | * strcmp.c 3 | */ 4 | 5 | #include 6 | 7 | int strcmp(const char *s1, const char *s2) 8 | { 9 | const unsigned char *c1 = (const unsigned char *)s1; 10 | const unsigned char *c2 = (const unsigned char *)s2; 11 | unsigned char ch; 12 | int d = 0; 13 | 14 | while (1) { 15 | d = (int)(ch = *c1++) - (int)*c2++; 16 | if (d || !ch) 17 | break; 18 | } 19 | 20 | return d; 21 | } 22 | -------------------------------------------------------------------------------- /com32/lib/strcpy.c: -------------------------------------------------------------------------------- 1 | /* 2 | * strcpy.c 3 | * 4 | * strcpy() 5 | */ 6 | 7 | #include 8 | 9 | char *strcpy(char *dst, const char *src) 10 | { 11 | char *q = dst; 12 | const char *p = src; 13 | char ch; 14 | 15 | do { 16 | *q++ = ch = *p++; 17 | } while (ch); 18 | 19 | return dst; 20 | } 21 | -------------------------------------------------------------------------------- /com32/lib/strdup.c: -------------------------------------------------------------------------------- 1 | /* 2 | * strdup.c 3 | */ 4 | 5 | #include 6 | #include 7 | 8 | char *strdup(const char *s) 9 | { 10 | int l = strlen(s) + 1; 11 | char *d = malloc(l); 12 | 13 | if (d) 14 | memcpy(d, s, l); 15 | 16 | return d; 17 | } 18 | -------------------------------------------------------------------------------- /com32/lib/strerror.c: -------------------------------------------------------------------------------- 1 | /* 2 | * strerror.c 3 | */ 4 | 5 | #include 6 | 7 | char *strerror(int errnum) 8 | { 9 | static char message[32] = "error "; /* enough for error 2^63-1 */ 10 | 11 | char numbuf[32]; 12 | char *p; 13 | 14 | p = numbuf + sizeof numbuf; 15 | *--p = '\0'; 16 | 17 | do { 18 | *--p = (errnum % 10) + '0'; 19 | errnum /= 10; 20 | } while (errnum); 21 | 22 | return (char *)memcpy(message + 6, p, (numbuf + sizeof numbuf) - p); 23 | } 24 | -------------------------------------------------------------------------------- /com32/lib/strlcat.c: -------------------------------------------------------------------------------- 1 | /* 2 | * strlcat.c 3 | */ 4 | 5 | #include 6 | #include 7 | 8 | size_t strlcat(char *dst, const char *src, size_t size) 9 | { 10 | size_t bytes = 0; 11 | char *q = dst; 12 | const char *p = src; 13 | char ch; 14 | 15 | while (bytes < size && *q) { 16 | q++; 17 | bytes++; 18 | } 19 | 20 | while ((ch = *p++)) { 21 | if (bytes < size) 22 | *q++ = ch; 23 | 24 | bytes++; 25 | } 26 | 27 | *q = '\0'; 28 | return bytes; 29 | } 30 | -------------------------------------------------------------------------------- /com32/lib/strlcpy.c: -------------------------------------------------------------------------------- 1 | /* 2 | * strlcpy.c 3 | */ 4 | 5 | #include 6 | #include 7 | 8 | size_t strlcpy(char *dst, const char *src, size_t size) 9 | { 10 | size_t bytes = 0; 11 | char *q = dst; 12 | const char *p = src; 13 | char ch; 14 | 15 | while ((ch = *p++)) { 16 | if (bytes < size) 17 | *q++ = ch; 18 | 19 | bytes++; 20 | } 21 | 22 | *q = '\0'; 23 | return bytes; 24 | } 25 | -------------------------------------------------------------------------------- /com32/lib/strlen.c: -------------------------------------------------------------------------------- 1 | /* 2 | * strlen() 3 | */ 4 | 5 | #include 6 | 7 | size_t strlen(const char *s) 8 | { 9 | const char *ss = s; 10 | while (*ss) 11 | ss++; 12 | return ss - s; 13 | } 14 | -------------------------------------------------------------------------------- /com32/lib/strncasecmp.c: -------------------------------------------------------------------------------- 1 | /* 2 | * strncasecmp.c 3 | */ 4 | 5 | #include 6 | #include 7 | 8 | int strncasecmp(const char *s1, const char *s2, size_t n) 9 | { 10 | const unsigned char *c1 = (const unsigned char *)s1; 11 | const unsigned char *c2 = (const unsigned char *)s2; 12 | unsigned char ch; 13 | int d = 0; 14 | 15 | while (n--) { 16 | /* toupper() expects an unsigned char (implicitly cast to int) 17 | as input, and returns an int, which is exactly what we want. */ 18 | d = toupper(ch = *c1++) - toupper(*c2++); 19 | if (d || !ch) 20 | break; 21 | } 22 | 23 | return d; 24 | } 25 | -------------------------------------------------------------------------------- /com32/lib/strncat.c: -------------------------------------------------------------------------------- 1 | /* 2 | * strncat.c 3 | */ 4 | 5 | #include 6 | 7 | char *strncat(char *dst, const char *src, size_t n) 8 | { 9 | strncpy(strchr(dst, '\0'), src, n); 10 | return dst; 11 | } 12 | -------------------------------------------------------------------------------- /com32/lib/strncmp.c: -------------------------------------------------------------------------------- 1 | /* 2 | * strncmp.c 3 | */ 4 | 5 | #include 6 | 7 | int strncmp(const char *s1, const char *s2, size_t n) 8 | { 9 | const unsigned char *c1 = (const unsigned char *)s1; 10 | const unsigned char *c2 = (const unsigned char *)s2; 11 | unsigned char ch; 12 | int d = 0; 13 | 14 | while (n--) { 15 | d = (int)(ch = *c1++) - (int)*c2++; 16 | if (d || !ch) 17 | break; 18 | } 19 | 20 | return d; 21 | } 22 | -------------------------------------------------------------------------------- /com32/lib/strncpy.c: -------------------------------------------------------------------------------- 1 | /* 2 | * strncpy.c 3 | * 4 | * strncpy() 5 | */ 6 | 7 | #include 8 | 9 | char *strncpy(char *dst, const char *src, size_t n) 10 | { 11 | char *q = dst; 12 | const char *p = src; 13 | char ch; 14 | 15 | while (n--) { 16 | *q++ = ch = *p++; 17 | if (!ch) 18 | break; 19 | } 20 | 21 | return dst; 22 | } 23 | -------------------------------------------------------------------------------- /com32/lib/strndup.c: -------------------------------------------------------------------------------- 1 | /* 2 | * strndup.c 3 | */ 4 | 5 | #include 6 | #include 7 | 8 | char *strndup(const char *s, size_t n) 9 | { 10 | int l = n > strlen(s) ? strlen(s) + 1 : n + 1; 11 | char *d = malloc(l); 12 | 13 | if (d) 14 | memcpy(d, s, l); 15 | d[n] = '\0'; 16 | return d; 17 | } 18 | -------------------------------------------------------------------------------- /com32/lib/strnlen.c: -------------------------------------------------------------------------------- 1 | /* 2 | * strnlen() 3 | */ 4 | 5 | #include 6 | 7 | size_t strnlen(const char *s, size_t n) 8 | { 9 | const char *ss = s; 10 | while (n-- && *ss) 11 | ss++; 12 | return ss - s; 13 | } 14 | -------------------------------------------------------------------------------- /com32/lib/strntoimax.c: -------------------------------------------------------------------------------- 1 | /* 2 | * strntoimax.c 3 | * 4 | * strntoimax() 5 | */ 6 | 7 | #include 8 | #include 9 | 10 | intmax_t strntoimax(const char *nptr, char **endptr, int base, size_t n) 11 | { 12 | return (intmax_t) strntoumax(nptr, endptr, base, n); 13 | } 14 | -------------------------------------------------------------------------------- /com32/lib/strrchr.c: -------------------------------------------------------------------------------- 1 | /* 2 | * strrchr.c 3 | */ 4 | 5 | #include 6 | 7 | char *strrchr(const char *s, int c) 8 | { 9 | const char *found = NULL; 10 | 11 | while (*s) { 12 | if (*s == (char)c) 13 | found = s; 14 | s++; 15 | } 16 | 17 | return (char *)found; 18 | } 19 | -------------------------------------------------------------------------------- /com32/lib/strsep.c: -------------------------------------------------------------------------------- 1 | /* 2 | * strsep.c 3 | */ 4 | 5 | #include 6 | 7 | char *strsep(char **stringp, const char *delim) 8 | { 9 | char *s = *stringp; 10 | char *e; 11 | 12 | if (!s) 13 | return NULL; 14 | 15 | e = strpbrk(s, delim); 16 | if (e) 17 | *e++ = '\0'; 18 | 19 | *stringp = e; 20 | return s; 21 | } 22 | -------------------------------------------------------------------------------- /com32/lib/strstr.c: -------------------------------------------------------------------------------- 1 | /* 2 | * strstr.c 3 | */ 4 | 5 | #include 6 | 7 | char *strstr(const char *haystack, const char *needle) 8 | { 9 | return (char *)memmem(haystack, strlen(haystack), needle, strlen(needle)); 10 | } 11 | -------------------------------------------------------------------------------- /com32/lib/strtoimax.c: -------------------------------------------------------------------------------- 1 | #define TYPE intmax_t 2 | #define NAME strtoimax 3 | #include "strtox.c" 4 | -------------------------------------------------------------------------------- /com32/lib/strtok.c: -------------------------------------------------------------------------------- 1 | /* 2 | * strtok.c 3 | */ 4 | 5 | #include 6 | 7 | char *strtok(char *s, const char *delim) 8 | { 9 | static char *holder; 10 | 11 | if (s) 12 | holder = s; 13 | 14 | return strsep(&holder, delim); 15 | } 16 | -------------------------------------------------------------------------------- /com32/lib/strtol.c: -------------------------------------------------------------------------------- 1 | #define TYPE signed long 2 | #define NAME strtol 3 | #include "strtox.c" 4 | -------------------------------------------------------------------------------- /com32/lib/strtoll.c: -------------------------------------------------------------------------------- 1 | #define TYPE signed long long 2 | #define NAME strtoll 3 | #include "strtox.c" 4 | -------------------------------------------------------------------------------- /com32/lib/strtoul.c: -------------------------------------------------------------------------------- 1 | #define TYPE unsigned long 2 | #define NAME strtoul 3 | #include "strtox.c" 4 | -------------------------------------------------------------------------------- /com32/lib/strtoull.c: -------------------------------------------------------------------------------- 1 | #define TYPE unsigned long long 2 | #define NAME strtoull 3 | #include "strtox.c" 4 | -------------------------------------------------------------------------------- /com32/lib/strtoumax.c: -------------------------------------------------------------------------------- 1 | #define TYPE uintmax_t 2 | #define NAME strtoumax 3 | #include "strtox.c" 4 | -------------------------------------------------------------------------------- /com32/lib/strtox.c: -------------------------------------------------------------------------------- 1 | /* 2 | * strtox.c 3 | * 4 | * strto...() functions, by macro definition 5 | */ 6 | 7 | #include 8 | #include 9 | 10 | TYPE NAME(const char *nptr, char **endptr, int base) 11 | { 12 | return (TYPE) strntoumax(nptr, endptr, base, ~(size_t) 0); 13 | } 14 | -------------------------------------------------------------------------------- /com32/lib/sys/cfarcall.c: -------------------------------------------------------------------------------- 1 | /* 2 | * cfarcall.c 3 | */ 4 | 5 | #include 6 | 7 | int __cfarcall(uint16_t cs, uint16_t ip, const void *stack, uint32_t stack_size) 8 | { 9 | return __com32.cs_cfarcall((cs << 16) + ip, stack, stack_size); 10 | } 11 | -------------------------------------------------------------------------------- /com32/lib/sys/colortable.c: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | static struct color_table default_color_table[] = { 4 | {"default", "0", 0xffffffff, 0x00000000, SHADOW_NORMAL} 5 | }; 6 | 7 | struct color_table *console_color_table = default_color_table; 8 | int console_color_table_size = 9 | (sizeof default_color_table / sizeof(struct color_table)); 10 | -------------------------------------------------------------------------------- /com32/lib/sys/farcall.c: -------------------------------------------------------------------------------- 1 | /* 2 | * farcall.c 3 | */ 4 | 5 | #include 6 | 7 | static inline uint32_t eflags(void) 8 | { 9 | uint32_t v; 10 | 11 | asm volatile("pushfl ; popl %0" : "=rm" (v)); 12 | return v; 13 | } 14 | 15 | void __farcall(uint16_t cs, uint16_t ip, 16 | const com32sys_t * ireg, com32sys_t * oreg) 17 | { 18 | com32sys_t xreg = *ireg; 19 | 20 | /* Enable interrupts if and only if they are enabled in the caller */ 21 | xreg.eflags.l = (xreg.eflags.l & ~EFLAGS_IF) | (eflags() & EFLAGS_IF); 22 | 23 | __com32.cs_farcall((cs << 16) + ip, &xreg, oreg); 24 | } 25 | -------------------------------------------------------------------------------- /com32/lib/sys/fileinfo.c: -------------------------------------------------------------------------------- 1 | #include "file.h" 2 | 3 | struct file_info __file_info[NFILES]; 4 | -------------------------------------------------------------------------------- /com32/lib/sys/ftell.c: -------------------------------------------------------------------------------- 1 | /* 2 | * sys/ftell.c 3 | * 4 | * We can't seek, but we can at least tell... 5 | */ 6 | 7 | #include 8 | #include "sys/file.h" 9 | 10 | long ftell(FILE * stream) 11 | { 12 | int fd = fileno(stream); 13 | struct file_info *fp = &__file_info[fd]; 14 | 15 | return fp->i.offset; 16 | } 17 | -------------------------------------------------------------------------------- /com32/lib/sys/intcall.c: -------------------------------------------------------------------------------- 1 | /* 2 | * intcall.c 3 | */ 4 | 5 | #include 6 | 7 | void __intcall(uint8_t vector, const com32sys_t * ireg, com32sys_t * oreg) 8 | { 9 | __com32.cs_intcall(vector, ireg, oreg); 10 | } 11 | -------------------------------------------------------------------------------- /com32/lib/sys/readdir.c: -------------------------------------------------------------------------------- 1 | /* 2 | * readdir.c 3 | */ 4 | 5 | #include 6 | #include 7 | #include 8 | 9 | #include 10 | #include 11 | #include 12 | #include 13 | #include 14 | 15 | #include 16 | 17 | DIR *opendir(const char *pathname) 18 | { 19 | return __com32.cs_pm->opendir(pathname); 20 | } 21 | 22 | struct dirent *readdir(DIR *dir) 23 | { 24 | return __com32.cs_pm->readdir(dir); 25 | } 26 | 27 | int closedir(DIR *dir) 28 | { 29 | return __com32.cs_pm->closedir(dir); 30 | } 31 | -------------------------------------------------------------------------------- /com32/lib/sys/screensize.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include "file.h" 4 | 5 | int getscreensize(int fd, int *rows, int *cols) 6 | { 7 | struct file_info *fp = &__file_info[fd]; 8 | 9 | if (fd >= NFILES || !fp->iop) { 10 | errno = EBADF; 11 | return -1; 12 | } 13 | 14 | *rows = fp->o.rows; 15 | *cols = fp->o.cols; 16 | 17 | if (!rows || !cols) { 18 | errno = ENOTTY; 19 | return -1; 20 | } 21 | 22 | return 0; 23 | } 24 | -------------------------------------------------------------------------------- /com32/lib/sys/sleep.c: -------------------------------------------------------------------------------- 1 | /* 2 | * sys/sleep.c 3 | */ 4 | 5 | #include 6 | #include 7 | #include 8 | 9 | unsigned int msleep(unsigned int msec) 10 | { 11 | clock_t start = times(NULL); 12 | 13 | while (times(NULL) - start < msec) 14 | syslinux_idle(); 15 | 16 | return 0; 17 | } 18 | 19 | unsigned int sleep(unsigned int seconds) 20 | { 21 | return msleep(seconds * 1000); 22 | } 23 | -------------------------------------------------------------------------------- /com32/lib/sys/vesa/debug.h: -------------------------------------------------------------------------------- 1 | #ifndef LIB_SYS_VESA_DEBUG_H 2 | #define LIB_SYS_VESA_DEBUG_H 3 | 4 | #if 0 5 | 6 | #include 7 | #include 8 | 9 | ssize_t __serial_write(void *fp, const void *buf, size_t count); 10 | 11 | static void debug(const char *str, ...) 12 | { 13 | va_list va; 14 | char buf[65536]; 15 | size_t len; 16 | 17 | va_start(va, str); 18 | len = vsnprintf(buf, sizeof buf, str, va); 19 | va_end(va); 20 | 21 | if (len >= sizeof buf) 22 | len = sizeof buf - 1; 23 | 24 | __serial_write(NULL, buf, len); 25 | } 26 | 27 | #else 28 | 29 | static inline void debug(const char *str, ...) 30 | { 31 | (void)str; 32 | } 33 | 34 | #endif 35 | 36 | #endif /* LIB_SYS_VESA_DEBUG_H */ 37 | -------------------------------------------------------------------------------- /com32/lib/sys/zeroregs.c: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | /* When we don't need to pass any registers, it's convenient to just 4 | be able to pass a prepared all-zero structure. */ 5 | const com32sys_t __com32_zero_regs; 6 | -------------------------------------------------------------------------------- /com32/lib/vasprintf.c: -------------------------------------------------------------------------------- 1 | /* 2 | * vasprintf.c 3 | */ 4 | 5 | #include 6 | #include 7 | #include 8 | 9 | int vasprintf(char **bufp, const char *format, va_list ap) 10 | { 11 | va_list ap1; 12 | int bytes; 13 | char *p; 14 | 15 | va_copy(ap1, ap); 16 | 17 | bytes = vsnprintf(NULL, 0, format, ap1) + 1; 18 | va_end(ap1); 19 | 20 | *bufp = p = malloc(bytes); 21 | if (!p) 22 | return -1; 23 | 24 | return vsnprintf(p, bytes, format, ap); 25 | } 26 | -------------------------------------------------------------------------------- /com32/lib/vfprintf.c: -------------------------------------------------------------------------------- 1 | /* 2 | * vfprintf.c 3 | */ 4 | 5 | #include 6 | #include 7 | #include 8 | #include 9 | 10 | #define BUFFER_SIZE 32768 11 | 12 | int vfprintf(FILE * file, const char *format, va_list ap) 13 | { 14 | int rv; 15 | char buffer[BUFFER_SIZE]; 16 | 17 | rv = vsnprintf(buffer, BUFFER_SIZE, format, ap); 18 | 19 | if (rv < 0) 20 | return rv; 21 | 22 | if (rv > BUFFER_SIZE - 1) 23 | rv = BUFFER_SIZE - 1; 24 | 25 | return _fwrite(buffer, rv, file); 26 | } 27 | -------------------------------------------------------------------------------- /com32/lib/vprintf.c: -------------------------------------------------------------------------------- 1 | /* 2 | * vprintf.c 3 | */ 4 | 5 | #include 6 | #include 7 | 8 | int vprintf(const char *format, va_list ap) 9 | { 10 | return vfprintf(stdout, format, ap); 11 | } 12 | -------------------------------------------------------------------------------- /com32/lib/vsprintf.c: -------------------------------------------------------------------------------- 1 | /* 2 | * vsprintf.c 3 | */ 4 | 5 | #include 6 | #include 7 | 8 | int vsprintf(char *buffer, const char *format, va_list ap) 9 | { 10 | return vsnprintf(buffer, ~(size_t) 0, format, ap); 11 | } 12 | -------------------------------------------------------------------------------- /com32/lib/zalloc.c: -------------------------------------------------------------------------------- 1 | /* 2 | * zalloc.c 3 | */ 4 | 5 | #include 6 | #include 7 | 8 | void *zalloc(size_t size) 9 | { 10 | void *ptr; 11 | 12 | ptr = malloc(size); 13 | if (ptr) 14 | memset(ptr, 0, size); 15 | 16 | return ptr; 17 | } 18 | -------------------------------------------------------------------------------- /com32/lib/zlib/inffast.h: -------------------------------------------------------------------------------- 1 | /* inffast.h -- header to use inffast.c 2 | * Copyright (C) 1995-2003, 2010 Mark Adler 3 | * For conditions of distribution and use, see copyright notice in zlib.h 4 | */ 5 | 6 | /* WARNING: this file should *not* be used by applications. It is 7 | part of the implementation of the compression library and is 8 | subject to change. Applications should only use zlib.h. 9 | */ 10 | 11 | void ZLIB_INTERNAL inflate_fast OF((z_streamp strm, unsigned start)); 12 | -------------------------------------------------------------------------------- /com32/libupload/.gitignore: -------------------------------------------------------------------------------- 1 | *.o 2 | *.a 3 | -------------------------------------------------------------------------------- /com32/libupload/ctime.h: -------------------------------------------------------------------------------- 1 | #ifndef CTIME_H 2 | #define CTIME_H 3 | 4 | #include 5 | 6 | uint32_t posix_time(void); 7 | 8 | #endif /* CTIME_H */ 9 | -------------------------------------------------------------------------------- /com32/libupload/serial.h: -------------------------------------------------------------------------------- 1 | #ifndef SERIAL_H 2 | #define SERIAL_H 3 | 4 | #include 5 | 6 | struct serial_if { 7 | uint16_t port; 8 | bool console; 9 | struct { 10 | uint8_t dll, dlm, ier, iir, lcr, mcr; 11 | } old; 12 | }; 13 | 14 | int serial_init(struct serial_if *sif, const char *argv[]); 15 | void serial_read(struct serial_if *sif, void *data, size_t n); 16 | void serial_write(struct serial_if *sif, const void *data, size_t n); 17 | void serial_cleanup(struct serial_if *sif); 18 | 19 | #endif /* SERIAL_H */ 20 | -------------------------------------------------------------------------------- /com32/libupload/srecsend.h: -------------------------------------------------------------------------------- 1 | #ifndef SRECSEND_H 2 | #define SRECSEND_H 3 | 4 | #include "file.h" 5 | 6 | void send_srec(struct serial_if *, struct file_info *, 7 | void (*)(void *, size_t, struct file_info *, size_t)); 8 | 9 | #endif /* SRECSEND_H */ 10 | -------------------------------------------------------------------------------- /com32/libutil/include/sha1.h: -------------------------------------------------------------------------------- 1 | #ifndef LIBUTIL_SHA1_H 2 | #define LIBUTIL_SHA1_H 3 | 4 | #include 5 | 6 | typedef struct { 7 | uint32_t state[5]; 8 | uint32_t count[2]; 9 | unsigned char buffer[64]; 10 | } SHA1_CTX; 11 | 12 | void SHA1Transform(uint32_t state[5], const unsigned char buffer[64]); 13 | void SHA1Init(SHA1_CTX * context); 14 | void SHA1Update(SHA1_CTX * context, const unsigned char *data, uint32_t len); /* 15 | JHB */ 16 | void SHA1Final(unsigned char digest[20], SHA1_CTX * context); 17 | 18 | #endif /* LIBUTIL_SHA1_H */ 19 | -------------------------------------------------------------------------------- /com32/libutil/include/xcrypt.h: -------------------------------------------------------------------------------- 1 | #ifndef _LIBUTIL_XCRYPT_H 2 | #define _LIBUTIL_XCRYPT_H 3 | 4 | /* Extended crypt() implementations */ 5 | 6 | char *crypt_md5(const char *, const char *); 7 | char *sha256_crypt(const char *, const char *); 8 | char *sha512_crypt(const char *, const char *); 9 | 10 | #endif 11 | -------------------------------------------------------------------------------- /com32/lua/doc/amazon.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TritonDataCenter/syslinux/b78ed9f973e228e886229ccd9ab41dc228cb81b6/com32/lua/doc/amazon.gif -------------------------------------------------------------------------------- /com32/lua/doc/contents.html: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TritonDataCenter/syslinux/b78ed9f973e228e886229ccd9ab41dc228cb81b6/com32/lua/doc/contents.html -------------------------------------------------------------------------------- /com32/lua/doc/cover.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TritonDataCenter/syslinux/b78ed9f973e228e886229ccd9ab41dc228cb81b6/com32/lua/doc/cover.png -------------------------------------------------------------------------------- /com32/lua/doc/logo.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TritonDataCenter/syslinux/b78ed9f973e228e886229ccd9ab41dc228cb81b6/com32/lua/doc/logo.gif -------------------------------------------------------------------------------- /com32/lua/doc/manual.css: -------------------------------------------------------------------------------- 1 | h3 code { 2 | font-family: inherit ; 3 | } 4 | 5 | pre { 6 | font-size: 105% ; 7 | } 8 | 9 | span.apii { 10 | float: right ; 11 | font-family: inherit ; 12 | } 13 | 14 | -------------------------------------------------------------------------------- /com32/lua/etc/lua.hpp: -------------------------------------------------------------------------------- 1 | // lua.hpp 2 | // Lua header files for C++ 3 | // <> not supplied automatically because Lua also compiles as C++ 4 | 5 | extern "C" { 6 | #include "lua.h" 7 | #include "lualib.h" 8 | #include "lauxlib.h" 9 | } 10 | -------------------------------------------------------------------------------- /com32/lua/etc/lua.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TritonDataCenter/syslinux/b78ed9f973e228e886229ccd9ab41dc228cb81b6/com32/lua/etc/lua.ico -------------------------------------------------------------------------------- /com32/lua/src/lapi.h: -------------------------------------------------------------------------------- 1 | /* 2 | ** $Id: lapi.h,v 2.2.1.1 2007/12/27 13:02:25 roberto Exp $ 3 | ** Auxiliary functions from Lua API 4 | ** See Copyright Notice in lua.h 5 | */ 6 | 7 | #ifndef lapi_h 8 | #define lapi_h 9 | 10 | 11 | #include "lobject.h" 12 | 13 | 14 | LUAI_FUNC void luaA_pushobject (lua_State *L, const TValue *o); 15 | 16 | #endif 17 | -------------------------------------------------------------------------------- /com32/lua/test/cf.lua: -------------------------------------------------------------------------------- 1 | -- temperature conversion table (celsius to farenheit) 2 | 3 | for c0=-20,50-1,10 do 4 | io.write("C ") 5 | for c=c0,c0+10-1 do 6 | io.write(string.format("%3.0f ",c)) 7 | end 8 | io.write("\n") 9 | 10 | io.write("F ") 11 | for c=c0,c0+10-1 do 12 | f=(9/5)*c+32 13 | io.write(string.format("%3.0f ",f)) 14 | end 15 | io.write("\n\n") 16 | end 17 | -------------------------------------------------------------------------------- /com32/lua/test/dmi.lua: -------------------------------------------------------------------------------- 1 | if (dmi.supported()) then 2 | 3 | dmitable = dmi.gettable() 4 | 5 | for k,v in pairs(dmitable) do 6 | print(k, v) 7 | end 8 | 9 | print(dmitable["system.manufacturer"]) 10 | print(dmitable["system.product_name"]) 11 | print(dmitable["bios.bios_revision"]) 12 | 13 | if ( string.match(dmitable["system.product_name"], "ESPRIMO P7935") ) then 14 | print("Matches") 15 | syslinux.run_command("memdisk initrd=/dos/BIOS/FSC-P7935-108.img raw") 16 | else 17 | print("Does not match") 18 | end 19 | 20 | end 21 | 22 | -------------------------------------------------------------------------------- /com32/lua/test/echo.lua: -------------------------------------------------------------------------------- 1 | -- echo command line arguments 2 | 3 | for i=0,table.getn(arg) do 4 | print(i,arg[i]) 5 | end 6 | -------------------------------------------------------------------------------- /com32/lua/test/env.lua: -------------------------------------------------------------------------------- 1 | -- read environment variables as if they were global variables 2 | 3 | local f=function (t,i) return os.getenv(i) end 4 | setmetatable(getfenv(),{__index=f}) 5 | 6 | -- an example 7 | print(a,USER,PATH) 8 | -------------------------------------------------------------------------------- /com32/lua/test/fibfor.lua: -------------------------------------------------------------------------------- 1 | -- example of for with generator functions 2 | 3 | function generatefib (n) 4 | return coroutine.wrap(function () 5 | local a,b = 1, 1 6 | while a <= n do 7 | coroutine.yield(a) 8 | a, b = b, a+b 9 | end 10 | end) 11 | end 12 | 13 | for i in generatefib(1000) do print(i) end 14 | -------------------------------------------------------------------------------- /com32/lua/test/globals.lua: -------------------------------------------------------------------------------- 1 | -- reads luac listings and reports global variable usage 2 | -- lines where a global is written to are marked with "*" 3 | -- typical usage: luac -p -l file.lua | lua globals.lua | sort | lua table.lua 4 | 5 | while 1 do 6 | local s=io.read() 7 | if s==nil then break end 8 | local ok,_,l,op,g=string.find(s,"%[%-?(%d*)%]%s*([GS])ETGLOBAL.-;%s+(.*)$") 9 | if ok then 10 | if op=="S" then op="*" else op="" end 11 | io.write(g,"\t",l,op,"\n") 12 | end 13 | end 14 | -------------------------------------------------------------------------------- /com32/lua/test/hello.lua: -------------------------------------------------------------------------------- 1 | -- the first program in every language 2 | 3 | io.write("Hello world, from ",_VERSION,"!\n") 4 | -------------------------------------------------------------------------------- /com32/lua/test/life.lua: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TritonDataCenter/syslinux/b78ed9f973e228e886229ccd9ab41dc228cb81b6/com32/lua/test/life.lua -------------------------------------------------------------------------------- /com32/lua/test/luac.lua: -------------------------------------------------------------------------------- 1 | -- bare-bones luac in Lua 2 | -- usage: lua luac.lua file.lua 3 | 4 | assert(arg[1]~=nil and arg[2]==nil,"usage: lua luac.lua file.lua") 5 | f=assert(io.open("luac.out","wb")) 6 | assert(f:write(string.dump(assert(loadfile(arg[1]))))) 7 | assert(f:close()) 8 | -------------------------------------------------------------------------------- /com32/lua/test/printf.lua: -------------------------------------------------------------------------------- 1 | -- an implementation of printf 2 | 3 | function printf(...) 4 | io.write(string.format(...)) 5 | end 6 | 7 | printf("Hello %s from %s on %s\n",os.getenv"USER" or "there",_VERSION,os.date()) 8 | -------------------------------------------------------------------------------- /com32/lua/test/readonly.lua: -------------------------------------------------------------------------------- 1 | -- make global variables readonly 2 | 3 | local f=function (t,i) error("cannot redefine global variable `"..i.."'",2) end 4 | local g={} 5 | local G=getfenv() 6 | setmetatable(g,{__index=G,__newindex=f}) 7 | setfenv(1,g) 8 | 9 | -- an example 10 | rawset(g,"x",3) 11 | x=2 12 | y=1 -- cannot redefine `y' 13 | -------------------------------------------------------------------------------- /com32/lua/test/syslinux.lua: -------------------------------------------------------------------------------- 1 | syslinux.run_command("memdisk initrd=/dos/BIOS/FSC-P7935-108.img raw") 2 | -------------------------------------------------------------------------------- /com32/lua/test/table.lua: -------------------------------------------------------------------------------- 1 | -- make table, grouping all data for the same item 2 | -- input is 2 columns (item, data) 3 | 4 | local A 5 | while 1 do 6 | local l=io.read() 7 | if l==nil then break end 8 | local _,_,a,b=string.find(l,'"?([_%w]+)"?%s*(.*)$') 9 | if a~=A then A=a io.write("\n",a,":") end 10 | io.write(" ",b) 11 | end 12 | io.write("\n") 13 | -------------------------------------------------------------------------------- /com32/lua/test/xd.lua: -------------------------------------------------------------------------------- 1 | -- hex dump 2 | -- usage: lua xd.lua < file 3 | 4 | local offset=0 5 | while true do 6 | local s=io.read(16) 7 | if s==nil then return end 8 | io.write(string.format("%08X ",offset)) 9 | string.gsub(s,"(.)", 10 | function (c) io.write(string.format("%02X ",string.byte(c))) end) 11 | io.write(string.rep(" ",3*(16-string.len(s)))) 12 | io.write(" ",string.gsub(s,"%c","."),"\n") 13 | offset=offset+16 14 | end 15 | -------------------------------------------------------------------------------- /com32/menu/drain.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include 4 | #include 5 | #include 6 | 7 | void drain_keyboard(void) 8 | { 9 | /* Prevent "ghost typing" and keyboard buffer snooping */ 10 | volatile char junk; 11 | int rv; 12 | 13 | do { 14 | rv = read(0, (char *)&junk, 1); 15 | } while (rv > 0); 16 | 17 | junk = 0; 18 | 19 | cli(); 20 | *(volatile uint8_t *)0x419 = 0; /* Alt-XXX keyboard area */ 21 | *(volatile uint16_t *)0x41a = 0x1e; /* Keyboard buffer empty */ 22 | *(volatile uint16_t *)0x41c = 0x1e; 23 | memset((void *)0x41e, 0, 32); /* Clear the actual keyboard buffer */ 24 | sti(); 25 | } 26 | -------------------------------------------------------------------------------- /com32/modules/cat.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include 4 | 5 | int main(int argc, char *argv[]) 6 | { 7 | FILE *f; 8 | int i; 9 | int len; 10 | char buf[4096]; 11 | 12 | openconsole(&dev_stdcon_r, &dev_stdcon_w); 13 | 14 | if (argc < 2) { 15 | fprintf(stderr, "Usage: %s filename...\n", argv[0]); 16 | return 1; 17 | } 18 | 19 | for (i = 1; i < argc; i++) { 20 | f = fopen(argv[i], "r"); 21 | if (!f) { 22 | fprintf(stderr, "%s: %s: file not found\n", argv[0], argv[i]); 23 | return 1; 24 | } 25 | 26 | while ((len = fread(buf, 1, sizeof buf, f)) > 0) 27 | fwrite(buf, 1, len, stdout); 28 | 29 | fclose(f); 30 | } 31 | 32 | return 0; 33 | } 34 | -------------------------------------------------------------------------------- /com32/modules/reboot.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | 4 | int main(int argc, char *argv[]) 5 | { 6 | int warm = 0; 7 | int i; 8 | 9 | for (i = 1; i < argc; i++) { 10 | if (!strcmp(argv[i], "-w") || !strcmp(argv[i], "--warm")) 11 | warm = 1; 12 | } 13 | 14 | syslinux_reboot(warm); 15 | } 16 | -------------------------------------------------------------------------------- /com32/modules/stubs/copydown.asm: -------------------------------------------------------------------------------- 1 | bits 16 2 | rep movsd 3 | mov si,0 4 | mov di,0 5 | mov ds,si 6 | mov es,di 7 | mov ecx,0 8 | mov esi,0 9 | mov edi,0 10 | jmp 0:0 11 | align 16 12 | -------------------------------------------------------------------------------- /com32/modules/stubs/swapstub.asm: -------------------------------------------------------------------------------- 1 | bits 16 2 | swap: 3 | push bx 4 | movzx bx,dl 5 | mov dl,[cs:bx+(table-$$)] 6 | pop bx 7 | .jmp: jmp 0:0 8 | nop 9 | nop 10 | install: 11 | ;; DS = CS, ES = 0 12 | mov edi,[es:si+4*0x13] 13 | mov [swap.jmp+1],edi 14 | mov di,[es:0x413] 15 | dec di 16 | mov [es:0x413],di 17 | shl edi,16+6 18 | mov [es:si+4*0x13],edi 19 | shr edi,16 20 | mov es,di 21 | xor di,di 22 | rep movsd 23 | mov si,0 24 | mov di,0 25 | mov ds,si 26 | mov es,di 27 | mov ecx,0 28 | mov esi,0 29 | mov edi,0 30 | jmp 0:0 31 | 32 | align 16 33 | table: 34 | -------------------------------------------------------------------------------- /com32/samples/localboot.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | 4 | int main(int argc, char *argv[]) 5 | { 6 | syslinux_local_boot(argc > 1 ? atoi(argv[1]) : 0); 7 | 8 | return 0; 9 | } 10 | -------------------------------------------------------------------------------- /com32/sysdump/sysdump.h: -------------------------------------------------------------------------------- 1 | #ifndef SYSDUMP_H 2 | #define SYSDUMP_H 3 | 4 | #include 5 | 6 | void dump_memory_map(struct upload_backend *); 7 | void snapshot_lowmem(void); 8 | void dump_memory(struct upload_backend *); 9 | void dump_dmi(struct upload_backend *); 10 | void dump_acpi(struct upload_backend *); 11 | void dump_cpuid(struct upload_backend *); 12 | void dump_pci(struct upload_backend *); 13 | void dump_vesa_tables(struct upload_backend *); 14 | 15 | #endif /* SYSDUMP_H */ 16 | -------------------------------------------------------------------------------- /com32/tools/.gitignore: -------------------------------------------------------------------------------- 1 | /relocs 2 | -------------------------------------------------------------------------------- /core/codepage.S: -------------------------------------------------------------------------------- 1 | .section ".rodata","a" 2 | .globl codepage 3 | codepage: 4 | .incbin "codepage.cp" 5 | .size codepage, .-codepage 6 | -------------------------------------------------------------------------------- /core/console.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include 4 | #include 5 | 6 | void myputchar(int c) 7 | { 8 | static com32sys_t ireg; 9 | 10 | if (c == '\n') 11 | myputchar('\r'); 12 | 13 | ireg.eax.b[1] = 0x02; 14 | ireg.edx.b[0] = c; 15 | __intcall(0x21, &ireg, NULL); 16 | } 17 | 18 | void myputs(const char *str) 19 | { 20 | while (*str) 21 | myputchar(*str++); 22 | } 23 | -------------------------------------------------------------------------------- /core/extern.inc: -------------------------------------------------------------------------------- 1 | ; 2 | ; extern.inc 3 | ; 4 | ; Prototypes for external functions 5 | 6 | %ifndef EXTERN_INC 7 | %define EXTERN_INC 8 | 9 | ; rllpack.c 10 | extern rllpack, rllunpack 11 | 12 | ; fs.c 13 | extern fs_init, pm_searchdir, getfssec, getfsbytes 14 | extern pm_mangle_name, pm_load_config 15 | extern pm_open_file, pm_close_file 16 | extern SectorSize, SectorShift 17 | 18 | ; chdir.c 19 | extern pm_realpath 20 | 21 | ; readdir.c 22 | extern opendir, readdir, closedir 23 | 24 | ; newconfig.c 25 | extern pm_is_config_file 26 | 27 | %if IS_PXELINUX 28 | ; pxe.c 29 | extern unload_pxe, reset_pxe 30 | %endif 31 | 32 | %endif ; EXTERN_INC 33 | -------------------------------------------------------------------------------- /core/fs/getcwd.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include "fs.h" 3 | 4 | char *getcwd(char *buf, size_t size) 5 | { 6 | char *ret = NULL; 7 | 8 | if((buf != NULL) && (strlen(this_fs->cwd_name) < size)) { 9 | strcpy(buf, this_fs->cwd_name); 10 | ret = buf; 11 | } 12 | return ret; 13 | } 14 | -------------------------------------------------------------------------------- /core/fs/lib/close.c: -------------------------------------------------------------------------------- 1 | #include "fs.h" 2 | 3 | void generic_close_file(struct file *file) 4 | { 5 | if (file->inode) { 6 | file->offset = 0; 7 | put_inode(file->inode); 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /core/fs/nonextextent.c: -------------------------------------------------------------------------------- 1 | #include "fs.h" 2 | 3 | /* 4 | * Use this routine for the next_extent() pointer when we never should 5 | * be calling next_extent(), e.g. iso9660. 6 | */ 7 | int no_next_extent(struct inode *inode, uint32_t lstart) 8 | { 9 | (void)inode; 10 | (void)lstart; 11 | 12 | return -1; 13 | } 14 | -------------------------------------------------------------------------------- /core/genhash.pl: -------------------------------------------------------------------------------- 1 | #!/usr/bin/perl 2 | # 3 | # Generate hash values for keywords 4 | # 5 | 6 | eval { use bytes; }; 7 | 8 | while ( defined($keywd = ) ) { 9 | chomp $keywd; 10 | 11 | ($keywd,$keywdname) = split(/\s+/, $keywd); 12 | $keywdname = $keywd unless ( $keywdname ); 13 | 14 | $l = length($keywd); 15 | $h = 0; 16 | for ( $i = 0 ; $i < $l ; $i++ ) { 17 | $c = ord(substr($keywd,$i,1)) | 0x20; 18 | $h = ((($h << 5)|($h >> 27)) ^ $c) & 0xFFFFFFFF; 19 | } 20 | if ( $seenhash{$h} ) { 21 | printf STDERR "$0: hash collision (0x%08x) %s %s\n", 22 | $h, $keywd, $seenhash{$h}; 23 | } 24 | $seenhash{$h} = $keywd; 25 | printf("%-23s equ 0x%08x\n", "hash_${keywdname}", $h); 26 | } 27 | -------------------------------------------------------------------------------- /core/include/cache.h: -------------------------------------------------------------------------------- 1 | #ifndef _CACHE_H 2 | #define _CACHE_H 3 | 4 | #include 5 | #include 6 | #include "disk.h" 7 | #include "fs.h" 8 | 9 | /* The cache structure */ 10 | struct cache { 11 | block_t block; 12 | struct cache *prev; 13 | struct cache *next; 14 | void *data; 15 | }; 16 | 17 | /* functions defined in cache.c */ 18 | void cache_init(struct device *, int); 19 | const void *get_cache(struct device *, block_t); 20 | struct cache *_get_cache_block(struct device *, block_t); 21 | void cache_lock_block(struct cache *); 22 | 23 | #endif /* cache.h */ 24 | -------------------------------------------------------------------------------- /core/include/ctype.h: -------------------------------------------------------------------------------- 1 | #ifndef CTYPE_H 2 | #define CTYPE_H 3 | 4 | /* 5 | * Small subset of for parsing uses, only handles ASCII 6 | * and passes the rest through. 7 | */ 8 | 9 | static inline int toupper(int c) 10 | { 11 | if (c >= 'a' && c <= 'z') 12 | c -= 0x20; 13 | 14 | return c; 15 | } 16 | 17 | static inline int tolower(int c) 18 | { 19 | if (c >= 'A' && c <= 'Z') 20 | c += 0x20; 21 | 22 | return c; 23 | } 24 | 25 | #endif /* CTYPE_H */ 26 | -------------------------------------------------------------------------------- /core/include/pmapi.h: -------------------------------------------------------------------------------- 1 | #ifndef PMAPI_H 2 | #define PMAPI_H 3 | 4 | #include 5 | 6 | size_t pmapi_read_file(uint16_t *, void *, size_t); 7 | 8 | #endif /* PMAPI_H */ 9 | -------------------------------------------------------------------------------- /core/isolinux-debug.asm: -------------------------------------------------------------------------------- 1 | %define DEBUG_MESSAGES 1 2 | %include "isolinux.asm" 3 | -------------------------------------------------------------------------------- /core/kaboom.c: -------------------------------------------------------------------------------- 1 | /* 2 | * kaboom.c 3 | */ 4 | 5 | #include "core.h" 6 | 7 | #undef kaboom 8 | 9 | __noreturn _kaboom(void) 10 | { 11 | extern void kaboom(void); 12 | call16(kaboom, &zero_regs, NULL); 13 | /* Do this if kaboom somehow returns... */ 14 | for (;;) 15 | asm volatile("hlt"); 16 | } 17 | -------------------------------------------------------------------------------- /core/keywords: -------------------------------------------------------------------------------- 1 | menu 2 | text 3 | include 4 | append 5 | initrd 6 | config 7 | default 8 | ui 9 | display 10 | font 11 | implicit 12 | ipappend 13 | kbdmap 14 | kernel 15 | linux 16 | boot 17 | bss 18 | pxe 19 | pxeretry 20 | fdimage 21 | comboot 22 | com32 23 | label 24 | localboot 25 | prompt 26 | say 27 | serial 28 | console 29 | timeout 30 | totaltimeout 31 | allowoptions 32 | ontimeout 33 | onerror 34 | noescape 35 | nocomplete 36 | nohalt 37 | f0 38 | f1 39 | f2 40 | f3 41 | f4 42 | f5 43 | f6 44 | f7 45 | f8 46 | f9 47 | f10 48 | f11 49 | f12 50 | -------------------------------------------------------------------------------- /core/plaincon.inc: -------------------------------------------------------------------------------- 1 | ; 2 | ; writechr: Write a single character in AL to the console without 3 | ; mangling any registers; handle video pages correctly. 4 | ; 5 | section .text16 6 | 7 | writechr: 8 | call write_serial ; write to serial port if needed 9 | pushfd 10 | test byte [cs:UsingVGA], 08h 11 | jz .videook 12 | call vgaclearmode 13 | .videook: 14 | test byte [cs:DisplayCon], 01h 15 | jz .nothing 16 | pushad 17 | mov ah,0Eh 18 | mov bl,07h ; attribute 19 | mov bh,[cs:BIOS_page] ; current page 20 | int 10h 21 | popad 22 | .nothing: 23 | popfd 24 | ret 25 | -------------------------------------------------------------------------------- /core/prefix.inc: -------------------------------------------------------------------------------- 1 | ; 2 | ; The prefix is a small structure that prefaces the actual code; 3 | ; it gives the compression program necessary information. 4 | ; 5 | 6 | section .prefix nowrite progbits align=16 7 | pfx_start dd _start ; Start of raw chunk 8 | pfx_compressed dd __pm_code_lma ; Start of compressed chunk 9 | pfx_cdatalen dd lzo_data_size ; Pointer to compressed size field 10 | %if IS_ISOLINUX 11 | pfx_checksum dd bi_length ; File length and checksum fields 12 | %else 13 | pfx_checksum dd 0 ; No checksum 14 | %endif 15 | pfx_maxlma dd MaxLMA ; Maximum size 16 | 17 | section .text16 18 | -------------------------------------------------------------------------------- /core/printf.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | 4 | #include "core.h" 5 | 6 | int printf(const char *format, ...) 7 | { 8 | char buf[1024]; 9 | va_list ap; 10 | int rv; 11 | 12 | va_start(ap, format); 13 | rv = vsnprintf(buf, sizeof buf, format, ap); 14 | va_end(ap); 15 | 16 | myputs(buf); 17 | 18 | return rv; 19 | 20 | } 21 | -------------------------------------------------------------------------------- /core/strcasecmp.c: -------------------------------------------------------------------------------- 1 | /* 2 | * strcasecmp.c 3 | */ 4 | 5 | #include 6 | #include 7 | 8 | int strcasecmp(const char *s1, const char *s2) 9 | { 10 | return strncasecmp(s1, s2, -1); 11 | } 12 | -------------------------------------------------------------------------------- /core/strcpy.inc: -------------------------------------------------------------------------------- 1 | ; 2 | ; strcpy: Copy DS:SI -> ES:DI up to and including a null byte; 3 | ; on exit SI and DI point to the byte *after* the null byte 4 | ; 5 | section .text16 6 | 7 | strcpy: push ax 8 | .loop: lodsb 9 | stosb 10 | and al,al 11 | jnz .loop 12 | pop ax 13 | ret 14 | -------------------------------------------------------------------------------- /core/strncasecmp.c: -------------------------------------------------------------------------------- 1 | /* 2 | * strncasecmp.c 3 | */ 4 | 5 | #include 6 | #include 7 | 8 | int strncasecmp(const char *s1, const char *s2, size_t n) 9 | { 10 | const unsigned char *c1 = (const unsigned char *)s1; 11 | const unsigned char *c2 = (const unsigned char *)s2; 12 | unsigned char ch; 13 | int d = 0; 14 | 15 | while (n--) { 16 | /* toupper() expects an unsigned char (implicitly cast to int) 17 | as input, and returns an int, which is exactly what we want. */ 18 | d = toupper(ch = *c1++) - toupper(*c2++); 19 | if (d || !ch) 20 | break; 21 | } 22 | 23 | return d; 24 | } 25 | -------------------------------------------------------------------------------- /devel/Nindent: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | PARAM="-npro -kr -i4 -ts8 -sob -l80 -ss -ncs -cp1" 3 | RES=`indent --version` 4 | V1=`echo $RES | cut -d' ' -f3 | cut -d'.' -f1` 5 | V2=`echo $RES | cut -d' ' -f3 | cut -d'.' -f2` 6 | V3=`echo $RES | cut -d' ' -f3 | cut -d'.' -f3` 7 | if [ $V1 -gt 2 ]; then 8 | PARAM="$PARAM -il0" 9 | elif [ $V1 -eq 2 ]; then 10 | if [ $V2 -gt 2 ]; then 11 | PARAM="$PARAM -il0"; 12 | elif [ $V2 -eq 2 ]; then 13 | if [ $V3 -ge 10 ]; then 14 | PARAM="$PARAM -il0" 15 | fi 16 | fi 17 | fi 18 | exec indent $PARAM "$@" 19 | -------------------------------------------------------------------------------- /diag/Makefile: -------------------------------------------------------------------------------- 1 | SUBDIRS = mbr geodsp 2 | 3 | all tidy dist clean spotless install: 4 | set -e; for d in $(SUBDIRS); do $(MAKE) -C $$d $@; done 5 | -------------------------------------------------------------------------------- /diag/README: -------------------------------------------------------------------------------- 1 | Diagnostic tools and images to assist with troubleshooting Syslinux-related issues. See README in each directory for more details. 2 | 3 | geodsp/ Display geometry/LBA translation as the BIOS detects it. 4 | mbr/ Diagnostic MBRs 5 | -------------------------------------------------------------------------------- /doc/logo/LICENSE: -------------------------------------------------------------------------------- 1 | The Syslinux logo is licensed under the Creative Commons 2 | Attribution-ShareAlike 3.0 Unported License. To view a copy of this 3 | license, visit http://creativecommons.org/licenses/by-sa/3.0/ or send 4 | a letter to Creative Commons, 444 Castro Street, Suite 900, Mountain 5 | View, California, 94041, USA. 6 | -------------------------------------------------------------------------------- /doc/logo/syslinux-100.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TritonDataCenter/syslinux/b78ed9f973e228e886229ccd9ab41dc228cb81b6/doc/logo/syslinux-100.png -------------------------------------------------------------------------------- /dos/__divdi3.c: -------------------------------------------------------------------------------- 1 | /* 2 | * arch/i386/libgcc/__divdi3.c 3 | */ 4 | 5 | #include 6 | #include 7 | 8 | extern uint64_t __udivmoddi4(uint64_t num, uint64_t den, uint64_t * rem); 9 | 10 | int64_t __divdi3(int64_t num, int64_t den) 11 | { 12 | int minus = 0; 13 | int64_t v; 14 | 15 | if (num < 0) { 16 | num = -num; 17 | minus = 1; 18 | } 19 | if (den < 0) { 20 | den = -den; 21 | minus ^= 1; 22 | } 23 | 24 | v = __udivmoddi4(num, den, NULL); 25 | if (minus) 26 | v = -v; 27 | 28 | return v; 29 | } 30 | -------------------------------------------------------------------------------- /dos/__udivmoddi4.c: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | uint64_t __udivmoddi4(uint64_t num, uint64_t den, uint64_t * rem_p) 4 | { 5 | uint64_t quot = 0, qbit = 1; 6 | 7 | if (den == 0) { 8 | asm volatile ("int $0"); 9 | return 0; /* If trap returns... */ 10 | } 11 | 12 | /* Left-justify denominator and count shift */ 13 | while ((int64_t) den >= 0) { 14 | den <<= 1; 15 | qbit <<= 1; 16 | } 17 | 18 | while (qbit) { 19 | if (den <= num) { 20 | num -= den; 21 | quot += qbit; 22 | } 23 | den >>= 1; 24 | qbit >>= 1; 25 | } 26 | 27 | if (rem_p) 28 | *rem_p = num; 29 | 30 | return quot; 31 | } 32 | -------------------------------------------------------------------------------- /dos/atou.c: -------------------------------------------------------------------------------- 1 | #include "mystuff.h" 2 | 3 | unsigned int atou(const char *s) 4 | { 5 | unsigned int i = 0; 6 | while (isdigit(*s)) 7 | i = i * 10 + (*s++ - '0'); 8 | return i; 9 | } 10 | -------------------------------------------------------------------------------- /dos/code16.h: -------------------------------------------------------------------------------- 1 | /* Must be included first of all */ 2 | #ifdef __ASSEMBLY__ 3 | .code16 4 | #else 5 | __asm__ (".code16gcc"); 6 | #endif 7 | -------------------------------------------------------------------------------- /dos/ctype.h: -------------------------------------------------------------------------------- 1 | static int isspace(int c) { 2 | return (c == ' '); 3 | } 4 | -------------------------------------------------------------------------------- /dos/inttypes.h: -------------------------------------------------------------------------------- 1 | #include 2 | -------------------------------------------------------------------------------- /dos/ldlinux.S: -------------------------------------------------------------------------------- 1 | /* 2 | * Wrap ldlinux.sys; this needs special handling for DOS. 3 | */ 4 | 5 | .section ".payload","aw" 6 | .balign 16 7 | .globl syslinux_ldlinux, syslinux_ldlinux_size 8 | syslinux_ldlinux: 9 | .incbin "../core/ldlinux.sys" 10 | .space ((syslinux_ldlinux - .) & 511) 11 | syslinux_ldlinux_size = . - syslinux_ldlinux 12 | .size syslinux_ldlinux, .-syslinux_ldlinux 13 | 14 | .section ".rodata","a" 15 | .balign 4 16 | .globl syslinux_ldlinux_len 17 | syslinux_ldlinux_len: 18 | .long syslinux_ldlinux_size 19 | .size syslinux_ldlinux_len, .-syslinux_ldlinux_len 20 | -------------------------------------------------------------------------------- /dos/memcpy.S: -------------------------------------------------------------------------------- 1 | # 2 | # memcpy.S 3 | # 4 | # Simple 16-bit memcpy() implementation 5 | # 6 | 7 | .text 8 | .code16gcc 9 | .globl memcpy 10 | .type memcpy, @function 11 | memcpy: 12 | cld 13 | pushw %di 14 | pushw %si 15 | movw %ax,%di 16 | movw %dx,%si 17 | # The third argument is already in cx 18 | rep ; movsb 19 | popw %si 20 | popw %di 21 | ret 22 | 23 | .size memcpy,.-memcpy 24 | -------------------------------------------------------------------------------- /dos/memmove.S: -------------------------------------------------------------------------------- 1 | # 2 | # memmove.S 3 | # 4 | # Simple 16-bit memmove() implementation 5 | # 6 | 7 | .text 8 | .code16gcc 9 | .globl memmove 10 | .type memmove, @function 11 | memmove: 12 | pushw %di 13 | pushw %si 14 | movw %ax,%di 15 | movw %dx,%si 16 | cmpw %si,%di 17 | ja 1f 18 | # The third argument is already in cx 19 | cld 20 | rep ; movsb 21 | 2: 22 | popw %si 23 | popw %di 24 | ret 25 | 26 | 1: /* si <= di, need reverse copy */ 27 | add %cx,%di 28 | add %cx,%si 29 | dec %di 30 | dec %si 31 | std 32 | rep ; movsb 33 | cld 34 | jmp 2b 35 | 36 | .size memmove,.-memmove 37 | -------------------------------------------------------------------------------- /dos/memset.S: -------------------------------------------------------------------------------- 1 | # 2 | # memset.S 3 | # 4 | # Minimal 16-bit memset() implementation 5 | # 6 | 7 | .text 8 | .code16gcc 9 | .globl memset 10 | .type memset, @function 11 | memset: 12 | cld 13 | pushw %di 14 | movw %ax,%di 15 | movb %dl,%al 16 | # The third argument is already in %cx 17 | rep ; stosb 18 | popw %di 19 | retl 20 | 21 | .size memset,.-memset 22 | -------------------------------------------------------------------------------- /dos/mystuff.h: -------------------------------------------------------------------------------- 1 | #ifndef MYSTUFF_H 2 | #define MYSTUFF_H 3 | 4 | #include 5 | 6 | #define NULL ((void *)0) 7 | 8 | unsigned int skip_atou(const char **s); 9 | unsigned int atou(const char *s); 10 | 11 | static inline int isdigit(int ch) 12 | { 13 | return (ch >= '0') && (ch <= '9'); 14 | } 15 | 16 | struct diskio { 17 | uint32_t startsector; 18 | uint16_t sectors; 19 | uint16_t bufoffs, bufseg; 20 | } __attribute__ ((packed)); 21 | int int25_read_sector(unsigned char drive, struct diskio *dio); 22 | int int26_write_sector(unsigned char drive, struct diskio *dio); 23 | 24 | #endif /* MYSTUFF_H */ 25 | -------------------------------------------------------------------------------- /dos/perror.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | 4 | void perror(const char *msg) 5 | { 6 | printf("%s: error %s\n", msg, errno); 7 | } 8 | -------------------------------------------------------------------------------- /dos/skipatou.c: -------------------------------------------------------------------------------- 1 | #include "mystuff.h" 2 | 3 | unsigned int skip_atou(const char **s) 4 | { 5 | int i = 0; 6 | 7 | while (isdigit(**s)) 8 | i = i * 10 + *((*s)++) - '0'; 9 | return i; 10 | } 11 | -------------------------------------------------------------------------------- /dos/stdio.h: -------------------------------------------------------------------------------- 1 | #ifndef STDIO_H 2 | #define STDIO_H 3 | 4 | #include 5 | #include 6 | 7 | typedef unsigned int off_t; 8 | 9 | int putchar(int); 10 | int puts(const char *); 11 | int sprintf(char *buf, const char *fmt, ...); 12 | int vsprintf(char *buf, const char *fmt, va_list args); 13 | int printf(const char *fmt, ...); 14 | 15 | #define stdin 0 16 | #define stdout 1 17 | #define stderr 2 18 | 19 | #define EOF (-1) 20 | 21 | #define fprintf(x, y, ...) printf(y, ## __VA_ARGS__) 22 | 23 | #endif /* STDIO_H */ 24 | -------------------------------------------------------------------------------- /dos/stdlib.h: -------------------------------------------------------------------------------- 1 | #ifndef STDLIB_H 2 | #define STDLIB_H 3 | 4 | typedef int ssize_t; 5 | typedef unsigned int size_t; 6 | 7 | void __attribute__ ((noreturn)) exit(int); 8 | 9 | void *malloc(size_t); 10 | void *calloc(size_t, size_t); 11 | void free(void *); 12 | 13 | extern unsigned long int strtoul(const char *nptr, 14 | char **endptr, int base); 15 | 16 | #endif 17 | -------------------------------------------------------------------------------- /dos/strchr.c: -------------------------------------------------------------------------------- 1 | /* 2 | * strchr.c 3 | */ 4 | 5 | #include 6 | #include "mystuff.h" 7 | 8 | char *strchr(const char *s, int c) 9 | { 10 | while (*s != (char)c) { 11 | if (!*s) 12 | return NULL; 13 | s++; 14 | } 15 | 16 | return (char *)s; 17 | } 18 | -------------------------------------------------------------------------------- /dos/string.h: -------------------------------------------------------------------------------- 1 | /* 2 | * string.h 3 | */ 4 | 5 | #ifndef _STRING_H 6 | #define _STRING_H 7 | 8 | /* Standard routines */ 9 | #define memcpy(a,b,c) __builtin_memcpy(a,b,c) 10 | #define memmove(a,b,c) __builtin_memmove(a,b,c) 11 | #define memset(a,b,c) __builtin_memset(a,b,c) 12 | #define strcpy(a,b) __builtin_strcpy(a,b) 13 | #define strlen(a) __builtin_strlen(a) 14 | 15 | /* This only returns true or false */ 16 | static inline int memcmp(const void *__m1, const void *__m2, unsigned int __n) 17 | { 18 | _Bool rv; 19 | asm volatile ("cld ; repe ; cmpsb ; setne %0":"=abd" (rv), "+D"(__m1), 20 | "+S"(__m2), "+c"(__n)); 21 | return rv; 22 | } 23 | 24 | extern char *strchr(const char *s, int c); 25 | 26 | #endif /* _STRING_H */ 27 | -------------------------------------------------------------------------------- /dos/strtoul.c: -------------------------------------------------------------------------------- 1 | /* 2 | * strtoul.c 3 | * 4 | * strtoul() function 5 | */ 6 | 7 | #include 8 | #include 9 | 10 | extern uintmax_t strntoumax(const char *nptr, char **endptr, int base, size_t n); 11 | 12 | unsigned long strtoul(const char *nptr, char **endptr, int base) 13 | { 14 | return (unsigned long) strntoumax(nptr, endptr, base, ~(size_t) 0); 15 | } 16 | -------------------------------------------------------------------------------- /dos/sysexits.h: -------------------------------------------------------------------------------- 1 | #define EX_USAGE 0x40 2 | -------------------------------------------------------------------------------- /dosutil/.gitignore: -------------------------------------------------------------------------------- 1 | !mdiskchk.com 2 | -------------------------------------------------------------------------------- /dosutil/README: -------------------------------------------------------------------------------- 1 | This directory contains utilities for use under DOS. 2 | Although not part of Syslinux per se, they might be useful with MEMDISK. 3 | 4 | eltorito.sys - Generic El Torito CD-ROM driver 5 | Written by Gary Tong and Bart Lagerweij. 6 | Ported to NASM by H. Peter Anvin. 7 | 8 | mdiskchk.com - Simple program to query for the existence of a 9 | MEMDISK and display parameters. 10 | 11 | -------------------------------------------------------------------------------- /dosutil/mdiskchk.com: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TritonDataCenter/syslinux/b78ed9f973e228e886229ccd9ab41dc228cb81b6/dosutil/mdiskchk.com -------------------------------------------------------------------------------- /dummy.c: -------------------------------------------------------------------------------- 1 | /* 2 | * Trivial C program to test the compiler 3 | */ 4 | 5 | int main(int argc, char *argv[]) 6 | { 7 | return 0; 8 | } 9 | -------------------------------------------------------------------------------- /extlinux/fat.h: -------------------------------------------------------------------------------- 1 | #ifndef _H_FAT_ 2 | #define _H_FAT_ 3 | 4 | #define MSDOS_SUPER_MAGIC 0x4d44 /* MD */ 5 | /* The rest is defined in syslxint.h */ 6 | 7 | #endif 8 | -------------------------------------------------------------------------------- /gpxe/.gitignore: -------------------------------------------------------------------------------- 1 | /contrib 2 | -------------------------------------------------------------------------------- /gpxe/LOG: -------------------------------------------------------------------------------- 1 | gPXE LOG file 2 | 3 | + Development for gPXE was moved from SourceForge CVS to a git 4 | repository on git.etherboot.org in the first half of the year 2007. 5 | 6 | + The gitweb interface for gPXE is available at: 7 | 8 | http://git.etherboot.org/?p=gpxe.git 9 | 10 | + The gitweb interface largely obsoletes the LOG file that used to be 11 | distributed with Etherboot. 12 | 13 | -------------------------------------------------------------------------------- /gpxe/VERSION: -------------------------------------------------------------------------------- 1 | 0.9.6+ 2008-11-23 2 | -------------------------------------------------------------------------------- /gpxe/pxelinux.gpxe: -------------------------------------------------------------------------------- 1 | #!gpxe 2 | set use-cached 1 3 | dhcp net0 4 | imgload pxelinux.0 5 | boot pxelinux.0 6 | -------------------------------------------------------------------------------- /gpxe/pxelinuxk.gpxe: -------------------------------------------------------------------------------- 1 | #!gpxe 2 | set use-cached 0 3 | dhcp net0 4 | imgload pxelinux.0 5 | boot pxelinux.0 6 | -------------------------------------------------------------------------------- /gpxe/src/.gitignore: -------------------------------------------------------------------------------- 1 | .toolcheck 2 | .echocheck 3 | TAGS* 4 | bin* 5 | config-local.h 6 | -------------------------------------------------------------------------------- /gpxe/src/arch/i386/Makefile.efi: -------------------------------------------------------------------------------- 1 | # -*- makefile -*- : Force emacs to use Makefile mode 2 | 3 | # Specify EFI image builder 4 | # 5 | ELF2EFI = $(ELF2EFI32) 6 | 7 | # Include generic EFI Makefile 8 | # 9 | MAKEDEPS += arch/x86/Makefile.efi 10 | include arch/x86/Makefile.efi 11 | -------------------------------------------------------------------------------- /gpxe/src/arch/i386/core/stack.S: -------------------------------------------------------------------------------- 1 | FILE_LICENCE ( GPL2_OR_LATER ) 2 | 3 | .arch i386 4 | 5 | /**************************************************************************** 6 | * Internal stack 7 | **************************************************************************** 8 | */ 9 | .section ".stack", "aw", @nobits 10 | .align 8 11 | .globl _stack 12 | _stack: 13 | .space 4096 14 | .globl _estack 15 | _estack: 16 | -------------------------------------------------------------------------------- /gpxe/src/arch/i386/core/stack16.S: -------------------------------------------------------------------------------- 1 | FILE_LICENCE ( GPL2_OR_LATER ) 2 | 3 | .arch i386 4 | 5 | /**************************************************************************** 6 | * Internal stack 7 | **************************************************************************** 8 | */ 9 | .section ".stack16", "aw", @nobits 10 | .align 8 11 | .globl _stack16 12 | _stack16: 13 | .space 4096 14 | .globl _estack16 15 | _estack16: 16 | -------------------------------------------------------------------------------- /gpxe/src/arch/i386/include/basemem_packet.h: -------------------------------------------------------------------------------- 1 | #ifndef BASEMEM_PACKET_H 2 | #define BASEMEM_PACKET_H 3 | 4 | FILE_LICENCE ( GPL2_OR_LATER ); 5 | 6 | #include 7 | 8 | /** Maximum length of base memory packet buffer */ 9 | #define BASEMEM_PACKET_LEN 1514 10 | 11 | /** Base memory packet buffer */ 12 | extern char __bss16_array ( basemem_packet, [BASEMEM_PACKET_LEN] ); 13 | #define basemem_packet __use_data16 ( basemem_packet ) 14 | 15 | #endif /* BASEMEM_PACKET_H */ 16 | -------------------------------------------------------------------------------- /gpxe/src/arch/i386/include/bios.h: -------------------------------------------------------------------------------- 1 | #ifndef BIOS_H 2 | #define BIOS_H 3 | 4 | FILE_LICENCE ( GPL2_OR_LATER ); 5 | 6 | #define BDA_SEG 0x0040 7 | #define BDA_FBMS 0x0013 8 | #define BDA_NUM_DRIVES 0x0075 9 | 10 | #endif /* BIOS_H */ 11 | -------------------------------------------------------------------------------- /gpxe/src/arch/i386/include/bits/eltorito.h: -------------------------------------------------------------------------------- 1 | #ifndef ELTORITO_PLATFORM 2 | #define ELTORITO_PLATFORM ELTORITO_PLATFORM_X86 3 | #endif /* ELTORITO_PLATFORM */ 4 | -------------------------------------------------------------------------------- /gpxe/src/arch/i386/include/bits/endian.h: -------------------------------------------------------------------------------- 1 | #ifndef ETHERBOOT_BITS_ENDIAN_H 2 | #define ETHERBOOT_BITS_ENDIAN_H 3 | 4 | FILE_LICENCE ( GPL2_OR_LATER ); 5 | 6 | #define __BYTE_ORDER __LITTLE_ENDIAN 7 | 8 | #endif /* ETHERBOOT_BITS_ENDIAN_H */ 9 | -------------------------------------------------------------------------------- /gpxe/src/arch/i386/include/bits/io.h: -------------------------------------------------------------------------------- 1 | #ifndef _BITS_IO_H 2 | #define _BITS_IO_H 3 | 4 | /** @file 5 | * 6 | * i386-specific I/O API implementations 7 | * 8 | */ 9 | 10 | FILE_LICENCE ( GPL2_OR_LATER ); 11 | 12 | #include 13 | 14 | #endif /* _BITS_IO_H */ 15 | -------------------------------------------------------------------------------- /gpxe/src/arch/i386/include/bits/nap.h: -------------------------------------------------------------------------------- 1 | #ifndef _BITS_NAP_H 2 | #define _BITS_NAP_H 3 | 4 | /** @file 5 | * 6 | * i386-specific CPU sleeping API implementations 7 | * 8 | */ 9 | 10 | FILE_LICENCE ( GPL2_OR_LATER ); 11 | 12 | #include 13 | #include 14 | 15 | #endif /* _BITS_MAP_H */ 16 | -------------------------------------------------------------------------------- /gpxe/src/arch/i386/include/bits/smbios.h: -------------------------------------------------------------------------------- 1 | #ifndef _BITS_SMBIOS_H 2 | #define _BITS_SMBIOS_H 3 | 4 | /** @file 5 | * 6 | * i386-specific SMBIOS API implementations 7 | * 8 | */ 9 | 10 | FILE_LICENCE ( GPL2_OR_LATER ); 11 | 12 | #include 13 | 14 | #endif /* _BITS_SMBIOS_H */ 15 | -------------------------------------------------------------------------------- /gpxe/src/arch/i386/include/bits/stdint.h: -------------------------------------------------------------------------------- 1 | #ifndef _BITS_STDINT_H 2 | #define _BITS_STDINT_H 3 | 4 | FILE_LICENCE ( GPL2_OR_LATER ); 5 | 6 | typedef __SIZE_TYPE__ size_t; 7 | typedef signed long ssize_t; 8 | typedef signed long off_t; 9 | 10 | typedef unsigned char uint8_t; 11 | typedef unsigned short uint16_t; 12 | typedef unsigned int uint32_t; 13 | typedef unsigned long long uint64_t; 14 | 15 | typedef signed char int8_t; 16 | typedef signed short int16_t; 17 | typedef signed int int32_t; 18 | typedef signed long long int64_t; 19 | 20 | typedef unsigned long physaddr_t; 21 | typedef unsigned long intptr_t; 22 | 23 | #endif /* _BITS_STDINT_H */ 24 | -------------------------------------------------------------------------------- /gpxe/src/arch/i386/include/bits/timer.h: -------------------------------------------------------------------------------- 1 | #ifndef _BITS_TIMER_H 2 | #define _BITS_TIMER_H 3 | 4 | /** @file 5 | * 6 | * i386-specific timer API implementations 7 | * 8 | */ 9 | 10 | FILE_LICENCE ( GPL2_OR_LATER ); 11 | 12 | #include 13 | #include 14 | 15 | #endif /* _BITS_TIMER_H */ 16 | -------------------------------------------------------------------------------- /gpxe/src/arch/i386/include/bits/uaccess.h: -------------------------------------------------------------------------------- 1 | #ifndef _BITS_UACCESS_H 2 | #define _BITS_UACCESS_H 3 | 4 | /** @file 5 | * 6 | * i386-specific user access API implementations 7 | * 8 | */ 9 | 10 | FILE_LICENCE ( GPL2_OR_LATER ); 11 | 12 | #include 13 | 14 | #endif /* _BITS_UACCESS_H */ 15 | -------------------------------------------------------------------------------- /gpxe/src/arch/i386/include/bits/umalloc.h: -------------------------------------------------------------------------------- 1 | #ifndef _BITS_UMALLOC_H 2 | #define _BITS_UMALLOC_H 3 | 4 | /** @file 5 | * 6 | * i386-specific user memory allocation API implementations 7 | * 8 | */ 9 | 10 | FILE_LICENCE ( GPL2_OR_LATER ); 11 | 12 | #include 13 | 14 | #endif /* _BITS_UMALLOC_H */ 15 | -------------------------------------------------------------------------------- /gpxe/src/arch/i386/include/bootsector.h: -------------------------------------------------------------------------------- 1 | #ifndef _BOOTSECTOR_H 2 | #define _BOOTSECTOR_H 3 | 4 | /** @file 5 | * 6 | * x86 bootsector image format 7 | */ 8 | 9 | FILE_LICENCE ( GPL2_OR_LATER ); 10 | 11 | extern int call_bootsector ( unsigned int segment, unsigned int offset, 12 | unsigned int drive ); 13 | 14 | #endif /* _BOOTSECTOR_H */ 15 | -------------------------------------------------------------------------------- /gpxe/src/arch/i386/include/fakee820.h: -------------------------------------------------------------------------------- 1 | #ifndef _FAKEE820_H 2 | #define _FAKEE820_H 3 | 4 | FILE_LICENCE ( GPL2_OR_LATER ); 5 | 6 | extern void fake_e820 ( void ); 7 | extern void unfake_e820 ( void ); 8 | 9 | #endif /* _FAKEE820_H */ 10 | -------------------------------------------------------------------------------- /gpxe/src/arch/i386/include/gateA20.h: -------------------------------------------------------------------------------- 1 | #ifndef GATEA20_H 2 | #define GATEA20_H 3 | 4 | extern void gateA20_set ( void ); 5 | extern void gateA20_unset ( void ); 6 | 7 | #endif /* GATEA20_H */ 8 | -------------------------------------------------------------------------------- /gpxe/src/arch/i386/include/gpxe/bios_nap.h: -------------------------------------------------------------------------------- 1 | #ifndef _GPXE_BIOS_NAP_H 2 | #define _GPXE_BIOS_NAP_H 3 | 4 | /** @file 5 | * 6 | * BIOS CPU sleeping 7 | * 8 | */ 9 | 10 | FILE_LICENCE ( GPL2_OR_LATER ); 11 | 12 | #ifdef NAP_PCBIOS 13 | #define NAP_PREFIX_pcbios 14 | #else 15 | #define NAP_PREFIX_pcbios __pcbios_ 16 | #endif 17 | 18 | #endif /* _GPXE_BIOS_NAP_H */ 19 | -------------------------------------------------------------------------------- /gpxe/src/arch/i386/include/gpxe/bios_smbios.h: -------------------------------------------------------------------------------- 1 | #ifndef _GPXE_BIOS_SMBIOS_H 2 | #define _GPXE_BIOS_SMBIOS_H 3 | 4 | /** @file 5 | * 6 | * Standard PC-BIOS SMBIOS interface 7 | * 8 | */ 9 | 10 | FILE_LICENCE ( GPL2_OR_LATER ); 11 | 12 | #ifdef SMBIOS_PCBIOS 13 | #define SMBIOS_PREFIX_pcbios 14 | #else 15 | #define SMBIOS_PREFIX_pcbios __pcbios_ 16 | #endif 17 | 18 | #endif /* _GPXE_BIOS_SMBIOS_H */ 19 | -------------------------------------------------------------------------------- /gpxe/src/arch/i386/include/gpxe/memtop_umalloc.h: -------------------------------------------------------------------------------- 1 | #ifndef _GPXE_MEMTOP_UMALLOC_H 2 | #define _GPXE_MEMTOP_UMALLOC_H 3 | 4 | /** @file 5 | * 6 | * External memory allocation 7 | * 8 | */ 9 | 10 | FILE_LICENCE ( GPL2_OR_LATER ); 11 | 12 | #ifdef UMALLOC_MEMTOP 13 | #define UMALLOC_PREFIX_memtop 14 | #else 15 | #define UMALLOC_PREFIX_memtop __memtop_ 16 | #endif 17 | 18 | #endif /* _GPXE_MEMTOP_UMALLOC_H */ 19 | -------------------------------------------------------------------------------- /gpxe/src/arch/i386/include/gpxe/timer2.h: -------------------------------------------------------------------------------- 1 | #ifndef _GPXE_TIMER2_H 2 | #define _GPXE_TIMER2_H 3 | 4 | /** @file 5 | * 6 | * Timer chip control 7 | * 8 | */ 9 | 10 | FILE_LICENCE ( GPL2_OR_LATER ); 11 | 12 | extern void timer2_udelay ( unsigned long usecs ); 13 | 14 | #endif /* _GPXE_TIMER2_H */ 15 | -------------------------------------------------------------------------------- /gpxe/src/arch/i386/include/kir.h: -------------------------------------------------------------------------------- 1 | #ifndef KIR_H 2 | #define KIR_H 3 | 4 | #ifndef KEEP_IT_REAL 5 | #error "kir.h can be used only with -DKEEP_IT_REAL" 6 | #endif 7 | 8 | #ifdef ASSEMBLY 9 | 10 | #define code32 code16gcc 11 | 12 | #else /* ASSEMBLY */ 13 | 14 | __asm__ ( ".code16gcc" ); 15 | 16 | #endif /* ASSEMBLY */ 17 | 18 | #endif /* KIR_H */ 19 | -------------------------------------------------------------------------------- /gpxe/src/arch/i386/include/memsizes.h: -------------------------------------------------------------------------------- 1 | #ifndef _MEMSIZES_H 2 | #define _MEMSIZES_H 3 | 4 | FILE_LICENCE ( GPL2_OR_LATER ); 5 | 6 | #include 7 | 8 | /** 9 | * Get size of base memory from BIOS free base memory counter 10 | * 11 | * @ret basemem Base memory size, in kB 12 | */ 13 | static inline unsigned int basememsize ( void ) { 14 | return get_fbms(); 15 | } 16 | 17 | extern unsigned int extmemsize ( void ); 18 | 19 | #endif /* _MEMSIZES_H */ 20 | -------------------------------------------------------------------------------- /gpxe/src/arch/i386/include/pnpbios.h: -------------------------------------------------------------------------------- 1 | #ifndef _PNPBIOS_H 2 | #define _PNPBIOS_H 3 | 4 | /** @file 5 | * 6 | * PnP BIOS 7 | * 8 | */ 9 | 10 | FILE_LICENCE ( GPL2_OR_LATER ); 11 | 12 | /* BIOS segment address */ 13 | #define BIOS_SEG 0xf000 14 | 15 | extern int find_pnp_bios ( void ); 16 | 17 | #endif /* _PNPBIOS_H */ 18 | -------------------------------------------------------------------------------- /gpxe/src/arch/i386/include/pxeparent.h: -------------------------------------------------------------------------------- 1 | #ifndef PXEPARENT_H 2 | #define PXEPARENT_H 3 | 4 | FILE_LICENCE ( GPL2_OR_LATER ); 5 | 6 | #include 7 | 8 | extern int pxeparent_call ( SEGOFF16_t entry, unsigned int function, 9 | void *params, size_t params_len ); 10 | 11 | #endif 12 | -------------------------------------------------------------------------------- /gpxe/src/arch/i386/include/undinet.h: -------------------------------------------------------------------------------- 1 | #ifndef _UNDINET_H 2 | #define _UNDINET_H 3 | 4 | /** @file 5 | * 6 | * UNDI network device driver 7 | * 8 | */ 9 | 10 | FILE_LICENCE ( GPL2_OR_LATER ); 11 | 12 | struct undi_device; 13 | 14 | extern int undinet_probe ( struct undi_device *undi ); 15 | extern void undinet_remove ( struct undi_device *undi ); 16 | 17 | #endif /* _UNDINET_H */ 18 | -------------------------------------------------------------------------------- /gpxe/src/arch/i386/include/undipreload.h: -------------------------------------------------------------------------------- 1 | #ifndef _UNDIPRELOAD_H 2 | #define _UNDIPRELOAD_H 3 | 4 | /** @file 5 | * 6 | * Preloaded UNDI stack 7 | * 8 | */ 9 | 10 | FILE_LICENCE ( GPL2_OR_LATER ); 11 | 12 | #include 13 | #include 14 | 15 | extern struct undi_device __data16 ( preloaded_undi ); 16 | #define preloaded_undi __use_data16 ( preloaded_undi ) 17 | 18 | #endif /* _UNDIPRELOAD_H */ 19 | -------------------------------------------------------------------------------- /gpxe/src/arch/i386/interface/pcbios/bios_nap.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | 4 | FILE_LICENCE ( GPL2_OR_LATER ); 5 | 6 | /** 7 | * Save power by halting the CPU until the next interrupt 8 | * 9 | */ 10 | static void bios_cpu_nap ( void ) { 11 | __asm__ __volatile__ ( REAL_CODE ( "sti\n\t" 12 | "hlt\n\t" 13 | "cli\n\t" ) : : ); 14 | } 15 | 16 | PROVIDE_NAP ( pcbios, cpu_nap, bios_cpu_nap ); 17 | -------------------------------------------------------------------------------- /gpxe/src/arch/i386/interface/pcbios/keepsan.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include 4 | #include 5 | #include 6 | #include 7 | #include 8 | 9 | struct setting keep_san_setting __setting = { 10 | .name = "keep-san", 11 | .description = "Preserve SAN connection", 12 | .tag = DHCP_EB_KEEP_SAN, 13 | .type = &setting_type_int8, 14 | }; 15 | 16 | int keep_san ( void ) { 17 | int keep_san; 18 | 19 | keep_san = fetch_intz_setting ( NULL, &keep_san_setting ); 20 | if ( ! keep_san ) 21 | return 0; 22 | 23 | printf ( "Preserving connection to SAN disk\n" ); 24 | shutdown_exit_flags |= SHUTDOWN_KEEP_DEVICES; 25 | return 1; 26 | } 27 | -------------------------------------------------------------------------------- /gpxe/src/arch/i386/prefix/hromprefix.S: -------------------------------------------------------------------------------- 1 | /***************************************************************************** 2 | * ROM prefix that relocates to HIGHMEM_LOADPOINT during POST if PMM allocation 3 | * fails. Intended to be used, with caution, on BIOSes that support PCI3.00 but 4 | * have limited PMM support, such as most AMI BIOSes. 5 | ***************************************************************************** 6 | */ 7 | 8 | FILE_LICENCE ( GPL2_OR_LATER ) 9 | 10 | #define SHRINK_WITHOUT_PMM 11 | 12 | #include "romprefix.S" 13 | -------------------------------------------------------------------------------- /gpxe/src/arch/i386/prefix/kkpxeprefix.S: -------------------------------------------------------------------------------- 1 | /***************************************************************************** 2 | * PXE prefix that keeps the whole PXE stack present 3 | ***************************************************************************** 4 | */ 5 | 6 | FILE_LICENCE ( GPL2_OR_LATER ) 7 | 8 | /* Since we have the whole stack, we can use cached DHCP information */ 9 | REQUEST_OBJECT ( pxeparent_dhcp ) 10 | 11 | #define PXELOADER_KEEP_UNDI 12 | #define PXELOADER_KEEP_PXE 13 | #include "pxeprefix.S" 14 | -------------------------------------------------------------------------------- /gpxe/src/arch/i386/prefix/kpxeprefix.S: -------------------------------------------------------------------------------- 1 | /***************************************************************************** 2 | * PXE prefix that keep the UNDI portion of the PXE stack present 3 | ***************************************************************************** 4 | */ 5 | 6 | FILE_LICENCE ( GPL2_OR_LATER ) 7 | 8 | #define PXELOADER_KEEP_UNDI 9 | #include "pxeprefix.S" 10 | -------------------------------------------------------------------------------- /gpxe/src/arch/i386/prefix/mbr.S: -------------------------------------------------------------------------------- 1 | .text 2 | .arch i386 3 | .section ".prefix", "awx", @progbits 4 | .code16 5 | .org 0 6 | 7 | mbr: 8 | movw $exec_sector, %bp 9 | jmp find_active_partition 10 | exec_sector: 11 | ljmp $0x0000, $0x7c00 12 | 13 | #include "bootpart.S" 14 | -------------------------------------------------------------------------------- /gpxe/src/arch/i386/prefix/nullprefix.S: -------------------------------------------------------------------------------- 1 | .org 0 2 | .text 3 | .arch i386 4 | 5 | .section ".prefix", "ax", @progbits 6 | .code16 7 | _prefix: 8 | 9 | .section ".text16", "ax", @progbits 10 | prefix_exit: 11 | 12 | prefix_exit_end: 13 | .previous 14 | -------------------------------------------------------------------------------- /gpxe/src/arch/i386/prefix/unnrv2b16.S: -------------------------------------------------------------------------------- 1 | /* 2 | * 16-bit version of the decompressor 3 | * 4 | */ 5 | 6 | FILE_LICENCE ( GPL2_OR_LATER ) 7 | 8 | #define CODE16 9 | #include "unnrv2b.S" 10 | -------------------------------------------------------------------------------- /gpxe/src/arch/i386/prefix/usbdisk.S: -------------------------------------------------------------------------------- 1 | .text 2 | .arch i386 3 | .section ".prefix", "awx", @progbits 4 | .code16 5 | .org 0 6 | 7 | #include "mbr.S" 8 | 9 | /* Partition table: ZIP-compatible partition 4, 64 heads, 32 sectors/track */ 10 | .org 446 11 | .space 16 12 | .space 16 13 | .space 16 14 | .byte 0x80, 0x01, 0x01, 0x00 15 | .byte 0xeb, 0x3f, 0x20, 0x01 16 | .long 0x00000020 17 | .long 0x00000fe0 18 | 19 | .org 510 20 | .byte 0x55, 0xaa 21 | 22 | /* Skip to start of partition */ 23 | .org 32 * 512 24 | -------------------------------------------------------------------------------- /gpxe/src/arch/i386/prefix/xromprefix.S: -------------------------------------------------------------------------------- 1 | /* 2 | * ROM prefix that loads the bulk of the ROM using direct PCI accesses, 3 | * so as not to take up much option ROM space on PCI <3.0 systems. 4 | */ 5 | 6 | FILE_LICENCE ( GPL2_OR_LATER ) 7 | 8 | #define LOAD_ROM_FROM_PCI 9 | #include "romprefix.S" 10 | -------------------------------------------------------------------------------- /gpxe/src/arch/i386/transitions/libpm.S: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TritonDataCenter/syslinux/b78ed9f973e228e886229ccd9ab41dc228cb81b6/gpxe/src/arch/i386/transitions/libpm.S -------------------------------------------------------------------------------- /gpxe/src/arch/x86/Makefile: -------------------------------------------------------------------------------- 1 | # Include common x86 headers 2 | # 3 | INCDIRS += arch/x86/include 4 | 5 | # x86-specific directories containing source files 6 | # 7 | SRCDIRS += arch/x86/core 8 | SRCDIRS += arch/x86/interface/efi 9 | SRCDIRS += arch/x86/prefix 10 | -------------------------------------------------------------------------------- /gpxe/src/arch/x86/include/bits/pci_io.h: -------------------------------------------------------------------------------- 1 | #ifndef _BITS_PCI_IO_H 2 | #define _BITS_PCI_IO_H 3 | 4 | /** @file 5 | * 6 | * i386-specific PCI I/O API implementations 7 | * 8 | */ 9 | 10 | FILE_LICENCE ( GPL2_OR_LATER ); 11 | 12 | #include 13 | #include 14 | 15 | #endif /* _BITS_PCI_IO_H */ 16 | -------------------------------------------------------------------------------- /gpxe/src/arch/x86/include/gpxe/efi/efix86_nap.h: -------------------------------------------------------------------------------- 1 | #ifndef _GPXE_EFIX86_NAP_H 2 | #define _GPXE_EFIX86_NAP_H 3 | 4 | /** @file 5 | * 6 | * EFI CPU sleeping 7 | * 8 | */ 9 | 10 | FILE_LICENCE ( GPL2_OR_LATER ); 11 | 12 | #ifdef NAP_EFIX86 13 | #define NAP_PREFIX_efix86 14 | #else 15 | #define NAP_PREFIX_efix86 __efix86_ 16 | #endif 17 | 18 | #endif /* _GPXE_EFIX86_NAP_H */ 19 | -------------------------------------------------------------------------------- /gpxe/src/arch/x86_64/Makefile.efi: -------------------------------------------------------------------------------- 1 | # -*- makefile -*- : Force emacs to use Makefile mode 2 | 3 | # EFI probably doesn't guarantee us a red zone, so let's not rely on it. 4 | # 5 | CFLAGS += -mno-red-zone 6 | 7 | # Specify EFI image builder 8 | # 9 | ELF2EFI = $(ELF2EFI64) 10 | 11 | # Include generic EFI Makefile 12 | # 13 | MAKEDEPS += arch/x86/Makefile.efi 14 | include arch/x86/Makefile.efi 15 | -------------------------------------------------------------------------------- /gpxe/src/arch/x86_64/include/bits/byteswap.h: -------------------------------------------------------------------------------- 1 | #ifndef _BITS_BYTESWAP_H 2 | #define _BITS_BYTESWAP_H 3 | 4 | static inline __attribute__ (( always_inline, const )) uint16_t 5 | __bswap_variable_16 ( uint16_t x ) { 6 | __asm__ ( "xchgb %b0,%h0" : "=Q" ( x ) : "0" ( x ) ); 7 | return x; 8 | } 9 | 10 | static inline __attribute__ (( always_inline, const )) uint32_t 11 | __bswap_variable_32 ( uint32_t x ) { 12 | __asm__ ( "bswapl %k0" : "=r" ( x ) : "0" ( x ) ); 13 | return x; 14 | } 15 | 16 | static inline __attribute__ (( always_inline, const )) uint64_t 17 | __bswap_variable_64 ( uint64_t x ) { 18 | __asm__ ( "bswapq %q0" : "=r" ( x ) : "0" ( x ) ); 19 | return x; 20 | } 21 | 22 | #endif /* _BITS_BYTESWAP_H */ 23 | -------------------------------------------------------------------------------- /gpxe/src/arch/x86_64/include/bits/compiler.h: -------------------------------------------------------------------------------- 1 | #ifndef _BITS_COMPILER_H 2 | #define _BITS_COMPILER_H 3 | 4 | #ifndef ASSEMBLY 5 | 6 | /** Declare a function with standard calling conventions */ 7 | #define __asmcall __attribute__ (( regparm(0) )) 8 | 9 | /** Declare a function with libgcc implicit linkage */ 10 | #define __libgcc 11 | 12 | #endif /* ASSEMBLY */ 13 | 14 | #endif /* _BITS_COMPILER_H */ 15 | -------------------------------------------------------------------------------- /gpxe/src/arch/x86_64/include/bits/endian.h: -------------------------------------------------------------------------------- 1 | #ifndef ETHERBOOT_BITS_ENDIAN_H 2 | #define ETHERBOOT_BITS_ENDIAN_H 3 | 4 | #define __BYTE_ORDER __LITTLE_ENDIAN 5 | 6 | #endif /* ETHERBOOT_BITS_ENDIAN_H */ 7 | -------------------------------------------------------------------------------- /gpxe/src/arch/x86_64/include/bits/errfile.h: -------------------------------------------------------------------------------- 1 | #ifndef _BITS_ERRFILE_H 2 | #define _BITS_ERRFILE_H 3 | 4 | /** 5 | * @addtogroup errfile Error file identifiers 6 | * @{ 7 | */ 8 | 9 | /** @} */ 10 | 11 | #endif /* _BITS_ERRFILE_H */ 12 | -------------------------------------------------------------------------------- /gpxe/src/arch/x86_64/include/bits/io.h: -------------------------------------------------------------------------------- 1 | #ifndef _BITS_IO_H 2 | #define _BITS_IO_H 3 | 4 | /** @file 5 | * 6 | * x86_64-specific I/O API implementations 7 | * 8 | */ 9 | 10 | #endif /* _BITS_IO_H */ 11 | -------------------------------------------------------------------------------- /gpxe/src/arch/x86_64/include/bits/nap.h: -------------------------------------------------------------------------------- 1 | #ifndef _BITS_NAP_H 2 | #define _BITS_NAP_H 3 | 4 | /** @file 5 | * 6 | * x86_64-specific CPU sleeping API implementations 7 | * 8 | */ 9 | 10 | #include 11 | 12 | #endif /* _BITS_MAP_H */ 13 | -------------------------------------------------------------------------------- /gpxe/src/arch/x86_64/include/bits/smbios.h: -------------------------------------------------------------------------------- 1 | #ifndef _BITS_SMBIOS_H 2 | #define _BITS_SMBIOS_H 3 | 4 | /** @file 5 | * 6 | * i386-specific SMBIOS API implementations 7 | * 8 | */ 9 | 10 | #endif /* _BITS_SMBIOS_H */ 11 | -------------------------------------------------------------------------------- /gpxe/src/arch/x86_64/include/bits/stdint.h: -------------------------------------------------------------------------------- 1 | #ifndef _BITS_STDINT_H 2 | #define _BITS_STDINT_H 3 | 4 | typedef __SIZE_TYPE__ size_t; 5 | typedef signed long ssize_t; 6 | typedef signed long off_t; 7 | 8 | typedef unsigned char uint8_t; 9 | typedef unsigned short uint16_t; 10 | typedef unsigned int uint32_t; 11 | typedef unsigned long long uint64_t; 12 | 13 | typedef signed char int8_t; 14 | typedef signed short int16_t; 15 | typedef signed int int32_t; 16 | typedef signed long long int64_t; 17 | 18 | typedef unsigned long physaddr_t; 19 | typedef unsigned long intptr_t; 20 | 21 | #endif /* _BITS_STDINT_H */ 22 | -------------------------------------------------------------------------------- /gpxe/src/arch/x86_64/include/bits/timer.h: -------------------------------------------------------------------------------- 1 | #ifndef _BITS_TIMER_H 2 | #define _BITS_TIMER_H 3 | 4 | /** @file 5 | * 6 | * x86_64-specific timer API implementations 7 | * 8 | */ 9 | 10 | #endif /* _BITS_TIMER_H */ 11 | -------------------------------------------------------------------------------- /gpxe/src/arch/x86_64/include/bits/uaccess.h: -------------------------------------------------------------------------------- 1 | #ifndef _BITS_UACCESS_H 2 | #define _BITS_UACCESS_H 3 | 4 | /** @file 5 | * 6 | * x86_64-specific user access API implementations 7 | * 8 | */ 9 | 10 | #endif /* _BITS_UACCESS_H */ 11 | -------------------------------------------------------------------------------- /gpxe/src/arch/x86_64/include/bits/umalloc.h: -------------------------------------------------------------------------------- 1 | #ifndef _BITS_UMALLOC_H 2 | #define _BITS_UMALLOC_H 3 | 4 | /** @file 5 | * 6 | * x86_64-specific user memory allocation API implementations 7 | * 8 | */ 9 | 10 | #endif /* _BITS_UMALLOC_H */ 11 | -------------------------------------------------------------------------------- /gpxe/src/config/.gitignore: -------------------------------------------------------------------------------- 1 | .buildserial.* 2 | -------------------------------------------------------------------------------- /gpxe/src/config/config_romprefix.c: -------------------------------------------------------------------------------- 1 | /* 2 | * This program is free software; you can redistribute it and/or 3 | * modify it under the terms of the GNU General Public License as 4 | * published by the Free Software Foundation; either version 2, or (at 5 | * your option) any later version. 6 | */ 7 | 8 | FILE_LICENCE ( GPL2_OR_LATER ); 9 | 10 | #include 11 | 12 | /** @file 13 | * 14 | * ROM prefix configuration options 15 | * 16 | */ 17 | 18 | /* 19 | * Provide UNDI loader if PXE stack is requested 20 | * 21 | */ 22 | #ifdef PXE_STACK 23 | REQUIRE_OBJECT ( undiloader ); 24 | #endif 25 | -------------------------------------------------------------------------------- /gpxe/src/config/console.h: -------------------------------------------------------------------------------- 1 | #ifndef CONFIG_CONSOLE_H 2 | #define CONFIG_CONSOLE_H 3 | 4 | /** @file 5 | * 6 | * Console configuration 7 | * 8 | * These options specify the console types that Etherboot will use for 9 | * interaction with the user. 10 | * 11 | */ 12 | 13 | FILE_LICENCE ( GPL2_OR_LATER ); 14 | 15 | #include 16 | 17 | //#define CONSOLE_PCBIOS /* Default BIOS console */ 18 | //#define CONSOLE_SERIAL /* Serial port */ 19 | //#define CONSOLE_DIRECT_VGA /* Direct access to VGA card */ 20 | //#define CONSOLE_BTEXT /* Who knows what this does? */ 21 | //#define CONSOLE_PC_KBD /* Direct access to PC keyboard */ 22 | 23 | #endif /* CONFIG_CONSOLE_H */ 24 | -------------------------------------------------------------------------------- /gpxe/src/config/defaults.h: -------------------------------------------------------------------------------- 1 | #ifndef CONFIG_DEFAULTS_H 2 | #define CONFIG_DEFAULTS_H 3 | 4 | FILE_LICENCE ( GPL2_OR_LATER ); 5 | 6 | #define CONFIG_DEFAULTS(_platform) 7 | 8 | #include CONFIG_DEFAULTS(PLATFORM) 9 | 10 | #endif /* CONFIG_DEFAULTS_H */ 11 | -------------------------------------------------------------------------------- /gpxe/src/config/defaults/efi.h: -------------------------------------------------------------------------------- 1 | #ifndef CONFIG_DEFAULTS_EFI_H 2 | #define CONFIG_DEFAULTS_EFI_H 3 | 4 | /** @file 5 | * 6 | * Configuration defaults for EFI 7 | * 8 | */ 9 | 10 | #define UACCESS_EFI 11 | #define IOAPI_EFI 12 | #define PCIAPI_EFI 13 | #define CONSOLE_EFI 14 | #define TIMER_EFI 15 | #define NAP_EFIX86 16 | #define UMALLOC_EFI 17 | #define SMBIOS_EFI 18 | 19 | #define IMAGE_EFI /* EFI image support */ 20 | 21 | #endif /* CONFIG_DEFAULTS_EFI_H */ 22 | -------------------------------------------------------------------------------- /gpxe/src/config/ioapi.h: -------------------------------------------------------------------------------- 1 | #ifndef CONFIG_IOAPI_H 2 | #define CONFIG_IOAPI_H 3 | 4 | /** @file 5 | * 6 | * I/O API configuration 7 | * 8 | */ 9 | 10 | FILE_LICENCE ( GPL2_OR_LATER ); 11 | 12 | #include 13 | 14 | //#undef PCIAPI_PCBIOS /* Access via PCI BIOS */ 15 | //#define PCIAPI_DIRECT /* Direct access via Type 1 accesses */ 16 | 17 | #endif /* CONFIG_IOAPI_H */ 18 | -------------------------------------------------------------------------------- /gpxe/src/config/isa.h: -------------------------------------------------------------------------------- 1 | #ifndef CONFIG_ISA_H 2 | #define CONFIG_ISA_H 3 | 4 | /** @file 5 | * 6 | * ISA probe address configuration 7 | * 8 | * You can override the list of addresses that will be probed by any 9 | * ISA drivers. 10 | * 11 | */ 12 | #undef ISA_PROBE_ADDRS /* e.g. 0x200, 0x300 */ 13 | #undef ISA_PROBE_ONLY /* Do not probe any other addresses */ 14 | 15 | #endif /* CONFIG_ISA_H */ 16 | -------------------------------------------------------------------------------- /gpxe/src/config/nap.h: -------------------------------------------------------------------------------- 1 | #ifndef CONFIG_NAP_H 2 | #define CONFIG_NAP_H 3 | 4 | /** @file 5 | * 6 | * CPU sleeping 7 | * 8 | */ 9 | 10 | FILE_LICENCE ( GPL2_OR_LATER ); 11 | 12 | #include 13 | 14 | //#undef NAP_PCBIOS 15 | //#define NAP_NULL 16 | 17 | #endif /* CONFIG_NAP_H */ 18 | -------------------------------------------------------------------------------- /gpxe/src/config/timer.h: -------------------------------------------------------------------------------- 1 | #ifndef CONFIG_TIMER_H 2 | #define CONFIG_TIMER_H 3 | 4 | /** @file 5 | * 6 | * Timer configuration. 7 | * 8 | */ 9 | 10 | FILE_LICENCE ( GPL2_OR_LATER ); 11 | 12 | #include 13 | 14 | //#undef TIMER_PCBIOS 15 | //#define TIMER_RDTSC 16 | 17 | #endif /* CONFIG_TIMER_H */ 18 | -------------------------------------------------------------------------------- /gpxe/src/config/umalloc.h: -------------------------------------------------------------------------------- 1 | #ifndef CONFIG_UMALLOC_H 2 | #define CONFIG_UMALLOC_H 3 | 4 | /** @file 5 | * 6 | * User memory allocation API configuration 7 | * 8 | */ 9 | 10 | FILE_LICENCE ( GPL2_OR_LATER ); 11 | 12 | #include 13 | 14 | #endif /* CONFIG_UMALLOC_H */ 15 | -------------------------------------------------------------------------------- /gpxe/src/core/bitops.c: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | FILE_LICENCE ( GPL2_OR_LATER ); 4 | 5 | int __flsl ( long x ) { 6 | unsigned long value = x; 7 | int ls = 0; 8 | 9 | for ( ls = 0 ; value ; ls++ ) { 10 | value >>= 1; 11 | } 12 | return ls; 13 | } 14 | -------------------------------------------------------------------------------- /gpxe/src/core/btext.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TritonDataCenter/syslinux/b78ed9f973e228e886229ccd9ab41dc228cb81b6/gpxe/src/core/btext.c -------------------------------------------------------------------------------- /gpxe/src/core/errno.c: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | /** @file 4 | * 5 | * Error codes 6 | * 7 | * This file provides the global variable #errno. 8 | * 9 | */ 10 | 11 | /** 12 | * Global "last error" number. 13 | * 14 | * This is valid only when a function has just returned indicating a 15 | * failure. 16 | * 17 | */ 18 | int errno; 19 | -------------------------------------------------------------------------------- /gpxe/src/core/null_nap.c: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | PROVIDE_NAP_INLINE ( null, cpu_nap ); 4 | -------------------------------------------------------------------------------- /gpxe/src/crypto/axtls_sha1.c: -------------------------------------------------------------------------------- 1 | #include "crypto/axtls/crypto.h" 2 | #include 3 | #include 4 | 5 | static void sha1_init ( void *ctx ) { 6 | SHA1Init ( ctx ); 7 | } 8 | 9 | static void sha1_update ( void *ctx, const void *data, size_t len ) { 10 | SHA1Update ( ctx, data, len ); 11 | } 12 | 13 | static void sha1_final ( void *ctx, void *out ) { 14 | SHA1Final ( ctx, out ); 15 | } 16 | 17 | struct digest_algorithm sha1_algorithm = { 18 | .name = "sha1", 19 | .ctxsize = SHA1_CTX_SIZE, 20 | .blocksize = 64, 21 | .digestsize = SHA1_DIGEST_SIZE, 22 | .init = sha1_init, 23 | .update = sha1_update, 24 | .final = sha1_final, 25 | }; 26 | -------------------------------------------------------------------------------- /gpxe/src/drivers/bus/eisa.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TritonDataCenter/syslinux/b78ed9f973e228e886229ccd9ab41dc228cb81b6/gpxe/src/drivers/bus/eisa.c -------------------------------------------------------------------------------- /gpxe/src/drivers/bus/isa_ids.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include 4 | #include 5 | 6 | /* 7 | * EISA and ISAPnP IDs are actually mildly human readable, though in a 8 | * somewhat brain-damaged way. 9 | * 10 | */ 11 | char * isa_id_string ( unsigned int vendor, unsigned int product ) { 12 | static char buf[7]; 13 | int i; 14 | 15 | /* Vendor ID is a compressed ASCII string */ 16 | vendor = bswap_16 ( vendor ); 17 | for ( i = 2 ; i >= 0 ; i-- ) { 18 | buf[i] = ( 'A' - 1 + ( vendor & 0x1f ) ); 19 | vendor >>= 5; 20 | } 21 | 22 | /* Product ID is a 4-digit hex string */ 23 | sprintf ( &buf[3], "%04x", bswap_16 ( product ) ); 24 | 25 | return buf; 26 | } 27 | -------------------------------------------------------------------------------- /gpxe/src/drivers/infiniband/MT25408_PRM.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TritonDataCenter/syslinux/b78ed9f973e228e886229ccd9ab41dc228cb81b6/gpxe/src/drivers/infiniband/MT25408_PRM.h -------------------------------------------------------------------------------- /gpxe/src/drivers/net/3c503.c: -------------------------------------------------------------------------------- 1 | /* 3Com 3c503, a memory-mapped NS8390-based card */ 2 | #if 0 /* Currently broken! */ 3 | #define INCLUDE_3C503 4 | #include "ns8390.c" 5 | #endif 6 | -------------------------------------------------------------------------------- /gpxe/src/drivers/net/ne.c: -------------------------------------------------------------------------------- 1 | /* ISA I/O mapped NS8390-based cards, including NE2000 */ 2 | #if 0 /* Currently broken! */ 3 | #define INCLUDE_NE 1 4 | #define NE_SCAN 0x300,0x280,0x320,0x340,0x380 5 | #include "ns8390.c" 6 | #endif 7 | -------------------------------------------------------------------------------- /gpxe/src/drivers/net/rtl818x/rtl8180.c: -------------------------------------------------------------------------------- 1 | /* Realtek 8180 card: rtl818x driver + rtl8180 RF modules */ 2 | 3 | FILE_LICENCE(GPL2_OR_LATER); 4 | 5 | #include 6 | 7 | REQUIRE_OBJECT(rtl818x); 8 | REQUIRE_OBJECT(rtl8180_grf5101); 9 | REQUIRE_OBJECT(rtl8180_max2820); 10 | REQUIRE_OBJECT(rtl8180_sa2400); 11 | 12 | static struct pci_device_id rtl8180_nics[] __unused = { 13 | PCI_ROM(0x10ec, 0x8180, "rtl8180", "Realtek 8180", 0), 14 | PCI_ROM(0x1799, 0x6001, "f5d6001", "Belkin F5D6001", 0), 15 | PCI_ROM(0x1799, 0x6020, "f5d6020", "Belkin F5D6020", 0), 16 | PCI_ROM(0x1186, 0x3300, "dwl510", "D-Link DWL-510", 0), 17 | }; 18 | -------------------------------------------------------------------------------- /gpxe/src/drivers/net/rtl818x/rtl8185.c: -------------------------------------------------------------------------------- 1 | /* Realtek 8185 card: rtl818x driver + rtl8185_rtl8225 RF module */ 2 | 3 | FILE_LICENCE(GPL2_OR_LATER); 4 | 5 | #include 6 | 7 | REQUIRE_OBJECT(rtl818x); 8 | REQUIRE_OBJECT(rtl8185_rtl8225); 9 | 10 | static struct pci_device_id rtl8185_nics[] __unused = { 11 | PCI_ROM(0x10ec, 0x8185, "rtl8185", "Realtek 8185", 0), 12 | PCI_ROM(0x1799, 0x700f, "f5d7000", "Belkin F5D7000", 0), 13 | PCI_ROM(0x1799, 0x701f, "f5d7010", "Belkin F5D7010", 0), 14 | }; 15 | -------------------------------------------------------------------------------- /gpxe/src/drivers/net/smc9000.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TritonDataCenter/syslinux/b78ed9f973e228e886229ccd9ab41dc228cb81b6/gpxe/src/drivers/net/smc9000.c -------------------------------------------------------------------------------- /gpxe/src/drivers/net/smc9000.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TritonDataCenter/syslinux/b78ed9f973e228e886229ccd9ab41dc228cb81b6/gpxe/src/drivers/net/smc9000.h -------------------------------------------------------------------------------- /gpxe/src/drivers/net/wd.c: -------------------------------------------------------------------------------- 1 | /* ISA memory-mapped NS8390-based cards, including WD80x3 */ 2 | #if 0 /* Currently broken! */ 3 | #define INCLUDE_WD 4 | #define WD_DEFAULT_MEM 0xCC000 5 | #include "ns8390.c" 6 | #endif 7 | -------------------------------------------------------------------------------- /gpxe/src/hci/commands/autoboot_cmd.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include 4 | 5 | FILE_LICENCE ( GPL2_OR_LATER ); 6 | 7 | static int autoboot_exec ( int argc, char **argv ) { 8 | 9 | if ( argc != 1 ) { 10 | printf ( "Usage:\n" 11 | " %s\n" 12 | "\n" 13 | "Attempts to boot the system\n", 14 | argv[0] ); 15 | return 1; 16 | } 17 | 18 | autoboot(); 19 | 20 | /* Can never return success by definition */ 21 | return 1; 22 | } 23 | 24 | struct command autoboot_command __command = { 25 | .name = "autoboot", 26 | .exec = autoboot_exec, 27 | }; 28 | -------------------------------------------------------------------------------- /gpxe/src/hci/commands/login_cmd.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include 4 | #include 5 | 6 | FILE_LICENCE ( GPL2_OR_LATER ); 7 | 8 | static int login_exec ( int argc, char **argv ) { 9 | int rc; 10 | 11 | if ( argc > 1 ) { 12 | printf ( "Usage: %s\n" 13 | "Prompt for login credentials\n", argv[0] ); 14 | return 1; 15 | } 16 | 17 | if ( ( rc = login_ui() ) != 0 ) { 18 | printf ( "Could not set credentials: %s\n", 19 | strerror ( rc ) ); 20 | return 1; 21 | } 22 | 23 | return 0; 24 | } 25 | 26 | struct command login_command __command = { 27 | .name = "login", 28 | .exec = login_exec, 29 | }; 30 | -------------------------------------------------------------------------------- /gpxe/src/hci/mucurses/alert.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | 4 | /** @file 5 | * 6 | * MuCurses alert functions 7 | * 8 | */ 9 | 10 | /** 11 | * Audible signal 12 | * 13 | * @ret rc return status code 14 | */ 15 | int beep ( void ) { 16 | printf("\a"); 17 | return OK; 18 | } 19 | -------------------------------------------------------------------------------- /gpxe/src/hci/mucurses/mucurses.h: -------------------------------------------------------------------------------- 1 | #ifndef _MUCURSES_H 2 | #define _MUCURSES_H 3 | 4 | /** @file 5 | * 6 | * MuCurses core implementation specific header file 7 | * 8 | */ 9 | 10 | FILE_LICENCE ( GPL2_OR_LATER ); 11 | 12 | #define WRAP 0 13 | #define NOWRAP 1 14 | 15 | extern SCREEN _ansi_screen; 16 | 17 | extern void _wputch ( WINDOW *win, chtype ch, int wrap ) __nonnull; 18 | extern void _wputc ( WINDOW *win, char c, int wrap ) __nonnull; 19 | extern void _wputchstr ( WINDOW *win, const chtype *chstr, int wrap, int n ) __nonnull; 20 | extern void _wputstr ( WINDOW *win, const char *str, int wrap, int n ) __nonnull; 21 | extern void _wcursback ( WINDOW *win ) __nonnull; 22 | 23 | #endif /* _MUCURSES_H */ 24 | -------------------------------------------------------------------------------- /gpxe/src/hci/mucurses/print_nadv.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include "mucurses.h" 3 | #include "cursor.h" 4 | 5 | /** @file 6 | * 7 | * MuCurses printing functions (no cursor advance) 8 | * 9 | */ 10 | 11 | /** 12 | * Add string of single-byte characters and renditions to a window 13 | * 14 | * @v *win window to be rendered in 15 | * @v *chstr pointer to first chtype in "string" 16 | * @v n max number of chars from chstr to render 17 | * @ret rc return status code 18 | */ 19 | int waddchnstr ( WINDOW *win, const chtype *chstr, int n ) { 20 | struct cursor_pos pos; 21 | 22 | _store_curs_pos( win, &pos ); 23 | _wputchstr( win, chstr, NOWRAP, n ); 24 | _restore_curs_pos( win, &pos ); 25 | return OK; 26 | } 27 | -------------------------------------------------------------------------------- /gpxe/src/include/.gitignore: -------------------------------------------------------------------------------- 1 | .buildserial.h 2 | -------------------------------------------------------------------------------- /gpxe/src/include/alloca.h: -------------------------------------------------------------------------------- 1 | #ifndef _ALLOCA_H 2 | #define _ALLOCA_H 3 | 4 | /** 5 | * @file 6 | * 7 | * Temporary memory allocation 8 | * 9 | */ 10 | 11 | #include 12 | 13 | /** 14 | * Allocate temporary memory from the stack 15 | * 16 | * @v size Size to allocate 17 | * @ret ptr Allocated memory 18 | * 19 | * This memory will be freed automatically when the containing 20 | * function returns. There are several caveats regarding use of 21 | * alloca(); use it only if you already know what they are. 22 | */ 23 | #define alloca(size) __builtin_alloca ( size ) 24 | 25 | #endif /* _ALLOCA_H */ 26 | -------------------------------------------------------------------------------- /gpxe/src/include/cmdline.h: -------------------------------------------------------------------------------- 1 | #ifndef CMDLINE_H 2 | #define CMDLINE_H 3 | 4 | /* Command line external functions */ 5 | 6 | void cmdl_start(); 7 | 8 | #endif 9 | -------------------------------------------------------------------------------- /gpxe/src/include/cmdlist.h: -------------------------------------------------------------------------------- 1 | #ifndef COMMANDLIST_H 2 | #define COMMANDLIST_H 3 | 4 | void test_req(); 5 | void test2_req(); 6 | void help_req(); 7 | void nvo_cmd_req(); 8 | 9 | void commandlist() 10 | { 11 | // test_req(); 12 | // test2_req(); 13 | help_req(); 14 | nvo_cmd_req(); 15 | } 16 | 17 | #endif 18 | 19 | -------------------------------------------------------------------------------- /gpxe/src/include/cpu.h: -------------------------------------------------------------------------------- 1 | #ifndef CPU_H 2 | #define CPU_H 3 | 4 | #include "bits/cpu.h" 5 | 6 | #endif /* CPU_H */ 7 | -------------------------------------------------------------------------------- /gpxe/src/include/ctype.h: -------------------------------------------------------------------------------- 1 | #ifndef _CTYPE_H 2 | #define _CTYPE_H 3 | 4 | /** @file 5 | * 6 | * Character types 7 | */ 8 | 9 | FILE_LICENCE ( GPL2_OR_LATER ); 10 | 11 | #define isdigit(c) ((c) >= '0' && (c) <= '9') 12 | #define islower(c) ((c) >= 'a' && (c) <= 'z') 13 | #define isupper(c) ((c) >= 'A' && (c) <= 'Z') 14 | 15 | static inline unsigned char tolower(unsigned char c) 16 | { 17 | if (isupper(c)) 18 | c -= 'A'-'a'; 19 | return c; 20 | } 21 | 22 | static inline unsigned char toupper(unsigned char c) 23 | { 24 | if (islower(c)) 25 | c -= 'a'-'A'; 26 | return c; 27 | } 28 | 29 | extern int isspace ( int c ); 30 | 31 | #endif /* _CTYPE_H */ 32 | -------------------------------------------------------------------------------- /gpxe/src/include/gpxe/arc4.h: -------------------------------------------------------------------------------- 1 | #ifndef _GPXE_ARC4_H 2 | #define _GPXE_ARC4_H 3 | 4 | FILE_LICENCE ( GPL2_OR_LATER ); 5 | 6 | struct cipher_algorithm; 7 | 8 | #include 9 | 10 | struct arc4_ctx { 11 | int i, j; 12 | u8 state[256]; 13 | }; 14 | 15 | #define ARC4_CTX_SIZE sizeof ( struct arc4_ctx ) 16 | 17 | extern struct cipher_algorithm arc4_algorithm; 18 | 19 | void arc4_skip ( const void *key, size_t keylen, size_t skip, 20 | const void *src, void *dst, size_t msglen ); 21 | 22 | #endif /* _GPXE_ARC4_H */ 23 | -------------------------------------------------------------------------------- /gpxe/src/include/gpxe/base64.h: -------------------------------------------------------------------------------- 1 | #ifndef _GPXE_BASE64_H 2 | #define _GPXE_BASE64_H 3 | 4 | /** @file 5 | * 6 | * Base64 encoding 7 | * 8 | */ 9 | 10 | FILE_LICENCE ( GPL2_OR_LATER ); 11 | 12 | #include 13 | 14 | /** 15 | * Calculate length of base64-encoded string 16 | * 17 | * @v raw_len Raw string length (excluding NUL) 18 | * @ret encoded_len Encoded string length (excluding NUL) 19 | */ 20 | static inline size_t base64_encoded_len ( size_t raw_len ) { 21 | return ( ( ( raw_len + 3 - 1 ) / 3 ) * 4 ); 22 | } 23 | 24 | extern void base64_encode ( const char *raw, char *encoded ); 25 | 26 | #endif /* _GPXE_BASE64_H */ 27 | -------------------------------------------------------------------------------- /gpxe/src/include/gpxe/command.h: -------------------------------------------------------------------------------- 1 | #ifndef _GPXE_COMMAND_H 2 | #define _GPXE_COMMAND_H 3 | 4 | FILE_LICENCE ( GPL2_OR_LATER ); 5 | 6 | #include 7 | 8 | /** A command-line command */ 9 | struct command { 10 | /** Name of the command */ 11 | const char *name; 12 | /** 13 | * Function implementing the command 14 | * 15 | * @v argc Argument count 16 | * @v argv Argument list 17 | * @ret rc Return status code 18 | */ 19 | int ( * exec ) ( int argc, char **argv ); 20 | }; 21 | 22 | #define COMMANDS __table ( struct command, "commands" ) 23 | 24 | #define __command __table_entry ( COMMANDS, 01 ) 25 | 26 | #endif /* _GPXE_COMMAND_H */ 27 | -------------------------------------------------------------------------------- /gpxe/src/include/gpxe/crc32.h: -------------------------------------------------------------------------------- 1 | #ifndef _GPXE_CRC32_H 2 | #define _GPXE_CRC32_H 3 | 4 | FILE_LICENCE ( GPL2_OR_LATER ); 5 | 6 | #include 7 | 8 | u32 crc32_le ( u32 seed, const void *data, size_t len ); 9 | 10 | #endif 11 | -------------------------------------------------------------------------------- /gpxe/src/include/gpxe/downloader.h: -------------------------------------------------------------------------------- 1 | #ifndef _GPXE_DOWNLOADER_H 2 | #define _GPXE_DOWNLOADER_H 3 | 4 | /** @file 5 | * 6 | * Image downloader 7 | * 8 | */ 9 | 10 | FILE_LICENCE ( GPL2_OR_LATER ); 11 | 12 | struct job_interface; 13 | struct image; 14 | 15 | extern int create_downloader ( struct job_interface *job, struct image *image, 16 | int ( * register_image ) ( struct image *image ), 17 | int type, ... ); 18 | 19 | #endif /* _GPXE_DOWNLOADER_H */ 20 | -------------------------------------------------------------------------------- /gpxe/src/include/gpxe/efi/ProcessorBind.h: -------------------------------------------------------------------------------- 1 | /* 2 | * EFI header files rely on having the CPU architecture directory 3 | * present in the search path in order to pick up ProcessorBind.h. We 4 | * use this header file as a quick indirection layer. 5 | * - mcb30 6 | */ 7 | 8 | #if __i386__ 9 | #include 10 | #endif 11 | 12 | #if __x86_64__ 13 | #include 14 | #endif 15 | -------------------------------------------------------------------------------- /gpxe/src/include/gpxe/efi/efi_smbios.h: -------------------------------------------------------------------------------- 1 | #ifndef _GPXE_EFI_SMBIOS_H 2 | #define _GPXE_EFI_SMBIOS_H 3 | 4 | /** @file 5 | * 6 | * gPXE SMBIOS API for EFI 7 | * 8 | */ 9 | 10 | FILE_LICENCE ( GPL2_OR_LATER ); 11 | 12 | #ifdef SMBIOS_EFI 13 | #define SMBIOS_PREFIX_efi 14 | #else 15 | #define SMBIOS_PREFIX_efi __efi_ 16 | #endif 17 | 18 | #endif /* _GPXE_EFI_SMBIOS_H */ 19 | -------------------------------------------------------------------------------- /gpxe/src/include/gpxe/efi/efi_timer.h: -------------------------------------------------------------------------------- 1 | #ifndef _GPXE_EFI_TIMER_H 2 | #define _GPXE_EFI_TIMER_H 3 | 4 | /** @file 5 | * 6 | * gPXE timer API for EFI 7 | * 8 | */ 9 | 10 | FILE_LICENCE ( GPL2_OR_LATER ); 11 | 12 | #ifdef TIMER_EFI 13 | #define TIMER_PREFIX_efi 14 | #else 15 | #define TIMER_PREFIX_efi __efi_ 16 | #endif 17 | 18 | #endif /* _GPXE_EFI_TIMER_H */ 19 | -------------------------------------------------------------------------------- /gpxe/src/include/gpxe/efi/efi_umalloc.h: -------------------------------------------------------------------------------- 1 | #ifndef _GPXE_EFI_UMALLOC_H 2 | #define _GPXE_EFI_UMALLOC_H 3 | 4 | /** @file 5 | * 6 | * gPXE user memory allocation API for EFI 7 | * 8 | */ 9 | 10 | FILE_LICENCE ( GPL2_OR_LATER ); 11 | 12 | #ifdef UMALLOC_EFI 13 | #define UMALLOC_PREFIX_efi 14 | #else 15 | #define UMALLOC_PREFIX_efi __efi_ 16 | #endif 17 | 18 | #endif /* _GPXE_EFI_UMALLOC_H */ 19 | -------------------------------------------------------------------------------- /gpxe/src/include/gpxe/elf.h: -------------------------------------------------------------------------------- 1 | #ifndef _GPXE_ELF_H 2 | #define _GPXE_ELF_H 3 | 4 | /** 5 | * @file 6 | * 7 | * ELF image format 8 | * 9 | */ 10 | 11 | FILE_LICENCE ( GPL2_OR_LATER ); 12 | 13 | #include 14 | 15 | extern int elf_load ( struct image *image ); 16 | 17 | #endif /* _GPXE_ELF_H */ 18 | -------------------------------------------------------------------------------- /gpxe/src/include/gpxe/errortab.h: -------------------------------------------------------------------------------- 1 | #ifndef _GPXE_ERRORTAB_H 2 | #define _GPXE_ERRORTAB_H 3 | 4 | /** @file 5 | * 6 | * Error message tables 7 | * 8 | */ 9 | 10 | FILE_LICENCE ( GPL2_OR_LATER ); 11 | 12 | #include 13 | 14 | struct errortab { 15 | int errno; 16 | const char *text; 17 | }; 18 | 19 | #define ERRORTAB __table ( struct errortab, "errortab" ) 20 | 21 | #define __errortab __table_entry ( ERRORTAB, 01 ) 22 | 23 | #endif /* _GPXE_ERRORTAB_H */ 24 | -------------------------------------------------------------------------------- /gpxe/src/include/gpxe/ethernet.h: -------------------------------------------------------------------------------- 1 | #ifndef _GPXE_ETHERNET_H 2 | #define _GPXE_ETHERNET_H 3 | 4 | /** @file 5 | * 6 | * Ethernet protocol 7 | * 8 | */ 9 | 10 | FILE_LICENCE ( GPL2_OR_LATER ); 11 | 12 | #include 13 | 14 | extern void eth_init_addr ( const void *hw_addr, void *ll_addr ); 15 | extern const char * eth_ntoa ( const void *ll_addr ); 16 | extern int eth_mc_hash ( unsigned int af, const void *net_addr, 17 | void *ll_addr ); 18 | extern int eth_eth_addr ( const void *ll_addr, void *eth_addr ); 19 | extern struct net_device * alloc_etherdev ( size_t priv_size ); 20 | 21 | #endif /* _GPXE_ETHERNET_H */ 22 | -------------------------------------------------------------------------------- /gpxe/src/include/gpxe/fakedhcp.h: -------------------------------------------------------------------------------- 1 | #ifndef _GPXE_FAKEDHCP_H 2 | #define _GPXE_FAKEDHCP_H 3 | 4 | /** @file 5 | * 6 | * Fake DHCP packets 7 | * 8 | */ 9 | 10 | FILE_LICENCE ( GPL2_OR_LATER ); 11 | 12 | #include 13 | 14 | struct net_device; 15 | 16 | extern int create_fakedhcpdiscover ( struct net_device *netdev, 17 | void *data, size_t max_len ); 18 | extern int create_fakedhcpack ( struct net_device *netdev, 19 | void *data, size_t max_len ); 20 | extern int create_fakepxebsack ( struct net_device *netdev, 21 | void *data, size_t max_len ); 22 | 23 | #endif /* _GPXE_FAKEDHCP_H */ 24 | -------------------------------------------------------------------------------- /gpxe/src/include/gpxe/ftp.h: -------------------------------------------------------------------------------- 1 | #ifndef _GPXE_FTP_H 2 | #define _GPXE_FTP_H 3 | 4 | /** @file 5 | * 6 | * File transfer protocol 7 | * 8 | */ 9 | 10 | FILE_LICENCE ( GPL2_OR_LATER ); 11 | 12 | /** FTP default port */ 13 | #define FTP_PORT 21 14 | 15 | #endif /* _GPXE_FTP_H */ 16 | -------------------------------------------------------------------------------- /gpxe/src/include/gpxe/gdbserial.h: -------------------------------------------------------------------------------- 1 | #ifndef _GPXE_GDBSERIAL_H 2 | #define _GPXE_GDBSERIAL_H 3 | 4 | /** @file 5 | * 6 | * GDB remote debugging over serial 7 | * 8 | */ 9 | 10 | FILE_LICENCE ( GPL2_OR_LATER ); 11 | 12 | struct gdb_transport; 13 | 14 | /** 15 | * Set up the serial transport 16 | * 17 | * @ret transport suitable for starting the GDB stub or NULL on error 18 | */ 19 | struct gdb_transport *gdbserial_configure ( void ); 20 | 21 | #endif /* _GPXE_GDBSERIAL_H */ 22 | -------------------------------------------------------------------------------- /gpxe/src/include/gpxe/gdbudp.h: -------------------------------------------------------------------------------- 1 | #ifndef _GPXE_GDBUDP_H 2 | #define _GPXE_GDBUDP_H 3 | 4 | /** @file 5 | * 6 | * GDB remote debugging over UDP 7 | * 8 | */ 9 | 10 | FILE_LICENCE ( GPL2_OR_LATER ); 11 | 12 | struct sockaddr_in; 13 | struct gdb_transport; 14 | 15 | /** 16 | * Set up the UDP transport with network address 17 | * 18 | * @name network device name 19 | * @addr IP address and UDP listen port, may be NULL and fields may be zero 20 | * @ret transport suitable for starting the GDB stub or NULL on error 21 | */ 22 | struct gdb_transport *gdbudp_configure ( const char *name, struct sockaddr_in *addr ); 23 | 24 | #endif /* _GPXE_GDBUDP_H */ 25 | -------------------------------------------------------------------------------- /gpxe/src/include/gpxe/hidemem.h: -------------------------------------------------------------------------------- 1 | #ifndef _GPXE_HIDEMEM_H 2 | #define _GPXE_HIDEMEM_H 3 | 4 | /** 5 | * @file 6 | * 7 | * Hidden memory regions 8 | * 9 | */ 10 | 11 | FILE_LICENCE ( GPL2_OR_LATER ); 12 | 13 | #include 14 | 15 | extern void hide_umalloc ( physaddr_t start, physaddr_t end ); 16 | 17 | #endif /* _GPXE_HIDEMEM_H */ 18 | -------------------------------------------------------------------------------- /gpxe/src/include/gpxe/http.h: -------------------------------------------------------------------------------- 1 | #ifndef _GPXE_HTTP_H 2 | #define _GPXE_HTTP_H 3 | 4 | /** @file 5 | * 6 | * Hyper Text Transport Protocol 7 | * 8 | */ 9 | 10 | FILE_LICENCE ( GPL2_OR_LATER ); 11 | 12 | /** HTTP default port */ 13 | #define HTTP_PORT 80 14 | 15 | /** HTTPS default port */ 16 | #define HTTPS_PORT 443 17 | 18 | extern int http_open_filter ( struct xfer_interface *xfer, struct uri *uri, 19 | unsigned int default_port, 20 | int ( * filter ) ( struct xfer_interface *, 21 | struct xfer_interface ** ) ); 22 | 23 | #endif /* _GPXE_HTTP_H */ 24 | -------------------------------------------------------------------------------- /gpxe/src/include/gpxe/ib_cmrc.h: -------------------------------------------------------------------------------- 1 | #ifndef _GPXE_IB_CMRC_H 2 | #define _GPXE_IB_CMRC_H 3 | 4 | /** @file 5 | * 6 | * Infiniband Communication-managed Reliable Connections 7 | * 8 | */ 9 | 10 | FILE_LICENCE ( BSD2 ); 11 | 12 | #include 13 | #include 14 | 15 | extern int ib_cmrc_open ( struct xfer_interface *xfer, 16 | struct ib_device *ibdev, 17 | struct ib_gid *dgid, 18 | struct ib_gid_half *service_id ); 19 | 20 | #endif /* _GPXE_IB_CMRC_H */ 21 | -------------------------------------------------------------------------------- /gpxe/src/include/gpxe/ib_sma.h: -------------------------------------------------------------------------------- 1 | #ifndef _GPXE_IB_SMA_H 2 | #define _GPXE_IB_SMA_H 3 | 4 | /** @file 5 | * 6 | * Infiniband subnet management agent 7 | * 8 | */ 9 | 10 | FILE_LICENCE ( GPL2_OR_LATER ); 11 | 12 | struct ib_device; 13 | struct ib_mad_interface; 14 | 15 | extern int ib_create_sma ( struct ib_device *ibdev, 16 | struct ib_mad_interface *mi ); 17 | extern void ib_destroy_sma ( struct ib_device *ibdev, 18 | struct ib_mad_interface *mi ); 19 | 20 | #endif /* _GPXE_IB_SMA_H */ 21 | -------------------------------------------------------------------------------- /gpxe/src/include/gpxe/ib_smc.h: -------------------------------------------------------------------------------- 1 | #ifndef _GPXE_IB_SMC_H 2 | #define _GPXE_IB_SMC_H 3 | 4 | /** @file 5 | * 6 | * Infiniband Subnet Management Client 7 | * 8 | */ 9 | 10 | FILE_LICENCE ( GPL2_OR_LATER ); 11 | 12 | #include 13 | 14 | typedef int ( * ib_local_mad_t ) ( struct ib_device *ibdev, 15 | union ib_mad *mad ); 16 | 17 | extern int ib_smc_update ( struct ib_device *ibdev, 18 | ib_local_mad_t local_mad ); 19 | 20 | #endif /* _GPXE_IB_SMC_H */ 21 | -------------------------------------------------------------------------------- /gpxe/src/include/gpxe/icmp.h: -------------------------------------------------------------------------------- 1 | #ifndef _GPXE_ICMP_H 2 | #define _GPXE_ICMP_H 3 | 4 | /** @file 5 | * 6 | * ICMP protocol 7 | * 8 | */ 9 | 10 | FILE_LICENCE ( GPL2_OR_LATER ); 11 | 12 | /** An ICMP header */ 13 | struct icmp_header { 14 | /** Type */ 15 | uint8_t type; 16 | /** Code */ 17 | uint8_t code; 18 | /** Checksum */ 19 | uint16_t chksum; 20 | } __attribute__ (( packed )); 21 | 22 | #define ICMP_ECHO_RESPONSE 0 23 | #define ICMP_ECHO_REQUEST 8 24 | 25 | #endif /* _GPXE_ICMP_H */ 26 | -------------------------------------------------------------------------------- /gpxe/src/include/gpxe/linux_compat.h: -------------------------------------------------------------------------------- 1 | #ifndef _GPXE_LINUX_COMPAT_H 2 | #define _GPXE_LINUX_COMPAT_H 3 | 4 | /** @file 5 | * 6 | * Linux code compatibility 7 | * 8 | * This file exists to ease the building of Linux source code within 9 | * gPXE. This is intended to facilitate quick testing; it is not 10 | * intended to be a substitute for proper porting. 11 | */ 12 | 13 | FILE_LICENCE ( GPL2_OR_LATER ); 14 | 15 | #include 16 | #include 17 | #include 18 | #include 19 | #include 20 | 21 | #define __init 22 | #define __exit 23 | #define __initdata 24 | #define __exitdata 25 | #define printk printf 26 | 27 | #endif /* _GPXE_LINUX_COMPAT_H */ 28 | -------------------------------------------------------------------------------- /gpxe/src/include/gpxe/login_ui.h: -------------------------------------------------------------------------------- 1 | #ifndef _GPXE_LOGIN_UI_H 2 | #define _GPXE_LOGIN_UI_H 3 | 4 | /** @file 5 | * 6 | * Login UI 7 | * 8 | */ 9 | 10 | FILE_LICENCE ( GPL2_OR_LATER ); 11 | 12 | extern int login_ui ( void ); 13 | 14 | #endif /* _GPXE_LOGIN_UI_H */ 15 | -------------------------------------------------------------------------------- /gpxe/src/include/gpxe/md5.h: -------------------------------------------------------------------------------- 1 | #ifndef _GPXE_MD5_H 2 | #define _GPXE_MD5_H 3 | 4 | FILE_LICENCE ( GPL2_OR_LATER ); 5 | 6 | struct digest_algorithm; 7 | 8 | #include 9 | 10 | #define MD5_DIGEST_SIZE 16 11 | #define MD5_BLOCK_WORDS 16 12 | #define MD5_HASH_WORDS 4 13 | 14 | struct md5_ctx { 15 | u32 hash[MD5_HASH_WORDS]; 16 | u32 block[MD5_BLOCK_WORDS]; 17 | u64 byte_count; 18 | }; 19 | 20 | #define MD5_CTX_SIZE sizeof ( struct md5_ctx ) 21 | 22 | extern struct digest_algorithm md5_algorithm; 23 | 24 | #endif /* _GPXE_MD5_H */ 25 | -------------------------------------------------------------------------------- /gpxe/src/include/gpxe/monojob.h: -------------------------------------------------------------------------------- 1 | #ifndef _GPXE_MONOJOB_H 2 | #define _GPXE_MONOJOB_H 3 | 4 | /** @file 5 | * 6 | * Single foreground job 7 | * 8 | */ 9 | 10 | FILE_LICENCE ( GPL2_OR_LATER ); 11 | 12 | struct job_interface; 13 | 14 | extern struct job_interface monojob; 15 | extern int monojob_wait ( const char *string ); 16 | 17 | #endif /* _GPXE_MONOJOB_H */ 18 | -------------------------------------------------------------------------------- /gpxe/src/include/gpxe/ndp.h: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include 4 | #include 5 | #include 6 | #include 7 | #include 8 | #include 9 | #include 10 | 11 | #define NDP_STATE_INVALID 0 12 | #define NDP_STATE_INCOMPLETE 1 13 | #define NDP_STATE_REACHABLE 2 14 | #define NDP_STATE_DELAY 3 15 | #define NDP_STATE_PROBE 4 16 | #define NDP_STATE_STALE 5 17 | 18 | int ndp_resolve ( struct net_device *netdev, struct in6_addr *src, 19 | struct in6_addr *dest, void *dest_ll_addr ); 20 | int ndp_process_advert ( struct io_buffer *iobuf, struct sockaddr_tcpip *st_src, 21 | struct sockaddr_tcpip *st_dest ); 22 | -------------------------------------------------------------------------------- /gpxe/src/include/gpxe/null_nap.h: -------------------------------------------------------------------------------- 1 | #ifndef _GPXE_NULL_NAP_H 2 | #define _GPXE_NULL_NAP_H 3 | 4 | /** @file 5 | * 6 | * Null CPU sleeping 7 | * 8 | */ 9 | 10 | FILE_LICENCE ( GPL2_OR_LATER ); 11 | 12 | #ifdef NAP_NULL 13 | #define NAP_PREFIX_null 14 | #else 15 | #define NAP_PREFIX_null __null_ 16 | #endif 17 | 18 | static inline __always_inline void 19 | NAP_INLINE ( null, cpu_nap ) ( void ) { 20 | /* Do nothing */ 21 | } 22 | 23 | #endif /* _GPXE_NULL_NAP_H */ 24 | -------------------------------------------------------------------------------- /gpxe/src/include/gpxe/ramdisk.h: -------------------------------------------------------------------------------- 1 | #ifndef _GPXE_RAMDISK_H 2 | #define _GPXE_RAMDISK_H 3 | 4 | /** 5 | * @file 6 | * 7 | * RAM disks 8 | * 9 | */ 10 | 11 | FILE_LICENCE ( GPL2_OR_LATER ); 12 | 13 | #include 14 | #include 15 | 16 | struct ramdisk { 17 | struct block_device blockdev; 18 | userptr_t data; 19 | }; 20 | 21 | extern int init_ramdisk ( struct ramdisk *ramdisk, userptr_t data, size_t len, 22 | unsigned int blksize ); 23 | 24 | #endif /* _GPXE_RAMDISK_H */ 25 | -------------------------------------------------------------------------------- /gpxe/src/include/gpxe/rarp.h: -------------------------------------------------------------------------------- 1 | #ifndef _GPXE_RARP_H 2 | #define _GPXE_RARP_H 3 | 4 | /** @file 5 | * 6 | * Reverse Address Resolution Protocol 7 | * 8 | */ 9 | 10 | FILE_LICENCE ( GPL2_OR_LATER ); 11 | 12 | struct net_protocol; 13 | 14 | extern struct net_protocol rarp_protocol; 15 | 16 | #endif /* _GPXE_RARP_H */ 17 | -------------------------------------------------------------------------------- /gpxe/src/include/gpxe/rc80211.h: -------------------------------------------------------------------------------- 1 | #ifndef _GPXE_RC80211_H 2 | #define _GPXE_RC80211_H 3 | 4 | /** @file 5 | * 6 | * Rate-control algorithm prototype for 802.11. 7 | */ 8 | 9 | FILE_LICENCE ( GPL2_OR_LATER ); 10 | 11 | struct net80211_device; 12 | struct rc80211_ctx; 13 | 14 | struct rc80211_ctx * rc80211_init ( struct net80211_device *dev ); 15 | void rc80211_update_tx ( struct net80211_device *dev, int retries, int rc ); 16 | void rc80211_update_rx ( struct net80211_device *dev, int retry, u16 rate ); 17 | void rc80211_free ( struct rc80211_ctx *ctx ); 18 | 19 | #endif /* _GPXE_RC80211_H */ 20 | -------------------------------------------------------------------------------- /gpxe/src/include/gpxe/rsa.h: -------------------------------------------------------------------------------- 1 | #ifndef _GPXE_RSA_H 2 | #define _GPXE_RSA_H 3 | 4 | FILE_LICENCE ( GPL2_OR_LATER ); 5 | 6 | struct pubkey_algorithm; 7 | 8 | extern struct pubkey_algorithm rsa_algorithm; 9 | 10 | #include "crypto/axtls/crypto.h" 11 | 12 | #endif /* _GPXE_RSA_H */ 13 | -------------------------------------------------------------------------------- /gpxe/src/include/gpxe/sanboot.h: -------------------------------------------------------------------------------- 1 | #ifndef _GPXE_SANBOOT_H 2 | #define _GPXE_SANBOOT_H 3 | 4 | FILE_LICENCE ( GPL2_OR_LATER ); 5 | 6 | #include 7 | 8 | struct sanboot_protocol { 9 | const char *prefix; 10 | int ( * boot ) ( const char *root_path ); 11 | }; 12 | 13 | #define SANBOOT_PROTOCOLS \ 14 | __table ( struct sanboot_protocol, "sanboot_protocols" ) 15 | 16 | #define __sanboot_protocol __table_entry ( SANBOOT_PROTOCOLS, 01 ) 17 | 18 | extern int keep_san ( void ); 19 | 20 | #endif /* _GPXE_SANBOOT_H */ 21 | -------------------------------------------------------------------------------- /gpxe/src/include/gpxe/segment.h: -------------------------------------------------------------------------------- 1 | #ifndef _GPXE_SEGMENT_H 2 | #define _GPXE_SEGMENT_H 3 | 4 | /** 5 | * @file 6 | * 7 | * Executable image segments 8 | * 9 | */ 10 | 11 | FILE_LICENCE ( GPL2_OR_LATER ); 12 | 13 | #include 14 | 15 | extern int prep_segment ( userptr_t segment, size_t filesz, size_t memsz ); 16 | 17 | #endif /* _GPXE_SEGMENT_H */ 18 | -------------------------------------------------------------------------------- /gpxe/src/include/gpxe/serial.h: -------------------------------------------------------------------------------- 1 | #ifndef _GPXE_SERIAL_H 2 | #define _GPXE_SERIAL_H 3 | 4 | /** @file 5 | * 6 | * Serial driver functions 7 | * 8 | */ 9 | 10 | FILE_LICENCE ( GPL2_OR_LATER ); 11 | 12 | extern void serial_putc ( int ch ); 13 | extern int serial_getc ( void ); 14 | extern int serial_ischar ( void ); 15 | 16 | #endif /* _GPXE_SERIAL_H */ 17 | -------------------------------------------------------------------------------- /gpxe/src/include/gpxe/settings_ui.h: -------------------------------------------------------------------------------- 1 | #ifndef _GPXE_SETTINGS_UI_H 2 | #define _GPXE_SETTINGS_UI_H 3 | 4 | /** @file 5 | * 6 | * Option configuration console 7 | * 8 | */ 9 | 10 | FILE_LICENCE ( GPL2_OR_LATER ); 11 | 12 | struct settings; 13 | 14 | extern int settings_ui ( struct settings *settings ) __nonnull; 15 | 16 | #endif /* _GPXE_SETTINGS_UI_H */ 17 | -------------------------------------------------------------------------------- /gpxe/src/include/gpxe/sha1.h: -------------------------------------------------------------------------------- 1 | #ifndef _GPXE_SHA1_H 2 | #define _GPXE_SHA1_H 3 | 4 | FILE_LICENCE ( GPL2_OR_LATER ); 5 | 6 | #include "crypto/axtls/crypto.h" 7 | 8 | struct digest_algorithm; 9 | 10 | #define SHA1_CTX_SIZE sizeof ( SHA1_CTX ) 11 | #define SHA1_DIGEST_SIZE SHA1_SIZE 12 | 13 | extern struct digest_algorithm sha1_algorithm; 14 | 15 | /* SHA1-wrapping functions defined in sha1extra.c: */ 16 | 17 | void prf_sha1 ( const void *key, size_t key_len, const char *label, 18 | const void *data, size_t data_len, void *prf, size_t prf_len ); 19 | 20 | void pbkdf2_sha1 ( const void *passphrase, size_t pass_len, 21 | const void *salt, size_t salt_len, 22 | int iterations, void *key, size_t key_len ); 23 | 24 | #endif /* _GPXE_SHA1_H */ 25 | -------------------------------------------------------------------------------- /gpxe/src/include/gpxe/shell.h: -------------------------------------------------------------------------------- 1 | #ifndef _GPXE_SHELL_H 2 | #define _GPXE_SHELL_H 3 | 4 | /** @file 5 | * 6 | * Minimal command shell 7 | * 8 | */ 9 | 10 | FILE_LICENCE ( GPL2_OR_LATER ); 11 | 12 | extern void shell ( void ); 13 | 14 | #endif /* _GPXE_SHELL_H */ 15 | -------------------------------------------------------------------------------- /gpxe/src/include/gpxe/shell_banner.h: -------------------------------------------------------------------------------- 1 | #ifndef _GPXE_SHELL_BANNER_H 2 | #define _GPXE_SHELL_BANNER_H 3 | 4 | /** @file 5 | * 6 | * Shell startup banner 7 | * 8 | */ 9 | 10 | FILE_LICENCE ( GPL2_OR_LATER ); 11 | 12 | extern int shell_banner ( void ); 13 | 14 | #endif /* _GPXE_SHELL_BANNER_H */ 15 | -------------------------------------------------------------------------------- /gpxe/src/include/libgen.h: -------------------------------------------------------------------------------- 1 | #ifndef _LIBGEN_H 2 | #define _LIBGEN_H 3 | 4 | FILE_LICENCE ( GPL2_OR_LATER ); 5 | 6 | extern char * basename ( char *path ); 7 | extern char * dirname ( char *path ); 8 | 9 | #endif /* _LIBGEN_H */ 10 | -------------------------------------------------------------------------------- /gpxe/src/include/pc_kbd.h: -------------------------------------------------------------------------------- 1 | #ifndef _PC_KBD_H 2 | #define _PC_KBD_H 3 | 4 | int kbd_ischar(void); 5 | 6 | int kbd_getc(void); 7 | #endif 8 | -------------------------------------------------------------------------------- /gpxe/src/include/pcmcia-opts.h: -------------------------------------------------------------------------------- 1 | // pcmcia-opts.h 2 | // special options file for development time. Later this could end in Config(?) 3 | #ifndef __pcmciaopts 4 | #define __pcmciaopts 5 | 6 | #define _yes_ 1 7 | #define _no_ 0 8 | 9 | #define SUPPORT_I82365 (_yes_) 10 | // #define SUPPORT_YENTA (_no_) 11 | // #define SUPPORT_SOME_DRIVER (_no_) 12 | 13 | #define PCMCIA_SHUTDOWN (_yes_) 14 | #define MAP_ATTRMEM_TO 0xd0000 15 | #define MAP_ATTRMEM_LEN 0x02000 16 | 17 | #define PDEBUG 3 18 | // The higher the more output you get, 0..3 19 | // Not fully implemented though, but for the future... 20 | 21 | #undef _yes_ 22 | #undef _no_ 23 | #endif 24 | -------------------------------------------------------------------------------- /gpxe/src/include/readline/readline.h: -------------------------------------------------------------------------------- 1 | #ifndef _READLINE_H 2 | #define _READLINE_H 3 | 4 | /** @file 5 | * 6 | * Minmal readline 7 | * 8 | */ 9 | 10 | FILE_LICENCE ( GPL2_OR_LATER ); 11 | 12 | extern char * __malloc readline ( const char *prompt ); 13 | 14 | #endif /* _READLINE_H */ 15 | -------------------------------------------------------------------------------- /gpxe/src/include/stdarg.h: -------------------------------------------------------------------------------- 1 | #ifndef _STDARG_H 2 | #define _STDARG_H 3 | 4 | FILE_LICENCE ( GPL2_OR_LATER ); 5 | 6 | typedef __builtin_va_list va_list; 7 | #define va_start( ap, last ) __builtin_va_start ( ap, last ) 8 | #define va_arg( ap, type ) __builtin_va_arg ( ap, type ) 9 | #define va_end( ap ) __builtin_va_end ( ap ) 10 | #define va_copy( dest, src ) __builtin_va_copy ( dest, src ) 11 | 12 | #endif /* _STDARG_H */ 13 | -------------------------------------------------------------------------------- /gpxe/src/include/stddef.h: -------------------------------------------------------------------------------- 1 | #ifndef STDDEF_H 2 | #define STDDEF_H 3 | 4 | FILE_LICENCE ( GPL2_ONLY ); 5 | 6 | /* for size_t */ 7 | #include 8 | 9 | #undef NULL 10 | #define NULL ((void *)0) 11 | 12 | #undef offsetof 13 | #define offsetof(TYPE, MEMBER) ((size_t) &((TYPE *)0)->MEMBER) 14 | 15 | #undef container_of 16 | #define container_of(ptr, type, member) ({ \ 17 | const typeof( ((type *)0)->member ) *__mptr = (ptr); \ 18 | (type *)( (char *)__mptr - offsetof(type,member) );}) 19 | 20 | /* __WCHAR_TYPE__ is defined by gcc and will change if -fshort-wchar is used */ 21 | #ifndef __WCHAR_TYPE__ 22 | #define __WCHAR_TYPE__ long int 23 | #endif 24 | typedef __WCHAR_TYPE__ wchar_t; 25 | 26 | #endif /* STDDEF_H */ 27 | -------------------------------------------------------------------------------- /gpxe/src/include/sys/time.h: -------------------------------------------------------------------------------- 1 | #ifndef _SYS_TIME_H 2 | #define _SYS_TIME_H 3 | 4 | #include 5 | 6 | typedef unsigned long suseconds_t; 7 | 8 | struct timeval { 9 | time_t tv_sec; /* seconds */ 10 | suseconds_t tv_usec; /* microseconds */ 11 | }; 12 | 13 | struct timezone { 14 | int tz_minuteswest; /* minutes W of Greenwich */ 15 | int tz_dsttime; /* type of dst correction */ 16 | }; 17 | 18 | extern int gettimeofday ( struct timeval *tv, struct timezone *tz ); 19 | 20 | #endif /* _SYS_TIME_H */ 21 | -------------------------------------------------------------------------------- /gpxe/src/include/time.h: -------------------------------------------------------------------------------- 1 | #ifndef _TIME_H 2 | #define _TIME_H 3 | 4 | typedef unsigned long time_t; 5 | 6 | struct tm { 7 | int tm_sec; /* seconds */ 8 | int tm_min; /* minutes */ 9 | int tm_hour; /* hours */ 10 | int tm_mday; /* day of the month */ 11 | int tm_mon; /* month */ 12 | int tm_year; /* year */ 13 | int tm_wday; /* day of the week */ 14 | int tm_yday; /* day in the year */ 15 | int tm_isdst; /* daylight saving time */ 16 | }; 17 | 18 | extern time_t time ( time_t *t ); 19 | 20 | extern time_t mktime ( struct tm *tm ); 21 | 22 | #endif /* _TIME_H */ 23 | -------------------------------------------------------------------------------- /gpxe/src/include/usr/autoboot.h: -------------------------------------------------------------------------------- 1 | #ifndef _USR_AUTOBOOT_H 2 | #define _USR_AUTOBOOT_H 3 | 4 | /** @file 5 | * 6 | * Automatic booting 7 | * 8 | */ 9 | 10 | FILE_LICENCE ( GPL2_OR_LATER ); 11 | 12 | #include 13 | struct net_device; 14 | 15 | extern int shutdown_exit_flags; 16 | 17 | extern void autoboot ( void ); 18 | extern int boot_next_server_and_filename ( struct in_addr next_server, 19 | const char *filename ); 20 | extern int boot_root_path ( const char *root_path ); 21 | 22 | extern int pxe_menu_boot ( struct net_device *netdev ) 23 | __attribute__ (( weak )); 24 | 25 | #endif /* _USR_AUTOBOOT_H */ 26 | -------------------------------------------------------------------------------- /gpxe/src/include/usr/dhcpmgmt.h: -------------------------------------------------------------------------------- 1 | #ifndef _USR_DHCPMGMT_H 2 | #define _USR_DHCPMGMT_H 3 | 4 | /** @file 5 | * 6 | * DHCP management 7 | * 8 | */ 9 | 10 | FILE_LICENCE ( GPL2_OR_LATER ); 11 | 12 | struct net_device; 13 | 14 | extern int dhcp ( struct net_device *netdev ); 15 | extern int pxebs ( struct net_device *netdev, unsigned int pxe_type ); 16 | 17 | #endif /* _USR_DHCPMGMT_H */ 18 | -------------------------------------------------------------------------------- /gpxe/src/include/usr/ifmgmt.h: -------------------------------------------------------------------------------- 1 | #ifndef _USR_IFMGMT_H 2 | #define _USR_IFMGMT_H 3 | 4 | /** @file 5 | * 6 | * Network interface management 7 | * 8 | */ 9 | 10 | FILE_LICENCE ( GPL2_OR_LATER ); 11 | 12 | struct net_device; 13 | 14 | extern int ifopen ( struct net_device *netdev ); 15 | extern void ifclose ( struct net_device *netdev ); 16 | extern void ifstat ( struct net_device *netdev ); 17 | extern int iflinkwait ( struct net_device *netdev, unsigned int max_wait_ms ); 18 | 19 | #endif /* _USR_IFMGMT_H */ 20 | -------------------------------------------------------------------------------- /gpxe/src/include/usr/imgmgmt.h: -------------------------------------------------------------------------------- 1 | #ifndef _USR_IMGMGMT_H 2 | #define _USR_IMGMGMT_H 3 | 4 | /** @file 5 | * 6 | * Image management 7 | * 8 | */ 9 | 10 | FILE_LICENCE ( GPL2_OR_LATER ); 11 | 12 | struct image; 13 | 14 | extern int imgfetch ( struct image *image, const char *uri_string, 15 | int ( * image_register ) ( struct image *image ) ); 16 | extern int imgload ( struct image *image ); 17 | extern int imgexec ( struct image *image ); 18 | extern struct image * imgautoselect ( void ); 19 | extern void imgstat ( struct image *image ); 20 | extern void imgfree ( struct image *image ); 21 | 22 | #endif /* _USR_IMGMGMT_H */ 23 | -------------------------------------------------------------------------------- /gpxe/src/include/usr/iwmgmt.h: -------------------------------------------------------------------------------- 1 | #ifndef _USR_IWMGMT_H 2 | #define _USR_IWMGMT_H 3 | 4 | /** @file 5 | * 6 | * Wireless network interface management 7 | * 8 | */ 9 | 10 | FILE_LICENCE ( GPL2_OR_LATER ); 11 | 12 | struct net80211_device; 13 | 14 | extern void iwstat ( struct net80211_device *dev ); 15 | extern int iwlist ( struct net80211_device *dev ); 16 | 17 | #endif /* _USR_IWMGMT_H */ 18 | -------------------------------------------------------------------------------- /gpxe/src/include/usr/route.h: -------------------------------------------------------------------------------- 1 | #ifndef _USR_ROUTE_H 2 | #define _USR_ROUTE_H 3 | 4 | /** @file 5 | * 6 | * Routing table management 7 | * 8 | */ 9 | 10 | FILE_LICENCE ( GPL2_OR_LATER ); 11 | 12 | extern void route ( void ); 13 | 14 | #endif /* _USR_ROUTE_H */ 15 | -------------------------------------------------------------------------------- /gpxe/src/libgcc/__divdi3.c: -------------------------------------------------------------------------------- 1 | /* 2 | * arch/i386/libgcc/__divdi3.c 3 | */ 4 | 5 | #include "libgcc.h" 6 | 7 | __libgcc int64_t __divdi3(int64_t num, int64_t den) 8 | { 9 | int minus = 0; 10 | int64_t v; 11 | 12 | if ( num < 0 ) { 13 | num = -num; 14 | minus = 1; 15 | } 16 | if ( den < 0 ) { 17 | den = -den; 18 | minus ^= 1; 19 | } 20 | 21 | v = __udivmoddi4(num, den, NULL); 22 | if ( minus ) 23 | v = -v; 24 | 25 | return v; 26 | } 27 | -------------------------------------------------------------------------------- /gpxe/src/libgcc/__moddi3.c: -------------------------------------------------------------------------------- 1 | /* 2 | * arch/i386/libgcc/__moddi3.c 3 | */ 4 | 5 | #include "libgcc.h" 6 | 7 | __libgcc int64_t __moddi3(int64_t num, int64_t den) 8 | { 9 | int minus = 0; 10 | int64_t v; 11 | 12 | if ( num < 0 ) { 13 | num = -num; 14 | minus = 1; 15 | } 16 | if ( den < 0 ) { 17 | den = -den; 18 | minus ^= 1; 19 | } 20 | 21 | (void) __udivmoddi4(num, den, (uint64_t *)&v); 22 | if ( minus ) 23 | v = -v; 24 | 25 | return v; 26 | } 27 | -------------------------------------------------------------------------------- /gpxe/src/libgcc/__udivdi3.c: -------------------------------------------------------------------------------- 1 | /* 2 | * arch/i386/libgcc/__divdi3.c 3 | */ 4 | 5 | #include "libgcc.h" 6 | 7 | __libgcc uint64_t __udivdi3(uint64_t num, uint64_t den) 8 | { 9 | return __udivmoddi4(num, den, NULL); 10 | } 11 | -------------------------------------------------------------------------------- /gpxe/src/libgcc/__udivmoddi4.c: -------------------------------------------------------------------------------- 1 | #include "libgcc.h" 2 | 3 | __libgcc uint64_t __udivmoddi4(uint64_t num, uint64_t den, uint64_t *rem_p) 4 | { 5 | uint64_t quot = 0, qbit = 1; 6 | 7 | if ( den == 0 ) { 8 | return 1/((unsigned)den); /* Intentional divide by zero, without 9 | triggering a compiler warning which 10 | would abort the build */ 11 | } 12 | 13 | /* Left-justify denominator and count shift */ 14 | while ( (int64_t)den >= 0 ) { 15 | den <<= 1; 16 | qbit <<= 1; 17 | } 18 | 19 | while ( qbit ) { 20 | if ( den <= num ) { 21 | num -= den; 22 | quot += qbit; 23 | } 24 | den >>= 1; 25 | qbit >>= 1; 26 | } 27 | 28 | if ( rem_p ) 29 | *rem_p = num; 30 | 31 | return quot; 32 | } 33 | -------------------------------------------------------------------------------- /gpxe/src/libgcc/__umoddi3.c: -------------------------------------------------------------------------------- 1 | /* 2 | * arch/i386/libgcc/__umoddi3.c 3 | */ 4 | 5 | #include "libgcc.h" 6 | 7 | __libgcc uint64_t __umoddi3(uint64_t num, uint64_t den) 8 | { 9 | uint64_t v; 10 | 11 | (void) __udivmoddi4(num, den, &v); 12 | return v; 13 | } 14 | -------------------------------------------------------------------------------- /gpxe/src/libgcc/icc.c: -------------------------------------------------------------------------------- 1 | /* 2 | * Intel's compiler creates an implicit call to this function at the 3 | * start of main(). 4 | * 5 | */ 6 | void __libgcc __intel_new_proc_init ( void ) { 7 | /* Do nothing */ 8 | } 9 | -------------------------------------------------------------------------------- /gpxe/src/libgcc/libgcc.h: -------------------------------------------------------------------------------- 1 | #ifndef _LIBGCC_H 2 | #define _LIBGCC_H 3 | 4 | #include 5 | #include 6 | 7 | extern __libgcc uint64_t __udivmoddi4 ( uint64_t num, uint64_t den, 8 | uint64_t *rem ); 9 | extern __libgcc uint64_t __udivdi3 (uint64_t num, uint64_t den ); 10 | extern __libgcc uint64_t __umoddi3 ( uint64_t num, uint64_t den ); 11 | extern __libgcc int64_t __divdi3 ( int64_t num, int64_t den ); 12 | extern __libgcc int64_t __moddi3 ( int64_t num, int64_t den ); 13 | 14 | #endif /* _LIBGCC_H */ 15 | -------------------------------------------------------------------------------- /gpxe/src/libgcc/memcpy.c: -------------------------------------------------------------------------------- 1 | /** @file 2 | * 3 | * gcc sometimes likes to insert implicit calls to memcpy(). 4 | * Unfortunately, there doesn't seem to be any way to prevent it from 5 | * doing this, or to force it to use the optimised memcpy() as seen by 6 | * C code; it insists on inserting a symbol reference to "memcpy". We 7 | * therefore include wrapper functions just to keep gcc happy. 8 | * 9 | */ 10 | 11 | #include 12 | 13 | void * gcc_implicit_memcpy ( void *dest, const void *src, 14 | size_t len ) asm ( "memcpy" ); 15 | 16 | void * gcc_implicit_memcpy ( void *dest, const void *src, size_t len ) { 17 | return memcpy ( dest, src, len ); 18 | } 19 | -------------------------------------------------------------------------------- /gpxe/src/tests/umalloc_test.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include 4 | #include 5 | 6 | void umalloc_test ( void ) { 7 | struct memory_map memmap; 8 | userptr_t bob; 9 | userptr_t fred; 10 | 11 | printf ( "Before allocation:\n" ); 12 | get_memmap ( &memmap ); 13 | 14 | bob = umalloc ( 1234 ); 15 | bob = urealloc ( bob, 12345 ); 16 | fred = umalloc ( 999 ); 17 | 18 | printf ( "After allocation:\n" ); 19 | get_memmap ( &memmap ); 20 | 21 | ufree ( bob ); 22 | ufree ( fred ); 23 | 24 | printf ( "After freeing:\n" ); 25 | get_memmap ( &memmap ); 26 | } 27 | -------------------------------------------------------------------------------- /gpxe/src/util/.gitignore: -------------------------------------------------------------------------------- 1 | nrv2b 2 | zbin 3 | hijack 4 | prototester 5 | elf2efi32 6 | elf2efi64 7 | efirom 8 | iccfix 9 | -------------------------------------------------------------------------------- /gpxe/src/util/Makefile: -------------------------------------------------------------------------------- 1 | BLIB = ../bin/blib.a 2 | CFLAGS = -Os 3 | 4 | all : hijack prototester mucurses_test 5 | 6 | hijack : hijack.c 7 | $(CC) $(CFLAGS) $(EXTRA_CFLAGS) -Wall -lpcap -o $@ $< 8 | 9 | prototester.o : prototester.c 10 | $(CC) $(CFLAGS) $(EXTRA_CFLAGS) -Wall -o $@ -c $< -idirafter ../include 11 | 12 | prototester : prototester.o $(BLIB) 13 | $(CC) -o $@ $< -lc $(BLIB) 14 | 15 | mucurses_test.o : mucurses_test.c 16 | $(CC) $(CFLAGS) $(EXTRA_CFLAGS) -Wall -o $@ -c $< 17 | 18 | mucurses_test : mucurses_test.o $(BLIB) 19 | $(CC) -o $@ $< -lc $(BLIB) 20 | 21 | clean : 22 | rm -f hijack prototester mucurses_test *.o 23 | -------------------------------------------------------------------------------- /libinstaller/Makefile: -------------------------------------------------------------------------------- 1 | # _bin.c files required by both BTARGET and ITARGET installers 2 | BINFILES = bootsect_bin.c ldlinux_bin.c \ 3 | mbr_bin.c gptmbr_bin.c 4 | 5 | PERL = perl 6 | 7 | all: $(BINFILES) 8 | 9 | bootsect_bin.c: ../core/ldlinux.bss bin2c.pl 10 | $(PERL) bin2c.pl syslinux_bootsect < $< > $@ 11 | 12 | ldlinux_bin.c: ../core/ldlinux.sys bin2c.pl 13 | $(PERL) bin2c.pl syslinux_ldlinux 512 < $< > $@ 14 | 15 | mbr_bin.c: ../mbr/mbr.bin bin2c.pl 16 | $(PERL) bin2c.pl syslinux_mbr < $< > $@ 17 | 18 | gptmbr_bin.c: ../mbr/gptmbr.bin bin2c.pl 19 | $(PERL) bin2c.pl syslinux_gptmbr < $< > $@ 20 | 21 | tidy: 22 | rm -f $(BINFILES) 23 | 24 | clean: tidy 25 | 26 | dist: tidy 27 | 28 | spotless: clean 29 | 30 | strip: 31 | -------------------------------------------------------------------------------- /libinstaller/advconst.h: -------------------------------------------------------------------------------- 1 | ../com32/include/syslinux/advconst.h -------------------------------------------------------------------------------- /libinstaller/getopt/getopt.h: -------------------------------------------------------------------------------- 1 | #ifndef _GETOPT_H 2 | #define _GETOPT_H 3 | 4 | /* (Very slightly) adapted from klibc */ 5 | 6 | struct option { 7 | const char *name; 8 | int has_arg; 9 | int *flag; 10 | int val; 11 | }; 12 | 13 | enum { 14 | no_argument = 0, 15 | required_argument = 1, 16 | optional_argument = 2, 17 | }; 18 | 19 | extern char *optarg; 20 | extern int optind, opterr, optopt; 21 | 22 | extern int getopt_long(int, char *const *, const char *, 23 | const struct option *, int *); 24 | 25 | #endif /* _GETOPT_H */ 26 | -------------------------------------------------------------------------------- /libinstaller/setadv.h: -------------------------------------------------------------------------------- 1 | #ifndef _H_SET_ADV_ 2 | #define _H_SET_ADV_ 3 | 4 | /* ADV information */ 5 | #define ADV_SIZE 512 /* Total size */ 6 | #define ADV_LEN (ADV_SIZE-3*4) /* Usable data size */ 7 | 8 | extern unsigned char syslinux_adv[2 * ADV_SIZE]; 9 | 10 | int syslinux_setadv(int tag, size_t size, const void *data); 11 | void syslinux_reset_adv(unsigned char *advbuf); 12 | int syslinux_validate_adv(unsigned char *advbuf); 13 | int read_adv(const char *path, const char *cfg); 14 | int write_adv(const char *path, const char *cfg); 15 | 16 | #endif 17 | -------------------------------------------------------------------------------- /libinstaller/syslxcom.h: -------------------------------------------------------------------------------- 1 | #ifndef _H_SYSLXCOM_ 2 | #define _H_SYSLXCOM_ 3 | 4 | #include "syslinux.h" 5 | 6 | extern const char *program; 7 | ssize_t xpread(int fd, void *buf, size_t count, off_t offset); 8 | ssize_t xpwrite(int fd, const void *buf, size_t count, off_t offset); 9 | void clear_attributes(int fd); 10 | void set_attributes(int fd); 11 | int sectmap(int fd, sector_t *sectors, int nsectors); 12 | int syslinux_already_installed(int dev_fd); 13 | 14 | #endif 15 | -------------------------------------------------------------------------------- /lzo/.gitignore: -------------------------------------------------------------------------------- 1 | /prepcore 2 | -------------------------------------------------------------------------------- /mbr/isohdppx.S: -------------------------------------------------------------------------------- 1 | #define PARTITION_SUPPORT 1 2 | #include "isohdpfx.S" 3 | -------------------------------------------------------------------------------- /memdisk/compiler.h: -------------------------------------------------------------------------------- 1 | 2 | #ifdef __WATCOMC__ 3 | # define MEMDISK_PACKED_PREFIX _Packed 4 | # define MEMDISK_PACKED_POSTFIX 5 | #else 6 | /* Assume GNU C for now */ 7 | # define MEMDISK_PACKED_PREFIX 8 | # define MEMDISK_PACKED_POSTFIX __attribute__((packed)) 9 | #endif 10 | -------------------------------------------------------------------------------- /memdisk/ctypes.c: -------------------------------------------------------------------------------- 1 | #include "../com32/lib/ctypes.c" 2 | -------------------------------------------------------------------------------- /memdisk/e820data: -------------------------------------------------------------------------------- 1 | 0000000000000000 000000000009bc00 1 1 2 | 000000000009bc00 0000000000004400 2 1 3 | 00000000000e9800 0000000000016800 2 1 4 | 00000000000e9800 000000000000b400 2 1 5 | 00000000000f5000 000000000000b000 2 9 6 | 0000000000100000 0000000006ee0000 1 1 7 | 0000000006fe0000 000000000000fc00 3 1 8 | 0000000006fefc00 0000000000000400 4 1 9 | 0000000006ff0000 0000000000002000 2 1 10 | 0000000006ff2000 000000000000e000 1 1 11 | 0000000007000000 0000000000100000 2 1 12 | 00000000fff00000 0000000000100000 2 1 13 | 14 | 0000000000586000 0000000000168000 2 1 15 | 000000000009ba00 0000000000000200 2 1 16 | -------------------------------------------------------------------------------- /memdisk/memdisk_chs_512.asm: -------------------------------------------------------------------------------- 1 | [map all memdisk_chs_512.map] 2 | %define EDD 0 3 | %define ELTORITO 0 4 | %define SECTORSIZE_LG2 9 ; log2(sector size) 5 | %include "memdisk.inc" 6 | -------------------------------------------------------------------------------- /memdisk/memdisk_edd_512.asm: -------------------------------------------------------------------------------- 1 | [map all memdisk_edd_512.map] 2 | %define EDD 1 3 | %define ELTORITO 0 4 | %define SECTORSIZE_LG2 9 ; log2(sector size) 5 | %include "memdisk.inc" 6 | -------------------------------------------------------------------------------- /memdisk/memdisk_iso_2048.asm: -------------------------------------------------------------------------------- 1 | [map all memdisk_iso_2048.map] 2 | %define EDD 1 3 | %define ELTORITO 1 4 | %define SECTORSIZE_LG2 11 ; log2(sector size) 5 | %include "memdisk.inc" 6 | -------------------------------------------------------------------------------- /memdisk/memdisk_iso_512.asm: -------------------------------------------------------------------------------- 1 | [map all memdisk_iso_512.map] 2 | %define EDD 1 3 | %define ELTORITO 1 4 | %define SECTORSIZE_LG2 9 ; log2(sector size) 5 | %include "memdisk.inc" 6 | -------------------------------------------------------------------------------- /memdisk/strntoumax.c: -------------------------------------------------------------------------------- 1 | #include "../com32/lib/strntoumax.c" 2 | -------------------------------------------------------------------------------- /memdisk/strtoull.c: -------------------------------------------------------------------------------- 1 | #include "../com32/lib/strtoull.c" 2 | -------------------------------------------------------------------------------- /memdisk/strtox.c: -------------------------------------------------------------------------------- 1 | #include "../com32/lib/strtox.c" 2 | -------------------------------------------------------------------------------- /memdisk/suffix_number.c: -------------------------------------------------------------------------------- 1 | #include "../com32/lib/suffix_number.c" 2 | -------------------------------------------------------------------------------- /memdisk/testdata1: -------------------------------------------------------------------------------- 1 | 0000000000000000 000000000009bc00 1 2 | 000000000009bc00 0000000000004400 2 3 | 00000000000e9800 0000000000016800 2 4 | 0000000000100000 0000000006ee0000 1 5 | 0000000006fe0000 000000000000fc00 3 6 | 0000000006fefc00 0000000000000400 4 7 | 0000000006ff0000 0000000000002000 2 8 | 0000000006ff2000 000000000000e000 1 9 | 0000000007000000 0000000000100000 2 10 | 00000000fff00000 0000000000100000 2 11 | 12 | 0000000000586000 0000000000168000 2 13 | 000000000009ba00 0000000000000200 2 14 | -------------------------------------------------------------------------------- /memdisk/testdata2: -------------------------------------------------------------------------------- 1 | 0000000000000000 000000000009bc00 1 2 | 000000000009bc00 0000000000004400 2 3 | 00000000000e9800 0000000000016800 2 4 | 0000000000100000 0000000006ee0000 1 5 | 0000000006fe0000 000000000000fc00 3 6 | 0000000006fefc00 0000000000000400 4 7 | 0000000006ff0000 0000000000002000 2 8 | 0000000006ff2000 000000000000e000 1 9 | 0000000007000000 0000000000100000 2 10 | 00000000fff00000 0000000000100000 2 11 | -------------------------------------------------------------------------------- /memdisk/testdata3: -------------------------------------------------------------------------------- 1 | 0000000000000000 000000000009bc00 1 2 | 000000000009bc00 0000000000004400 2 3 | 00000000000e9800 0000000000016800 2 4 | 0000000000100000 0000000006ee0000 1 5 | 0000000006fe0000 000000000000fc00 3 6 | 0000000006fefc00 0000000000000400 4 7 | 0000002000000000 0000001000000000 1 8 | 0000000006ff0000 0000000000002000 2 9 | 0000000006ff2000 000000000000e000 1 10 | 0000000007000000 0000000000100000 2 11 | 00000000fff00000 0000000000100000 2 12 | 13 | 0000000000586000 0000000000168000 2 14 | 000000000009ba00 0000000000000200 2 15 | -------------------------------------------------------------------------------- /memdump/__divdi3.c: -------------------------------------------------------------------------------- 1 | /* 2 | * arch/i386/libgcc/__divdi3.c 3 | */ 4 | 5 | #include 6 | #include 7 | 8 | extern uint64_t __udivmoddi4(uint64_t num, uint64_t den, uint64_t * rem); 9 | 10 | int64_t __divdi3(int64_t num, int64_t den) 11 | { 12 | int minus = 0; 13 | int64_t v; 14 | 15 | if (num < 0) { 16 | num = -num; 17 | minus = 1; 18 | } 19 | if (den < 0) { 20 | den = -den; 21 | minus ^= 1; 22 | } 23 | 24 | v = __udivmoddi4(num, den, NULL); 25 | if (minus) 26 | v = -v; 27 | 28 | return v; 29 | } 30 | -------------------------------------------------------------------------------- /memdump/__udivmoddi4.c: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | uint64_t __udivmoddi4(uint64_t num, uint64_t den, uint64_t * rem_p) 4 | { 5 | uint64_t quot = 0, qbit = 1; 6 | 7 | if (den == 0) { 8 | asm volatile ("int $0"); 9 | return 0; /* If trap returns... */ 10 | } 11 | 12 | /* Left-justify denominator and count shift */ 13 | while ((int64_t) den >= 0) { 14 | den <<= 1; 15 | qbit <<= 1; 16 | } 17 | 18 | while (qbit) { 19 | if (den <= num) { 20 | num -= den; 21 | quot += qbit; 22 | } 23 | den >>= 1; 24 | qbit >>= 1; 25 | } 26 | 27 | if (rem_p) 28 | *rem_p = num; 29 | 30 | return quot; 31 | } 32 | -------------------------------------------------------------------------------- /memdump/code16.h: -------------------------------------------------------------------------------- 1 | /* Must be included first of all */ 2 | #ifdef __ASSEMBLY__ 3 | .code16 4 | #else 5 | __asm__ (".code16gcc"); 6 | #endif 7 | -------------------------------------------------------------------------------- /memdump/errno.h: -------------------------------------------------------------------------------- 1 | #ifndef ERRNO_H 2 | #define ERRNO_H 3 | 4 | int errno; 5 | void perror(const char *); 6 | 7 | #endif /* ERRNO_H */ 8 | -------------------------------------------------------------------------------- /memdump/file.h: -------------------------------------------------------------------------------- 1 | #ifndef FILE_H 2 | #define FILE_H 3 | 4 | #include "mystuff.h" 5 | 6 | struct serial_if { 7 | int port; 8 | void *pvt; 9 | void (*read) (struct serial_if *, void *, size_t); 10 | void (*write) (struct serial_if *, const void *, size_t); 11 | }; 12 | 13 | struct file_info { 14 | const char *name; 15 | size_t base; 16 | size_t size; 17 | void *pvt; 18 | }; 19 | 20 | 21 | int serial_init(struct serial_if *sif); 22 | void serial_read(struct serial_if *sif, void *data, size_t n); 23 | void serial_write(struct serial_if *sif, const void *data, size_t n); 24 | 25 | #endif /* FILE_H */ 26 | -------------------------------------------------------------------------------- /memdump/inttypes.h: -------------------------------------------------------------------------------- 1 | #include 2 | -------------------------------------------------------------------------------- /memdump/memcpy.S: -------------------------------------------------------------------------------- 1 | # 2 | # memcpy.S 3 | # 4 | # Simple 16-bit memcpy() implementation 5 | # 6 | 7 | .text 8 | .code16gcc 9 | .globl memcpy 10 | .type memcpy, @function 11 | memcpy: 12 | cld 13 | pushw %di 14 | pushw %si 15 | movw %ax,%di 16 | movw %dx,%si 17 | # The third argument is already in cx 18 | rep ; movsb 19 | popw %si 20 | popw %di 21 | ret 22 | 23 | .size memcpy,.-memcpy 24 | -------------------------------------------------------------------------------- /memdump/memset.S: -------------------------------------------------------------------------------- 1 | # 2 | # memset.S 3 | # 4 | # Minimal 16-bit memset() implementation 5 | # 6 | 7 | .text 8 | .code16gcc 9 | .globl memset 10 | .type memset, @function 11 | memset: 12 | cld 13 | pushw %di 14 | movw %ax,%di 15 | movb %dl,%al 16 | # The third argument is already in %cx 17 | rep ; stosb 18 | popw %di 19 | retl 20 | 21 | .size memset,.-memset 22 | -------------------------------------------------------------------------------- /memdump/mystuff.h: -------------------------------------------------------------------------------- 1 | #ifndef MYSTUFF_H 2 | #define MYSTUFF_H 3 | 4 | #include 5 | 6 | typedef signed char int8_t; 7 | typedef unsigned char uint8_t; 8 | typedef signed short int16_t; 9 | typedef unsigned short uint16_t; 10 | typedef signed int int32_t; 11 | typedef unsigned int uint32_t; 12 | typedef signed long long int64_t; 13 | typedef unsigned long long uint64_t; 14 | 15 | unsigned int skip_atou(const char **s); 16 | unsigned long strtoul(const char *, char **, int); 17 | 18 | static inline int isdigit(int ch) 19 | { 20 | return (ch >= '0') && (ch <= '9'); 21 | } 22 | 23 | #endif /* MYSTUFF_H */ 24 | -------------------------------------------------------------------------------- /memdump/skipatou.c: -------------------------------------------------------------------------------- 1 | #include "mystuff.h" 2 | 3 | unsigned int skip_atou(const char **s) 4 | { 5 | int i = 0; 6 | 7 | while (isdigit(**s)) 8 | i = i * 10 + *((*s)++) - '0'; 9 | return i; 10 | } 11 | -------------------------------------------------------------------------------- /memdump/srecsend.h: -------------------------------------------------------------------------------- 1 | #ifndef SRECSEND_H 2 | #define SRECSEND_H 3 | 4 | #include "mystuff.h" 5 | #include "file.h" 6 | 7 | void send_srec(struct serial_if *, struct file_info *, 8 | void (*)(void *, size_t, struct file_info *, size_t)); 9 | 10 | #endif /* SRECSEND_H */ 11 | -------------------------------------------------------------------------------- /memdump/stdbool.h: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | * stdbool.h 4 | */ 5 | 6 | #ifndef _STDBOOL_H 7 | #define _STDBOOL_H 8 | 9 | #ifndef __cplusplus 10 | 11 | #if !defined(__STDC_VERSION__) || (__STDC_VERSION__ < 199901L) 12 | # if !defined(__GNUC__) ||(__GNUC__ < 3) 13 | typedef char _Bool; /* For C compilers without _Bool */ 14 | # endif 15 | #endif 16 | 17 | #define bool _Bool 18 | #define true 1 19 | #define false 0 20 | 21 | #else 22 | 23 | /* C++ */ 24 | #define bool bool 25 | #define true true 26 | #define false false 27 | 28 | #endif 29 | 30 | #define __bool_true_false_are_defined 1 31 | 32 | #endif /* _STDBOOL_H */ 33 | -------------------------------------------------------------------------------- /memdump/stdio.h: -------------------------------------------------------------------------------- 1 | #ifndef STDIO_H 2 | #define STDIO_H 3 | 4 | #include 5 | #include 6 | 7 | typedef unsigned int off_t; 8 | 9 | int putchar(int); 10 | int puts(const char *); 11 | int sprintf(char *buf, const char *fmt, ...); 12 | int vsprintf(char *buf, const char *fmt, va_list args); 13 | int printf(const char *fmt, ...); 14 | 15 | #define stdin 0 16 | #define stdout 1 17 | #define stderr 2 18 | 19 | #define fprintf(x, y, ...) printf(y, ## __VA_ARGS__) 20 | 21 | #endif /* STDIO_H */ 22 | -------------------------------------------------------------------------------- /memdump/stdlib.h: -------------------------------------------------------------------------------- 1 | #ifndef STDLIB_H 2 | #define STDLIB_H 3 | 4 | #define NULL ((void *)0) 5 | 6 | typedef int ssize_t; 7 | typedef unsigned int size_t; 8 | 9 | void __attribute__ ((noreturn)) exit(int); 10 | 11 | void *malloc(size_t); 12 | void free(void *); 13 | 14 | #endif 15 | -------------------------------------------------------------------------------- /memdump/string.h: -------------------------------------------------------------------------------- 1 | /* 2 | * string.h 3 | */ 4 | 5 | #ifndef _STRING_H 6 | #define _STRING_H 7 | 8 | /* Standard routines */ 9 | #define memcpy(a,b,c) __builtin_memcpy(a,b,c) 10 | #define memset(a,b,c) __builtin_memset(a,b,c) 11 | #define strcpy(a,b) __builtin_strcpy(a,b) 12 | #define strlen(a) __builtin_strlen(a) 13 | 14 | /* This only returns true or false */ 15 | static inline int memcmp(const void *__m1, const void *__m2, unsigned int __n) 16 | { 17 | _Bool rv; 18 | asm volatile ("cld ; repe ; cmpsb ; setne %0":"=abd" (rv), "+D"(__m1), 19 | "+S"(__m2), "+c"(__n)); 20 | return rv; 21 | } 22 | 23 | #endif /* _STRING_H */ 24 | -------------------------------------------------------------------------------- /memdump/ymsend.h: -------------------------------------------------------------------------------- 1 | #ifndef YMSEND_H 2 | #define YMSEND_H 3 | 4 | #include "mystuff.h" 5 | #include "file.h" 6 | 7 | void send_ymodem(struct serial_if *, struct file_info *, 8 | void (*)(void *, size_t, struct file_info *, size_t)); 9 | void end_ymodem(struct serial_if *); 10 | 11 | #endif /* YMSEND_H */ 12 | -------------------------------------------------------------------------------- /mk/devel.mk: -------------------------------------------------------------------------------- 1 | # Useful while doing development, but not for production. 2 | GCCWARN += -Wno-clobbered -Werror 3 | -------------------------------------------------------------------------------- /modules/int18.asm: -------------------------------------------------------------------------------- 1 | bits 16 2 | org 100h 3 | _start: 4 | mov ax,5 5 | int 22h 6 | mov ah,09h 7 | mov dx,msg 8 | int 21h 9 | mov ax,000Ch 10 | xor dx,dx 11 | int 22h 12 | int 18h 13 | jmp 0F000h:0FFF0h ; INT 18h should not return... 14 | 15 | section .data 16 | msg: db 'Local boot via INT 18...', 13, 10, '$' 17 | -------------------------------------------------------------------------------- /now.pl: -------------------------------------------------------------------------------- 1 | #!/usr/bin/perl 2 | # 3 | # Print the time (possibly the mtime of a file) as a hexadecimal integer 4 | # If more than one file, print the mtime of the *newest* file. 5 | # 6 | 7 | undef $now; 8 | 9 | foreach $file ( @ARGV ) { 10 | ($dev,$ino,$mode,$nlink,$uid,$gid,$rdev,$size,$atime,$mtime, 11 | $ctime,$blksize,$blocks) = stat($file); 12 | if ( !defined($now) || $now < $mtime ) { 13 | $now = $mtime; 14 | } 15 | } 16 | 17 | if ( !defined($now) ) { 18 | $now = time; 19 | } 20 | 21 | printf "0x%08x\n", $now; 22 | -------------------------------------------------------------------------------- /sample/m16-640x640-syslinux.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TritonDataCenter/syslinux/b78ed9f973e228e886229ccd9ab41dc228cb81b6/sample/m16-640x640-syslinux.jpg -------------------------------------------------------------------------------- /sample/sample.msg: -------------------------------------------------------------------------------- 1 | sample.msg 2 | Note that ... can be used to delimit something 3 | that is effectively a comment. 4 | This message is displayed before the image. 5 | syslogo.lss 6 | This message is displayed after the image. 7 |  8 | Please note colors do not work quite as expected in graphics mode! 9 |  10 | 04 RED 07 02 GREEN 07 01 BLUE 07 11 | 47 RED 07 27 GREEN 07 17 BLUE 07 12 | 13 | 14 | -------------------------------------------------------------------------------- /sample/syslinux_splash.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TritonDataCenter/syslinux/b78ed9f973e228e886229ccd9ab41dc228cb81b6/sample/syslinux_splash.jpg -------------------------------------------------------------------------------- /sample/syslogo.ppm.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TritonDataCenter/syslinux/b78ed9f973e228e886229ccd9ab41dc228cb81b6/sample/syslogo.ppm.gz -------------------------------------------------------------------------------- /syslinux.spec.in: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TritonDataCenter/syslinux/b78ed9f973e228e886229ccd9ab41dc228cb81b6/syslinux.spec.in -------------------------------------------------------------------------------- /utils/md5pass: -------------------------------------------------------------------------------- 1 | #!/usr/bin/perl 2 | 3 | use bytes; 4 | use Crypt::PasswdMD5; 5 | use MIME::Base64; 6 | 7 | sub random_bytes($) { 8 | my($n) = @_; 9 | my($v, $i); 10 | 11 | if ( open(RANDOM, '<', '/dev/random') || 12 | open(RANDOM, '<', '/dev/urandom') ) { 13 | read(RANDOM, $v, $n); 14 | } else { 15 | # No real RNG available... 16 | srand($$ ^ time); 17 | $v = ''; 18 | for ( $i = 0 ; $i < $n ; $i++ ) { 19 | $v .= ord(int(rand() * 256)); 20 | } 21 | } 22 | 23 | return $v; 24 | } 25 | 26 | 27 | ($pass, $salt) = @ARGV; 28 | 29 | unless (defined($salt)) { 30 | $salt = MIME::Base64::encode(random_bytes(6), ''); 31 | $salt =~ tr/\+/./; # . not + 32 | } 33 | 34 | print unix_md5_crypt($pass, $salt), "\n"; 35 | -------------------------------------------------------------------------------- /utils/sha1pass: -------------------------------------------------------------------------------- 1 | #!/usr/bin/perl 2 | 3 | use bytes; 4 | use Digest::SHA1; 5 | use MIME::Base64; 6 | 7 | sub random_bytes($) { 8 | my($n) = @_; 9 | my($v, $i); 10 | 11 | if ( open(RANDOM, '<', '/dev/random') || 12 | open(RANDOM, '<', '/dev/urandom') ) { 13 | read(RANDOM, $v, $n); 14 | } else { 15 | # No real RNG available... 16 | srand($$ ^ time); 17 | $v = ''; 18 | for ( $i = 0 ; $i < $n ; $i++ ) { 19 | $v .= ord(int(rand() * 256)); 20 | } 21 | } 22 | 23 | return $v; 24 | } 25 | 26 | 27 | ($pass, $salt) = @ARGV; 28 | 29 | unless (defined($salt)) { 30 | $salt = MIME::Base64::encode(random_bytes(6), ''); 31 | } 32 | $pass = Digest::SHA1::sha1_base64($salt, $pass); 33 | 34 | print '$4$', $salt, '$', $pass, "\$\n"; 35 | -------------------------------------------------------------------------------- /version: -------------------------------------------------------------------------------- 1 | 4.06 2012 2 | -------------------------------------------------------------------------------- /win/hello.c: -------------------------------------------------------------------------------- 1 | /* 2 | * Test program for C compiler; if this doesn't compile, the 3 | * C compiler is seriously broken. 4 | */ 5 | 6 | #include 7 | #include 8 | 9 | int main(void) 10 | { 11 | printf("Hello, World!\n"); 12 | return 0; 13 | } 14 | -------------------------------------------------------------------------------- /win/ntfstest.rc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TritonDataCenter/syslinux/b78ed9f973e228e886229ccd9ab41dc228cb81b6/win/ntfstest.rc -------------------------------------------------------------------------------- /win/sysexits.h: -------------------------------------------------------------------------------- 1 | #define EX_USAGE 0x40 2 | -------------------------------------------------------------------------------- /win32/README: -------------------------------------------------------------------------------- 1 | Building the Win32 installer requires the MinGW compiler, available at: 2 | 3 | http://www.mingw.org/ 4 | 5 | Prepackaged versions of the MinGW cross-compiler are now included in 6 | several Linux distributions, including Fedora. 7 | -------------------------------------------------------------------------------- /win64/README: -------------------------------------------------------------------------------- 1 | Building the Win64 installer requires the MinGW-W64 compiler, 2 | available at: 3 | 4 | http://mingw-w64.sourceforge.net/ 5 | 6 | For prepackaged versions of the MinGW-W64 cross-compiler for the 7 | Fedora Linux distribution (and possibly other RPM-based 8 | distributions), see: 9 | 10 | http://lists.fedoraproject.org/pipermail/mingw/2010-May/002589.html 11 | --------------------------------------------------------------------------------