aboutsummaryrefslogtreecommitdiffstats
path: root/com32/modules
Commit message (Collapse)AuthorAgeFilesLines
...
| | * | | | | | | | com32: make syslinux_dump_*() pure debugging functionsH. Peter Anvin2011-06-272-22/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Make the syslinux_dump_*() functions pure debugging functions; that is the way that they are used anyway, and this way they log to the same place as dprintf. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
| | * | | | | | | | Use <dprintf.h> instead of an ad hoc definitionH. Peter Anvin2011-06-272-12/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Instead of using ad hoc definitions of dprintf, dprintf2, vdprintf and vdprintf2, use <dprintf.h> everywhere possible. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
| | * | | | | | | | chain.c32: fix types in dprintf()H. Peter Anvin2011-06-201-4/+5
| | | |_|_|_|_|/ / | | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Correct invalid types in dprintf(). Signed-off-by: H. Peter Anvin <hpa@zytor.com>
| | * | | | | | | chain.c32: allow specifying arbitrary seg/offs/entryH. Peter Anvin2011-05-011-21/+67
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Augment the seg= option to also allow for the offset and entry point to be specified. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
| | * | | | | | | chain: Support loading ReactOS' FreeLdrShao Miller2011-05-011-0/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Use something like: LABEL freeldr COM32 chain.c32 APPEND freeldr=freeldr.sys Signed-off-by: Shao Miller <shao.miller@yrdsb.edu.on.ca>
| | * | | | | | | chain: Run Nindent on chain.cShao Miller2011-05-011-11/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Minor formatting fix-ups Signed-off-by: Shao Miller <shao.miller@yrdsb.edu.on.ca>
| * | | | | | | | com32: fix warning in host modulePaulo Alcantara2012-05-281-0/+1
| | |_|_|_|_|_|/ | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | host.c: In function ‘main’: host.c:56:9: warning: implicit declaration of function ‘exit’ [-Wimplicit-function-declaration] host.c:56:9: warning: incompatible implicit declaration of built-in function ‘exit’ [enabled by default] Signed-off-by: Paulo Alcantara <pcacjr@zytor.com>
| * | | | | | | com32: make syslinux_dump_*() pure debugging functionsH. Peter Anvin2012-05-182-22/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Make the syslinux_dump_*() functions pure debugging functions; that is the way that they are used anyway, and this way they log to the same place as dprintf. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
| * | | | | | | Use <dprintf.h> instead of an ad hoc definitionH. Peter Anvin2012-05-182-12/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Instead of using ad hoc definitions of dprintf, dprintf2, vdprintf and vdprintf2, use <dprintf.h> everywhere possible. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
| * | | | | | | com32: Do not use hard-coded values for PXE flagsPaulo Alcantara2012-05-122-2/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | There is already a syslinux/pxe_api.h header file which contains PXE flags, so these hard-coded values are unnecessaries. Signed-off-by: Paulo Alcantara <pcacjr@zytor.com>
| * | | | | | | pxe: resolve names via DNS from protected-mode codePaulo Alcantara2012-05-121-4/+33
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Syslinux used to call __intcall() for calling routines of the old COMBOOT API to resolve names via DNS (INT 22h, AX=0x0010) that seemed pointless, since INT 22h, AX=0x0010 does call the protected-mode function pm_pxe_resolv_dns() when calling INT 22h, AX=0x0010. So, for resolving names via DNS we must call pxe_dns_resolv() (a protected-mode function) instead for now. Signed-off-by: Paulo Alcantara <pcacjr@zytor.com>
| * | | | | | | host.c32: do not use INT 22h, AX=0x0010 to resolve DNSPaulo Alcantara2012-05-121-21/+22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Use pxe_dns() function (assigned in syslinux/pxe.h) instead for resolving DNS. Signed-off-by: Paulo Alcantara <pcacjr@zytor.com>
| * | | | | | | Mark unused function parameters as __unusedMatt Fleming2012-04-173-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Move the __unused tag from com32/hdt/ to com32/include/klibc/ so that it can be used by the entire code base, and mark unused function parameters as __unused to stop the following kind of build warning, elflink/load_env32.c: In function ‘load_env32’: elflink/load_env32.c:107:30: warning: unused parameter ‘regs’ Signed-off-by: Matt Fleming <matt.fleming@intel.com>
| * | | | | | | meminfo: If we allocate with lmalloc() we should free with lfree()Matt Fleming2012-04-172-5/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Since commit 74518b8b691c ("elflink: Make ELF the default object format") we've been using lmalloc() with free() instead of lfree(). This bug was pointed out by the following build warnings, meminfo.c: In function ‘dump_e820’: meminfo.c:93:5: warning: implicit declaration of function ‘free’ meminfo.c:93:5: warning: incompatible implicit declaration of built-in function ‘free’ vesainfo.c: In function ‘print_modes’: vesainfo.c:82:2: warning: implicit declaration of function ‘free’ vesainfo.c:82:2: warning: incompatible implicit declaration of built-in function ‘free’ Signed-off-by: Matt Fleming <matt.fleming@intel.com>
* | | | | | | | Archicture-dependent get_cpuid in sysdump/cpuid is fixed.chandramouli narayanan2012-06-252-1/+7
|/ / / / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In the following sample programs zzjson.c, advdump.c, entrydump.c, hello.c, resolv.c, serialinfo.c in com32/samples, the following code call hangs the program: openconsole(&dev_null_r, &dev_stdcon_w); The following fix works: openconsole(&dev_rawcon_r, &dev_ansiserial_w); Remanants of the unused old i386-only files, if any, need to be pruned.
* | | | | | | elflink: Make ELF the default object formatMatt Fleming2011-04-264-35/+69
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | com32/elflink/modules was originally created to house ELF modules and keep them separate from the COM32 modules as the elflink branch was being developed. However, this has inadvertently created a maintenance nightmare because code was copied from elsewhere in the tree into com32/elflink/modules, resulting in duplication. Bug fixes have been going into the original code but have not been merged onto the elflink branch, leaving the duplicate code in com32/elflink/modules buggy. So let's delete this directory. There really is no reason to keep ELF and COM32 modules separate because there's no reason to need both COM32 and ELF modules to coexist. ELF is a far superior object file format and all modules are not emitted as ELF objects. Now that we're outputting ELF modules we can use dynamic memory instead of the cs_bounce bounce buffer. This commit requires a certain amount of shuffling for some files. quicksort.c isn't a module and belongs as part of the util library. cli.h belongs in com32/include so that other modules can make use of the cli code in ldlinux.c32. All libraries are now ELF shared libraries which are only loaded to fixup unresolved symbols for executable modules and renamed from *.a to *.c32. This reduces the runtime memory footprint because libraries are only loaded when needed and because every executable no longer gets its own copy of code/data (as it would if linking with a static library). Also, remove MINLIBOBJS from libcom32.c32 because it is already part of libcom32min.a and we don't want to have any duplicate symbols between the core (which links with libcom32min.a) and libcom32.c32. Welcome to the New World Order of ELF modules! Signed-off-by: Matt Fleming <matt.fleming@linux.intel.com>
* | | | | | | com32: console is already initialised when we enter main()Matt Fleming2011-04-2625-45/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | There's no need to initialise the console when we enter main() as ldlinux.c32 will already have initialised it for us. Leaving the calls to openconsole() causes the console settings to be reset whenever we run a module. Signed-off-by: Matt Fleming <matt.fleming@linux.intel.com>
* | | | | | | Merge remote-tracking branch 'zytor/master' into elflinkMatt Fleming2011-04-262-3/+105
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We need the recent Makefile filename changes to be merged into the elflink branch because it will make things simpler when converting all modules to ELF format. Conflicts: com32/Makefile com32/modules/Makefile version
| * | | | | | Merge remote-tracking branch 'mfleming/for-hpa/makefile-cleanup'H. Peter Anvin2011-04-261-1/+2
| |\ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Resolved Conflicts: com32/hdt/Makefile com32/sysdump/Makefile Signed-off-by: H. Peter Anvin <hpa@zytor.com>
| | * | | | | | Makefile: Move Makefile fragments into mk/Matt Fleming2011-04-071-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Move the MCONFIG files into a mk/ directory and give them more descriptive names. This is purely a cosmetic change to make the 'include' directives a bit more coherent by making it obvious exactly which MCONFIG file we're including. For example, in com32/lua/src/Makefile we exchange the line, include ../../MCONFIG for the much more comprehensible, include $(MAKEDIR)/com32.mk Signed-off-by: Matt Fleming <matt.fleming@linux.intel.com>
| * | | | | | | zzjson: Adding sample moduleErwan Velu2011-03-182-1/+102
| |/ / / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Note, this module is lacking of the reading test as the ungetc isn't available. At least, this first implementation consider that syslinux needs more the output stuff than the input one.
* | | | | | | Merge remote-tracking branch 'zytor/master' into elflink-mergeMatt Fleming2011-04-043-28/+45
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: com32/lib/Makefile com32/lib/sys/open.c version
| * | | | | | chain.c32: Allow both "guid" and "uuid"H. Peter Anvin2011-03-131-1/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The GPT specification calls it "guid", but the Unix world generally calls it "uuid". Signed-off-by: H. Peter Anvin <hpa@zytor.com>
| * | | | | | chain.c32: fix specification of disk by GUID (UUID)H. Peter Anvin2011-03-131-2/+2
| | |_|_|_|/ | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fix specification of disk by GUID, broken due to an incorrect pointer. Reported-by: Szymon H <bodwick@gmail.com> Signed-off-by: H. Peter Anvin <hpa@zytor.com>
| * | | | | com32: single instance of skipspace()Erwan Velu2011-02-071-8/+1
| | |_|_|/ | |/| | | | | | | | | | | | | no need to keep several versions of it.
| * | | | DMI: Adjusting structures size / Adding cpu coreLaurent Licour2011-01-301-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | | This patch adds some correction of the dmi structures but also add the support of the cpu cores/threads.
| * | | | chain.c32: DRMK: Fix comment at top of sourceGene Cumm2010-10-141-1/+2
| | | | |
| * | | | chain.c32: DRMK: Add comment about only using a DWORD for partition offsetGene Cumm2010-10-131-0/+1
| | | | |
| * | | | chain.c32: DRMK: clean up output; clean up and correct commentsGene Cumm2010-10-131-10/+8
| | | | |
| * | | | chain.c: Progress on DRMK and notes that it's not perfect yet.Gene Cumm2010-10-131-2/+21
| | | | |
| * | | | chain.c32: make CHS calculation match core/fs/diskio.cH. Peter Anvin2010-10-121-14/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Use the same format for the CHS calculation as in core/fs/diskio.c; also, apply the correct limits, and propagate the fix to the write routine. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
| * | | | chain.c32: fix conversion from LBA to CHSH. Peter Anvin2010-10-121-1/+1
| | |_|/ | |/| | | | | | | | | | | | | | | | | | | | | | | | | | Bits [9:8] of the cylinder goes into the top bits of the sector register, not the bottom (and the math for that was wrong, anyway.) Reported-by: Michal Soltys <soltys@ziu.info> Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* | | | Merge branch 'master' into elflink-mergeH. Peter Anvin2010-08-123-12/+43
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Resolved Conflicts: core/diskfs.inc core/mem/free.c Signed-off-by: H. Peter Anvin <hpa@zytor.com>
| * | | chain: Extra comments; shrink the new space to minimumGene Cumm2010-08-011-5/+5
| | | |
| * | | chain: Just assign the value rather than using memcpy()Gene Cumm2010-08-011-4/+1
| | | |
| * | | chain: add drmk= to usageGene Cumm2010-08-011-0/+1
| | | |
| * | | chain: Fix up and clean up DRMK load code; fix filename length; Patch memory.Gene Cumm2010-08-011-11/+8
| | | |
| * | | chain.c32: prepare for loading DRMKGene Cumm2010-08-011-0/+31
| | | |
| * | | chain.c: fix public index value in mbr and gpt iteratorsMichal Soltys2010-07-301-3/+3
| |/ / | | | | | | | | | | | | | | | | | | | | | | | | mbr and gpt iterators skip empty / non-data partitions properly, but don't update publicly visible index. With this patch, such partitions are counted as well. Signed-off-by: Michal Soltys <soltys@ziu.info> Signed-off-by: H. Peter Anvin <hpa@zytor.com>
| * | whichsys.c32: Fix example in the comments and Usage outputGert Hulselmans2010-07-131-2/+2
| | | | | | | | | | | | | | | | | | Fix example in the comments and Usage output. Signed-off-by: Gert Hulselmans <gerth@zytor.com>
| * | ifplop.c32: Fix spelling errors and other mistakes in commentsGert Hulselmans2010-07-121-7/+12
| |/ | | | | | | | | | | Fix various spelling errors and other mistakes in the comment section. Signed-off-by: Gert Hulselmans <gerth@zytor.com>
| * ifcpu.c32: Remove defines used in the old sleep function.Gert Hulselmans2010-07-061-4/+0
| | | | | | | | | | | | Remove useless defines which where used in the old sleep function. Signed-off-by: Gert Hulselmans <gerth@zytor.com>
| * Merge remote branch 'gerth/whichsys'H. Peter Anvin2010-07-052-1/+129
| |\
| | * whichsys.c32: execute specific command, based on Syslinux bootloader variantGert Hulselmans2010-07-052-1/+129
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Detemine which command to execute, based on the Syslinux bootloader variant from which you run it. Usage: whichsys.c32 [-iso- command] [-pxe- command] [-sys- command] Examples: whichsys.c32 -iso- chain.c32 hd0 -sys- chain.c32 hd1 swap whichsys.c32 -iso- config iso.cfg -sys- sys.cfg -pxe- pxe.cfg Signed-off-by: Gert Hulselmans <gerth@zytor.com>
| * | Merge remote branch 'gerth/chain_grubcfg'H. Peter Anvin2010-07-051-9/+112
| |\ \
| | * | chain.c32: Put declaration of *stage2 before common codeGert Hulselmans2010-07-051-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | Put declaration of *stage2 before common code. Signed-off-by: Gert Hulselmans <gerth@zytor.com>
| | * | chain.c32: add grubcfg= for passing an alternative config filename to GRUB ↵Gert Hulselmans2010-07-041-9/+112
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Legacy and cleanup the root partition passing GRUB Legacy reserves 89 bytes for storing the filename of the configfile from memory address 0x8217 to 0x826f. We allow overwriting the default value (/boot/grub/menu.lst) when grubcfg=<filename> is used together with grub=<loader>. Examples: chain.c32 fs grub=/boot/grub/stage2 grubcfg=/boot/grub/grub.lst chain.c32 hd1,10 grub=/boot/grub/stage2 grubcfg=/boot/grub/grub.lst Use a structure instead of hard-coded offsets for modifying the install_partition variable (and the configfile name) in the stage2 file. Add some comments about the "boot information format" of the Multiboot specification, which is very similar to the install_partition variable used by GRUB Legacy. Signed-off-by: Gert Hulselmans <gerth@zytor.com>
| * | | ifcpu.c32: need <unistd.h>H. Peter Anvin2010-07-051-0/+1
| | | | | | | | | | | | | | | | Signed-off-by: H. Peter Anvin <hpa@zytor.com>
| * | | ifcpu.c32: remove open-coded sleep functionH. Peter Anvin2010-07-051-13/+1
| | |/ | |/| | | | | | | | | | | | | Remove open-coded sleep function, which uses an unreliable BIOS call. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
| * | com32: canonicalize DEBUG to mean <dprintf.h>H. Peter Anvin2010-07-013-21/+3
| |/ | | | | | | | | | | | | Remove historical uses of DEBUG/dprintf in favor of the centralized <dprintf.h>. Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>