summaryrefslogtreecommitdiff
path: root/core/ldlinux.asm
Commit message (Collapse)AuthorAgeFilesLines
* Merge syslinux/extlinux patch code and core codeH. Peter Anvin2010-06-201-0/+4
| | | | | | | | Merge the SYSLINUX and EXTLINUX patching code and core code, removing EXTLINUX as a separate derivative. All the disk-based systems now use the same code. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* core: canonicalize ROOT_FS_OPSH. Peter Anvin2009-12-221-2/+4
| | | | | | ROOT_FS_OPS belongs in .rodata, and make it the same format. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* btrfs: add btrfs file system support to extlinuxsyslinux-4.00-pre7Alek Du2009-12-221-1/+3
| | | | | | | | the extlinux.sys will be installed in btrfs first 64K blank area, and the extlinux.conf must be in root dir... Signed-off-by: Alek Du <alek.du@intel.com> Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* core: make FILENAME_MAX common; librarize mangle/unmangleH. Peter Anvin2009-08-121-1/+0
| | | | | | | | FILENAME_MAX was 2^8 in all variants by now; make it a common define. Libraries mangle/unmangle; we have generic_mangle_name for Unix-like filesystems, and unmangle now defaults to simple strcpy. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* core: remove assembly definition of Files in iso/pxelinuxH. Peter Anvin2009-08-101-1/+1
| | | | | | | Remove the assembly definition of Files in isolinux and pxelinux. Still to do: remove dependencies on Files living in .bss16 space. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* core/diskstart.inc: make the root filesystem a configurableH. Peter Anvin2009-08-101-0/+3
| | | | | | | Instead of using conditional compilation, just set the root filesystem type in the assembly stub. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* core: merge ldlinux.asm and extlinux.asmH. Peter Anvin2009-08-091-203/+1
| | | | | | | ldlinux.asm and extlinux.asm are by now extremely similar. Merge them. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* Core:SYSLINUX: code cleanLiu Aleaxander2009-06-151-53/+3
| | | | removes the unused variables in ldlinux.asm
* Core:SYSLINUX: ldlinux.asm converted to CLiu Aleaxander2009-06-141-1141/+8
| | | | | Well, something goes ugly but it works. And I still need spend some more time to make the code much better.
* Convert the config load part to CLiu Aleaxander2009-06-031-3/+3
| | | | | | | | | For now, I added a temporary file load_config.c that would be merged into extlinux.c file later, which would make my later work be much easier. And in order to get rid of the conflict noisy message from the open function in ui.inc and the open function defined in the unistd.h, I changed the open in core to core_open. It may be ugly, but it works :)
* Successed in converting the cache code to CLiu Aleaxander2009-06-031-1/+1
| | | | | | | It works well for extlinux(seems broken with ldlinux). With the printf function can not work well in the format string, like %d, I introduced a new function itoa(), that convert the number to string, for debugging.
* Convert the cache code to C and implement the core printf functionLiu Aleaxander2009-06-021-5/+5
| | | | | | | | | for the cahce part, I do get the error message says that undefined reference to `getlinsec'. I'm abort to implement a C version one. for the printf function, it works somehow, but doesn't work well. With the test, it seems it can handle the format output correctly. And I haven't debugged it, so I have no idea for now.
* Merge branch 'master' into core32H. Peter Anvin2009-05-181-10/+0
|\ | | | | | | | | | | | | | | | | | | | | Conflicts: core/extlinux.asm core/isolinux.asm core/ldlinux.asm core/pxeidle.inc core/pxelinux.asm Signed-off-by: H. Peter Anvin <hpa@zytor.com>
| * Try to HLT the processor during idlesyslinux-3.81-pre4H. Peter Anvin2009-05-181-10/+1
| | | | | | | | | | | | | | | | | | | | | | Try to HLT the processor during idle. All the events we care about should have interrupts associated with them, except possibly the serial console. Try to deal with the serial console by waiting some time before going into HLT, and giving the user the option of enabling the serial console interrupt, on the assumption that the BIOS will simply IRET. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* | core: move common module includes to common.incH. Peter Anvin2009-05-171-13/+1
| | | | | | | | | | | | | | A lot of modules are common to *all* the derivatives (as opposed to just "most"); move those to common.inc. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* | core: handle more than 32K of code for disk-based derivativesH. Peter Anvin2009-05-141-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | Handle more than 32K worth of code for disk-based derivatives. We do this by allowing the sector pointers to overflow past sector 1; this is OK because we limit a run to be based on only the pointers that we have read so far. XXX: This is implemented for EXTLINUX, but breaks SYSLINUX. Need to update (and unify!) the SYSLINUX installers to cope. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* | core: rename .text, .data and .bss to .text16, .data16, .bss16unify-pmH. Peter Anvin2009-05-131-10/+10
| | | | | | | | | | | | | | | | Rename the .text, .data and .bss sections to .text16, .data16 and .bss16, in anticipation of being linked with compiler-generated 32-bit code, which presumably would like to use the standard section names. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* | core: zero bss and uibss; fix some section confusionsH. Peter Anvin2009-05-131-8/+8
| | | | | | | | | | | | | | | | | | | | | | Set .bss and .uibss as soon as we are fully loaded. This gives us the more familiar behavior of most normal execution environments. The .earlybss section is not zeroed; therefore, all variables that are set before we have the opportunity to zero need to go in this section. This checkin also fixes some incorrect section directives. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* | core: move initial code to a new .init segment; unify .bss+.bss1H. Peter Anvin2009-05-131-1/+6
| | | | | | | | | | | | | | | | | | Move code used before loading is complete to a new .init segment; .text is now only the stuff that is used at any time. Move the .bss1 segment down to where .bss and .bss2 already are; it seems to fit better there now. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* | New attempt at unify protected mode entry/exitH. Peter Anvin2009-05-131-0/+1
|/ | | | | | | | | Another attempt at unify protected mode entry/exit, based on the previous bcopyint branch. This should, among other things, give a "full service" PM environment including BIOS upcalls and interrupt service to the core-internal code. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* core: merge the startup code for disk-based derivativesH. Peter Anvin2009-04-191-653/+3
| | | | | | | | Merge the startup code for disk-based derivatives (currently SYSLINUX, EXTLINUX) into a single file. There is probably still additional shared code that should be merged, but this is a good start. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* core: move vgafontbuf out of the zero segmentH. Peter Anvin2009-04-131-12/+0
| | | | | | | | | | | vgafontbuf is one of the largest (bss) structures in the zero segment, together with the trackbuf (which we realistically can't move.) Create a new "auxilliary segment" for fixed-sized data which needs to be in the low megabyte, but not necessarily in the zero segment. This pushes up the low memory usage, but only by 8K. Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
* core: add alignz macro (analogous to "alignb") for zero-pad alignH. Peter Anvin2009-04-131-3/+3
| | | | | | | Add a new macro "alignz" to align with zero bytes; use to align inside a data section (i.e. a progbits section which doesn't contain code.) Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
* Update copyright notices; add Intel notices where appropriateH. Peter Anvin2009-04-041-0/+1
| | | | | | | Update copyright notices. Per agreement with my new employer, Intel Corporation, add Intel copyright notices where appropriate. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* Banner: "and contributors" is just too long; try "et al"H. Peter Anvin2009-03-311-1/+1
| | | | | | | | | Impact: aestetics Change "and contributors" to "et al" so that the message actually fits on one line. This is unfortunate, but what can you do... Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* Add "and contributors" to the copyright bannerH. Peter Anvin2009-03-211-1/+1
| | | | | Clarify that there are nowadays more copyright holders than just myself.
* SYSLINUX: fix handling of .bss files for FAT12/FAT16H. Peter Anvin2009-03-161-4/+9
| | | | | | | | The size of the superblock is different for FAT12/FAT16 and FAT32. We should only copy the relevant portions of the superblock over. Technically speaking, it is possible for FAT12/FAT16 to have an older, smaller superblock as well (without the 0x29 boot signature); we don't handle that at the moment.
* YEAR is a number, not a stringH. Peter Anvin2009-02-271-2/+3
| | | | | The macro YEAR is a number, not a string, so we have to use the asciidec macro.
* Use YEAR, not the obsolete macro yearH. Peter Anvin2009-02-271-1/+1
|
* ldlinux: move es manipulation into ucs2_to_cpH. Peter Anvin2009-02-101-6/+4
| | | | | | | If currently the only caller of ucs2_to_cp wants to use ES, we might as well move the ES set/restore into ucs2_to_cp. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* ldlinux: readdir: trivial optimizationH. Peter Anvin2009-02-101-4/+3
| | | | | | Trivially optimize the readdir code Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* ldlinux: fix interface to ucs2_to_cpH. Peter Anvin2009-02-101-4/+4
| | | | | The interface to ucs2_to_cp has changed slightly, it now returns ZF=0 on failure, not CF=1.
* Merge branch 'charset' into dirH. Peter Anvin2009-02-101-3/+25
|\
| * Reorganize the codepage handling to allow ucs2 -> codepage conversionH. Peter Anvin2009-01-251-3/+25
| | | | | | | | | | Reorganize the codepage handling to make it easier to do ucs2 -> codepage conversion, this will be used for a future directory lister.
* | COMBOOT API: Add calls for directory functions; Implement for FATGene Cumm2009-02-091-1/+323
|/ | | | | | | | | | | | | | COMBOOT API: Add calls for directory functions; Implement most only for FAT (SYSLINUX). Uses INT 22h AX= 001Fh, 0020h, 0021h and 0022h to prepare for the COM32 C functions getcwd(), opendir(), readdir(), and closedir(), respectively. INT22h, AX=001Fh will return a valid value for all variants. INT22h, AX= 0020h, 0021h, and 0022h are only implemented for SYSLINUX while other variants will call comapi_err for these 3. Signed-off-by: Gene Cumm <gene.cumm@gmail.com> Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* ldlinux: CurrentDir not set if syslinux.cfg is missingSebastian Herbszt2008-07-091-0/+2
| | | | | | | | | | | | | | | If a syslinux floppy does not contain a config file (syslinux.cfg) modules are not being found unless specified with a directory prefix (e.g. /pcitest.c32). The reason is that CurrentDir is only set if there is a config file present. This is a possible regression since commit 68eefb79e2cbb590ebf958dd0c50ce00b941abd2. Before this change RootDir was used in searchdir and now it's CurrentDir unless the filename starts with '/'. Possible fix is to set CurrentDir to RootDir if no config file is found. Actually it seems better to move this to the top of the "check for config file" block. Initialize CurrentDir to RootDir and change it if a config file is found. - Sebastian
* Centralize more of the version number machineryH. Peter Anvin2008-07-071-1/+1
| | | | Centralize more (most) of the version number machinery to version.pl.
* Drop macros that just point to other macrosH. Peter Anvin2008-07-071-1/+1
| | | | | Drop macros for "date" and "version_str", which are nothing but redefined names of macros we already define (DATE_STR and VERSION).
* Allow the initrd to be specified on a separate linesyslinux-3.71-pre4H. Peter Anvin2008-07-031-7/+0
| | | | | Allow the initrd to be specified on a separate line from command-line options (append). This apparently can help certain tools.
* ldlinux: handle "first byte E5 change to 05" rule in FATH. Peter Anvin2008-06-251-1/+5
| | | | | | | | | | | | | | FAT has a somewhat obnoxious rule: byte E5 in the first position is encoded as 05. If it was *always* that case we could simply fold it into the codepage tables, but that rule applies only to the first character. Note that in the common codepages (incl. 437), E5 is lower-case sigma (σ), which we currently upper case to upper case sigma (Σ, E4) preventing a match -- which DOS *doesn't* do (it thinks of the Greek characters as symbols, not subject to case distinctions.) Putting that special case in the codepage-generation scripts seems too ugly, though.
* writestr_early: save/restore registersH. Peter Anvin2008-06-151-1/+3
| | | | | We have made it this far without it, but it seems like a disaster waiting to happen. We can afford the extra four bytes in sector 1.
* Mechanically rename the writestr functionsH. Peter Anvin2008-06-151-7/+7
| | | | | | | | | | Mechanically rename the writestr functions: writestr -> writestr_early cwritestr -> writestr ... to reflect which function is more appropriate to call in normal circumstances.
* When erroring out on an DOS interrupt, print infoH. Peter Anvin2008-06-101-1/+2
| | | | | Print the interrupt number, AX, and CS:IP of the offending system call.
* ldlinux: search_dos_dir returns attributes in DLsyslinux-3.70-pre15H. Peter Anvin2008-06-101-4/+3
| | | | | search_dos_dir returns attributes in DL, so we shouldn't push/pop DX around this function!
* Whitespace cleanupH. Peter Anvin2008-06-091-1/+1
|
* FAT: make all codepage data derived from the same placeH. Peter Anvin2008-06-091-38/+30
| | | | | Make the codepage data all derive from the Unicode tables, and create files that could be dynamically loaded in the future.
* FAT: Support VFAT long filenamessyslinux-3.70-pre13H. Peter Anvin2008-06-061-5/+157
| | | | | | | Initial support for VFAT long filenames; currently hard-coded to codepage 865, no support for other codepages or for accessing files with names which aren't in the current codepage. This hopefully shouldn't be an issue for SYSLINUX applications.
* Move files out of root into core, dos, and utilsH. Peter Anvin2008-05-291-0/+1605
Move source files out of the root directory; the root is a mess and has become virtually unmaintainable. The Syslinux core now lives in core/; the Linux and generic utilities has moved into utils/, and copybs.com has moved into dos/; it had to go somewhere, and it seemed as good a place as any.