summaryrefslogtreecommitdiff
path: root/core/layout.inc
Commit message (Collapse)AuthorAgeFilesLines
* Merge branch 'lwip' into elflinkMatt Fleming2013-02-261-0/+1
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Welcome to Syslinux 5.10. Conflicts: NEWS com32/lib/Makefile com32/lib/sys/open.c com32/lib/syslinux/ipappend.c com32/modules/Makefile com32/modules/prdhcp.c core/Makefile core/cmdline.inc core/com32.inc core/comboot.inc core/configinit.inc core/fs/chdir.c core/fs/fs.c core/fs/pxe/dnsresolv.c core/fs/pxe/pxe.c core/fs/pxe/pxe.h core/idle.c core/include/ctype.h core/init.inc core/mem/init.c core/parseconfig.inc core/runkernel.inc core/syslinux.ld core/ui.inc doc/comboot.txt version
| * core: layout.inc: remove duplicate .stack segment definitionH. Peter Anvin2011-04-251-3/+0
| | | | | | | | | | | | | | .stack was redefined for unknown reasons. This is not present in the master branch. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
| * core: add .stack16 to layout.incH. Peter Anvin2011-04-091-0/+1
| | | | | | | | | | | | | | It seems to get the right flags by default, but since .stack needed it we might as well put in .stack16 too... Signed-off-by: H. Peter Anvin <hpa@zytor.com>
| * core: add .stack to layout.inc so it gets the proper flagsH. Peter Anvin2011-04-091-0/+3
| | | | | | | | | | | | | | Add the .stack segment to layout.inc even as just a dummy, so that we end up with the correct flags in the output. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* | Symbol export whitelistMatt Fleming2012-12-051-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Before modules were dynamically loaded the boundary between GPL and non-GPL code was implicit because of the separate link domains for each module. With dynamic modules we need an explicit whitelist of core symbols that non-GPL code can link against at runtime without needing to be re-licensed under the GPL. Mark such symbols with __export, so that it is explicitly clear which symbols in the core can be linked against by non-GPL code. Reduce the visibility of symbols in both the core and ldlinux.c32 with -fvisibility=hidden. __export changes the visibility to 'default'. Signed-off-by: Matt Fleming <matt.fleming@intel.com>
* | Reduce the number of global variablesMatt Fleming2012-12-051-1/+0
| | | | | | | | | | | | | | | | | | | | In preparation for strictly limiting the list of variables that are exported (global) in the core, delete any unused variables, rewrite variable declarations in C that are not referenced by asm and delete files that are no longer included in other asm files. Cc: H. Peter Anvin <hpa@zytor.com> Signed-off-by: Matt Fleming <matt.fleming@intel.com>
* | pxe: move hardwired DHCP options into high memoryH. Peter Anvin2012-05-291-0/+2
| | | | | | | | | | | | | | If we have hardwired DHCP options, move them into high memory instead of into the trackbuf. This eliminates yet another trackbuf user. Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
* | core: Delete the aux segmentMatt Fleming2012-03-231-15/+0
|/ | | | | | | | | | | | | | | | | | | We don't need to use a special aux segment because we can represent 'fontbuf' with OFFS() and SEG(). We're guaranteed to be able to break the 32-bit pointer up with these macros because we control where in the address space the core is loaded. (Not all 32-bit pointers can be represented with OFFS() and SEG(), only addresses in the range 0..0xFFFFF.) This fixes the breakage that was introduced in commit 14531c47bc95 ("core: Delete code that is duplicated in ldlinux"). This allows the default font to be displayed. Previously junk was being returned in the COMBOOT API call to query the userfont, leading the caller to believe that a user font was installed even when it wasn't. Signed-off-by: Matt Fleming <matt.fleming@intel.com>
* core: use assembly for the .stack sectionH. Peter Anvin2010-03-061-2/+11
| | | | | | | Use assembly to define the .stack section, so that it get proper attributes. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* core: use better malloc; add low memory malloc; fix com32 exitH. Peter Anvin2010-02-231-1/+6
| | | | | | | | | | | | | Use a better malloc for the core. In particular, use the same core that we should eventually be able to use for the entire system in Syslinux 5 -- with module awareness, etc. This code can also accommodate multiple heaps. Set up a separate heap for lowmem; the intent is to use explicit lowmem allocations instead of the static bounce buffer. The lowmem allocation is also exported via the pmapi mechanism, so modules can safely allocate lowmem. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* core: let xfer_buf_seg, real_mode_seg be assigned by the linkerH. Peter Anvin2010-02-211-8/+17
| | | | | | Use the linker to assign xfer_bug_seg and real_mode_seg. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* fs: move the disk cache into high memoryH. Peter Anvin2010-02-161-12/+4
| | | | | | Move the disk cache out of the DOS memory area. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* core: separate bcopyxx code and data; use linker-generated symbolsH. Peter Anvin2010-02-151-2/+4
| | | | | | | | Separate out bcopyxx code and data, and use linker-generated barrier symbols instead of inline label hacks. This makes it possible to link code into the bcopyxx area if need be. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* Merge branch 'master' into pathbasedsyslinux-4.00-pre20H. Peter Anvin2010-02-141-1/+19
|\ | | | | | | | | | | | | | | | | | | Resolved Conflicts: com32/Makefile com32/include/syslinux/pxe.h core/pxelinux.asm core/syslinux.ld Signed-off-by: H. Peter Anvin <hpa@zytor.com>
| * core: document the stack location, use STACK_TOP throughoutH. Peter Anvin2010-02-121-1/+9
| | | | | | | | | | | | | | | | | | The global absolute symbol STACK_TOP defined in layout.inc can be used by the linker script as well as by anything else that needs to know where the stack is. Also document why we do it differently for PXELINUX. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
| * pxelinux: move the stack to avoid AMI BIOS bugH. Peter Anvin2010-02-121-0/+10
| | | | | | | | | | | | | | | | | | | | | | | | There is apparently some AMI BIOSes which leave a BEV stack just below 7c00h, which means that they can't return from the PXE NBP. Thus, for PXELINUX, move the stack down a few kilobytes. This particularly refers to the "rouilj/ops12" system my private sysdump archive. Reported-and-tested-by: John Rouillard <rouilj@renesys.com> Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* | core: move the generated IDT stubs to a separate .gentext16 sectionH. Peter Anvin2009-09-021-0/+1
| | | | | | | | | | | | | | | | Move the generated IDT stubs to a separate section, .gentext16, so that they aren't immediately adjacent to a piece of highly mutable data. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* | removes the %if IS_ISOLINUX stuff in the layout.incLiu Aleaxander2009-06-231-5/+0
| | | | | | | | | | removes the %if IS_ISOLINUX stuff in the layout.inc to make the fs.c can find the core_cache_buf symbol from ISOLINUX.
* | core: move xfer_buf_seg to segment 3, and add a collision assertH. Peter Anvin2009-06-021-4/+4
| | | | | | | | | | | | | | | | | | | | Move the xfer_buf_seg to segment 3 (0x30000) for now; this is more generous than I hope we will use but makes development easier. Add an assert to the linker script that the .auxseg/.lowmem segments don't collide with xfer_buf_seg. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* | core: handle section aliases in ld script; increase STACK32_LENH. Peter Anvin2009-06-021-1/+1
| | | | | | | | | | | | | | Handle aliases that gcc generates in the ld script. Increase STACK32_LEN to something a little more reasonable. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* | core: add new __lowmem macro to allocate a static lowmem bufferH. Peter Anvin2009-06-021-0/+2
| | | | | | | | | | | | | | | | | | Add a new __lowmem macro that can be applied to an uninitialized static (or global) object, which allocates it in a new .lowmem section allocated below the 1 MB boundary. Keep in mind that low memory is precious! Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* | Export the cache_seg to 32-bit code as core_cache_bufH. Peter Anvin2009-06-021-0/+2
| | | | | | | | | | | | | | Export the cache_seg to 32-bit code as core_cache_buf, so we can port the cache to 32-bit code without porting its 16-bit clients immediately. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* | prepcore: error out if the compressed image is too large to loadH. Peter Anvin2009-06-011-15/+0
| | | | | | | | | | | | | | | | Export, from each loader stage, the symbol MaxLMA which indicates to prepcore how big the image is allowed to be. Change prepcore to enforce this limit and to error out otherwise. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* | core: export a symbol for the raw address of xfer_buf_segH. Peter Anvin2009-05-311-1/+2
| | | | | | | | | | | | | | Export a symbol (core_xfer_buf) for the linear address of the xfer_bug_seg, for easier use in 32-bit code. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* | Avoid clobbering PM code when loading the kernelH. Peter Anvin2009-05-241-1/+2
| | | | | | | | | | | | | | We can't safely use 1 MB to directly load the kernel, so shift the kernel just as we do when loading low. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* | Merge branch 'master' into core32H. Peter Anvin2009-05-231-0/+4
|\ \ | |/ | | | | | | | | | | | | | | Conflicts: core/bcopy32.inc core/cleanup.inc core/conio.inc Signed-off-by: H. Peter Anvin <hpa@zytor.com>
| * core: add a proper interrupt handler for the serial consoleH. Peter Anvin2009-05-231-0/+4
| | | | | | | | | | | | | | | | | | If we enable interrupts for the serial console, add a proper interrupt handler. Since we don't know what vector we'll end up using, or if we are shared with other devices, simply hook *all* the interrupts and poll the serial port then. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* | core: LZO compress the PM part of the coreH. Peter Anvin2009-05-201-0/+16
| | | | | | | | | | | | | | | | Use LZO to compress the PM part of the core. LZO is not the best compression algorithm, but it is very fast, and the decompressor is only 447 bytes long. The LZO code is part of the LZO 2.03 library. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* | core: add .textnr to layout.incH. Peter Anvin2009-05-171-0/+1
| | | | | | | | | | | | Add .textnr to layout.inc, so it gets the proper flags. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* | core: make auxseg a piece of address space assigned by the linkerH. Peter Anvin2009-05-151-6/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | Let the linker assign a place for the auxseg using normal linking rules. Place it between the main 16-bit and 32-bit code. Eventually the fontbuf will probably move into the 32-bit bss. This also avoids the weirdly aligned real_mode_seg. In the future, expect xfer_buf_seg and real_mode_seg to merge into a single 16-bit bounce buffer and cache_seg to go away. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* | First cut of doing 32-bit C code in the coreH. Peter Anvin2009-05-141-3/+9
| | | | | | | | | | | | | | | | | | A very preliminary implementation of 32-bit C code in the core. This currently breaks ADV, because the installer assumes the ADV is the last two sectors in extlinux.sys -- need to figure out a way to deal with this hopefully without breaking the migration protocol. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* | core: rename .text, .data and .bss to .text16, .data16, .bss16unify-pmH. Peter Anvin2009-05-131-6/+6
| | | | | | | | | | | | | | | | 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-0/+2
| | | | | | | | | | | | | | | | | | | | | | 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: obsolete .bss1 and .bss2H. Peter Anvin2009-05-131-7/+2
| | | | | | | | | | | | | | | | | | Remove the obsolete .bss1 and .bss2 segments; they represent segment balancing which is no longer useful. The current balance between .earlybss, .bss and .uibss seems to be sufficient; if we need more balancing in the future then we need to start over anyway. 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/+2
|/ | | | | | | | | 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>
* core: remove vestiges of using nasm -f binsyslinux-3.80H. Peter Anvin2009-05-041-5/+1
| | | | | | | | Remove a few things that are specific to NASM's "bin" backend, which we no longer use. Newer versions of NASM print warning messages which are unnecessary. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* core: don't misalign xfer_buf_segH. Peter Anvin2009-04-131-5/+8
| | | | | | | | | | | | | xfer_buf_seg is used for bulk transfers, and we really don't want to break it up in order to avoid 64K DMA boundaries. Note: the same is true for the com32 bounce buffer, which is real_mode_seg. However, there are hard assumptions in the code that real_mode_seg is the last segment; those need to be cleaned up, or we need to verify that xfer_buf_seg can be used as the com32 bounce buffer. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* shuffler: work around KVM problem with the new shufflerH. Peter Anvin2009-04-131-1/+2
| | | | | | | | | | | | | | KVM uses V86 mode to simulate real mode. This causes problems with the new shuffler. This changes the shuffler handover to be in 16-bit protected mode instead, and requires the stub to do the actual entry to real mode. For the KVM hack to work, all segments must have: (seg.base & 0xfff0000f) == 0 && seg.limit == 0xffff As a result, we have to make sure the real-mode entry stub is paragraph-aligned, lest we violate the first criterion. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* core: move vgafontbuf out of the zero segmentH. Peter Anvin2009-04-131-0/+35
| | | | | | | | | | | 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>
* Update copyright noticesH. Peter Anvin2009-04-041-1/+2
| | | | Update copyright notices; add Intel copyright notices where appropriate.
* shuffler: first cut of a simpler shuffle routineH. Peter Anvin2009-03-311-2/+1
| | | | | | | | | | | | Impact: major restructuring New shuffler routine which runs entirely in protected mode, unlike the old one which would enter PM for the bcopy phase only. This is not only faster, but it greatly reduces the size of the shuffler "critical area". The interfaces to this new shuffler are not yet implemented, so this is a non-functional checkpoint. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* pxelinux: remove RBFG sectionH. Peter Anvin2008-06-051-6/+1
| | | | | We haven't had the RBFG section in the proper place for quite a while, and there are better options than RBFG now anyway, so just drop it.
* Move files out of root into core, dos, and utilsH. Peter Anvin2008-05-291-0/+92
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.