diff options
Diffstat (limited to 'gpxe/src/arch/i386/core')
-rw-r--r-- | gpxe/src/arch/i386/core/basemem_packet.c | 2 | ||||
-rw-r--r-- | gpxe/src/arch/i386/core/etherboot.prefix.lds | 100 | ||||
-rw-r--r-- | gpxe/src/arch/i386/core/pic8259.c | 2 | ||||
-rw-r--r-- | gpxe/src/arch/i386/core/prefixudata.lds | 8 | ||||
-rw-r--r-- | gpxe/src/arch/i386/core/prefixzdata.lds | 8 | ||||
-rw-r--r-- | gpxe/src/arch/i386/core/rdtsc_timer.c | 2 | ||||
-rw-r--r-- | gpxe/src/arch/i386/core/realmode.c | 23 | ||||
-rw-r--r-- | gpxe/src/arch/i386/core/relocate.c | 2 | ||||
-rw-r--r-- | gpxe/src/arch/i386/core/setjmp.S | 2 | ||||
-rw-r--r-- | gpxe/src/arch/i386/core/stack.S | 2 | ||||
-rw-r--r-- | gpxe/src/arch/i386/core/stack16.S | 2 | ||||
-rw-r--r-- | gpxe/src/arch/i386/core/start16.lds | 8 | ||||
-rw-r--r-- | gpxe/src/arch/i386/core/start16z.lds | 65 | ||||
-rw-r--r-- | gpxe/src/arch/i386/core/timer2.c | 2 | ||||
-rw-r--r-- | gpxe/src/arch/i386/core/virtaddr.S | 2 | ||||
-rw-r--r-- | gpxe/src/arch/i386/core/x86_io.c | 2 |
16 files changed, 20 insertions, 212 deletions
diff --git a/gpxe/src/arch/i386/core/basemem_packet.c b/gpxe/src/arch/i386/core/basemem_packet.c index 64e0bcc1..d487cce3 100644 --- a/gpxe/src/arch/i386/core/basemem_packet.c +++ b/gpxe/src/arch/i386/core/basemem_packet.c @@ -16,6 +16,8 @@ * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ +FILE_LICENCE ( GPL2_OR_LATER ); + /** * @file * diff --git a/gpxe/src/arch/i386/core/etherboot.prefix.lds b/gpxe/src/arch/i386/core/etherboot.prefix.lds deleted file mode 100644 index 3550a2a3..00000000 --- a/gpxe/src/arch/i386/core/etherboot.prefix.lds +++ /dev/null @@ -1,100 +0,0 @@ -OUTPUT_FORMAT("elf32-i386", "elf32-i386", "elf32-i386") -OUTPUT_ARCH(i386) - -ENTRY(_prefix_start) -SECTIONS { - /* Prefix */ - .prefix : { - _verbatim_start = . ; - _prefix_start = . ; - *(.prefix) - . = ALIGN(16); - _prefix_end = . ; - } = 0x9090 - _prefix_size = _prefix_end - _prefix_start; - - .text.nocompress : { - *(.prefix.udata) - } = 0x9090 - - decompress_to = . ; - .prefix.zdata : { - _compressed = . ; - *(.prefix.zdata) - _compressed_end = . ; - } - _compressed_size = _compressed_end - _compressed; - - . = ALIGN(16); - _verbatim_end = . ; - - - /* Size of the core of etherboot in memory */ - _base_size = _end - _text; - - /* _prefix_size is the length of the non-core etherboot prefix */ - _prefix_size = _prefix_end - _prefix_start; - - /* _verbatim_size is the actual amount that has to be copied to base memory */ - _verbatim_size = _verbatim_end - _verbatim_start; - - /* _image_size is the amount of base memory needed to run */ - _image_size = _base_size + _prefix_size; - - /* Standard sizes rounded up to paragraphs */ - _prefix_size_pgh = (_prefix_size + 15) / 16; - _verbatim_size_pgh = (_verbatim_size + 15) / 16; - _image_size_pgh = (_image_size + 15) / 16 ; - - /* Standard sizes in sectors */ - _prefix_size_sct = (_prefix_size + 511) / 512; - _verbatim_size_sct = (_verbatim_size + 511) / 512; - _image_size_sct = (_image_size + 511) / 512; - - /* Symbol offsets and sizes for the exe prefix */ - _exe_hdr_size = 32; - _exe_size = _verbatim_size; /* Should this be - 32 to exclude the header? */ - _exe_size_tail = (_exe_size) % 512; - _exe_size_pages = ((_exe_size) + 511) / 512; - _exe_bss_size = ((_image_size - _verbatim_size) + 15) / 16; - _exe_ss_offset = (_stack_offset + _prefix_size - _exe_hdr_size + 15) / 16 ; - - /* This is where we copy the compressed image before decompression. - * Prepare to decompress in place. The end mark is about 8.25 bytes long, - * and the worst case symbol is about 16.5 bytes long. Therefore - * We need to reserve at least 25 bytes of slack here. - * Currently I reserve 2048 bytes of just slack to be safe :) - * 2048 bytes easily falls within the BSS (the defualt stack is 4096 bytes) - * so we really are decompressing in place. - * - * Hmm. I missed a trick. In the very worst case (no compression) - * the encoded data is 9/8 the size as it started out so to be completely - * safe I need to be 1/8 of the uncompressed code size past the end. - * This will still fit compfortably into our bss in any conceivable scenario. - */ - _compressed_copy = _edata + _prefix_size - _compressed_size + - /* The amount to overflow _edata */ - MAX( ((_edata - _text + 7) / 8) , 2016 ) + 32; - _assert = ASSERT( ( _compressed_copy - _prefix_size ) < _ebss , "Cannot decompress in place" ) ; - - decompress = DEFINED(decompress) ? decompress : 0; - /DISCARD/ : { - *(.comment) - *(.note) - } - - /* Symbols used by the prefixes whose addresses are inconvinient - * to compute, at runtime in the code. - */ - image_basemem_size = DEFINED(image_basemem_size)? image_basemem_size : 65536; - image_basemem = DEFINED(image_basemem)? image_basemem : 65536; - _prefix_real_to_prot = _real_to_prot + _prefix_size ; - _prefix_prot_to_real = _prot_to_real + _prefix_size ; - _prefix_image_basemem_size = image_basemem_size + _prefix_size ; - _prefix_image_basemem = image_basemem + _prefix_size ; - _prefix_rm_in_call = _rm_in_call + _prefix_size ; - _prefix_in_call = _in_call + _prefix_size ; - _prefix_rom = rom + _prefix_size ; - _prefix_rm_etherboot_location = rm_etherboot_location + _prefix_size ; - _prefix_stack_end = _stack_end + _prefix_size ; -} diff --git a/gpxe/src/arch/i386/core/pic8259.c b/gpxe/src/arch/i386/core/pic8259.c index 8a0433dd..1e2d23c5 100644 --- a/gpxe/src/arch/i386/core/pic8259.c +++ b/gpxe/src/arch/i386/core/pic8259.c @@ -16,6 +16,8 @@ * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ +FILE_LICENCE ( GPL2_OR_LATER ); + #include <gpxe/io.h> #include <pic8259.h> diff --git a/gpxe/src/arch/i386/core/prefixudata.lds b/gpxe/src/arch/i386/core/prefixudata.lds deleted file mode 100644 index 1c76128e..00000000 --- a/gpxe/src/arch/i386/core/prefixudata.lds +++ /dev/null @@ -1,8 +0,0 @@ -OUTPUT_FORMAT("elf32-i386", "elf32-i386", "elf32-i386") -OUTPUT_ARCH(i386) - -SECTIONS { - .prefix.udata : { - *(*) - } -} diff --git a/gpxe/src/arch/i386/core/prefixzdata.lds b/gpxe/src/arch/i386/core/prefixzdata.lds deleted file mode 100644 index bf6ea977..00000000 --- a/gpxe/src/arch/i386/core/prefixzdata.lds +++ /dev/null @@ -1,8 +0,0 @@ -OUTPUT_FORMAT("elf32-i386", "elf32-i386", "elf32-i386") -OUTPUT_ARCH(i386) - -SECTIONS { - .prefix.zdata : { - *(*) - } -} diff --git a/gpxe/src/arch/i386/core/rdtsc_timer.c b/gpxe/src/arch/i386/core/rdtsc_timer.c index 443c8ada..76679173 100644 --- a/gpxe/src/arch/i386/core/rdtsc_timer.c +++ b/gpxe/src/arch/i386/core/rdtsc_timer.c @@ -16,6 +16,8 @@ * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ +FILE_LICENCE ( GPL2_OR_LATER ); + /** @file * * RDTSC timer diff --git a/gpxe/src/arch/i386/core/realmode.c b/gpxe/src/arch/i386/core/realmode.c deleted file mode 100644 index 9a77bd8a..00000000 --- a/gpxe/src/arch/i386/core/realmode.c +++ /dev/null @@ -1,23 +0,0 @@ -/* Real-mode interface: C portions. - * - * Initial version by Michael Brown <mbrown@fensystems.co.uk>, January 2004. - */ - -#include "realmode.h" - -/* - * Copy data to/from base memory. - * - */ - -#ifdef KEEP_IT_REAL - -void memcpy_to_real ( segoff_t dest, void *src, size_t n ) { - -} - -void memcpy_from_real ( void *dest, segoff_t src, size_t n ) { - -} - -#endif /* KEEP_IT_REAL */ diff --git a/gpxe/src/arch/i386/core/relocate.c b/gpxe/src/arch/i386/core/relocate.c index bdc8498e..44e764fe 100644 --- a/gpxe/src/arch/i386/core/relocate.c +++ b/gpxe/src/arch/i386/core/relocate.c @@ -9,6 +9,8 @@ * */ +FILE_LICENCE ( GPL2_OR_LATER ); + /* * The linker passes in the symbol _max_align, which is the alignment * that we must preserve, in bytes. diff --git a/gpxe/src/arch/i386/core/setjmp.S b/gpxe/src/arch/i386/core/setjmp.S index 59a1b7cb..03727148 100644 --- a/gpxe/src/arch/i386/core/setjmp.S +++ b/gpxe/src/arch/i386/core/setjmp.S @@ -1,5 +1,7 @@ /* setjmp and longjmp. Use of these functions is deprecated. */ +FILE_LICENCE ( GPL2_OR_LATER ) + .text .arch i386 .code32 diff --git a/gpxe/src/arch/i386/core/stack.S b/gpxe/src/arch/i386/core/stack.S index da66d239..737ec0ee 100644 --- a/gpxe/src/arch/i386/core/stack.S +++ b/gpxe/src/arch/i386/core/stack.S @@ -1,3 +1,5 @@ +FILE_LICENCE ( GPL2_OR_LATER ) + .arch i386 /**************************************************************************** diff --git a/gpxe/src/arch/i386/core/stack16.S b/gpxe/src/arch/i386/core/stack16.S index d1251f06..523f0288 100644 --- a/gpxe/src/arch/i386/core/stack16.S +++ b/gpxe/src/arch/i386/core/stack16.S @@ -1,3 +1,5 @@ +FILE_LICENCE ( GPL2_OR_LATER ) + .arch i386 /**************************************************************************** diff --git a/gpxe/src/arch/i386/core/start16.lds b/gpxe/src/arch/i386/core/start16.lds deleted file mode 100644 index 544fc78f..00000000 --- a/gpxe/src/arch/i386/core/start16.lds +++ /dev/null @@ -1,8 +0,0 @@ -/* When linking with an uncompressed image, these symbols are not - * defined so we provide them here. - */ - -__decompressor_uncompressed = 0 ; -__decompressor__start = 0 ; - -INCLUDE arch/i386/core/start16z.lds diff --git a/gpxe/src/arch/i386/core/start16z.lds b/gpxe/src/arch/i386/core/start16z.lds deleted file mode 100644 index 711bcf7b..00000000 --- a/gpxe/src/arch/i386/core/start16z.lds +++ /dev/null @@ -1,65 +0,0 @@ -OUTPUT_FORMAT("elf32-i386", "elf32-i386", "elf32-i386") -OUTPUT_ARCH(i386) - -/* Linker-generated symbols are prefixed with a double underscore. - * Decompressor symbols are prefixed with __decompressor_. All other - * symbols are the same as in the original object file, i.e. the - * runtime addresses. - */ - -ENTRY(_start16) - -SECTIONS { - .text : { - *(.text) - } - .payload : { - __payload_start = .; - *(.data) - __payload_end = .; - } - - /* _payload_size is the size of the binary image appended to - * start16, in bytes. - */ - __payload_size = __payload_end - __payload_start ; - - /* _size is the size of the runtime image - * (start32 + the C code), in bytes. - */ - __size = _end - _start ; - - /* _decompressor_size is the size of the decompressor, in - * bytes. For a non-compressed image, start16.lds sets - * _decompressor_uncompressed = _decompressor__start = 0. - */ - __decompressor_size = __decompressor_uncompressed - __decompressor__start ; - - /* image__size is the total size of the image, after - * decompression and including the decompressor if applicable. - * It is therefore the amount of memory that start16's payload - * needs in order to execute, in bytes. - */ - __image_size = __size + __decompressor_size ; - - /* Amount to add to runtime symbols to obtain the offset of - * that symbol within the image. - */ - __offset_adjust = __decompressor_size - _start ; - - /* Calculations for the stack - */ - __stack_size = _estack - _stack ; - __offset_stack = _stack + __offset_adjust ; - - /* Some symbols will be larger than 16 bits but guaranteed to - * be multiples of 16. We calculate them in paragraphs and - * export these symbols which can be used in 16-bit code - * without risk of overflow. - */ - __image_size_pgh = ( __image_size / 16 ); - __start_pgh = ( _start / 16 ); - __decompressor_size_pgh = ( __decompressor_size / 16 ); - __offset_stack_pgh = ( __offset_stack / 16 ); -} - diff --git a/gpxe/src/arch/i386/core/timer2.c b/gpxe/src/arch/i386/core/timer2.c index bb589ecc..6e76b2eb 100644 --- a/gpxe/src/arch/i386/core/timer2.c +++ b/gpxe/src/arch/i386/core/timer2.c @@ -11,6 +11,8 @@ * your option) any later version. */ +FILE_LICENCE ( GPL2_OR_LATER ); + #include <stddef.h> #include <gpxe/timer2.h> #include <gpxe/io.h> diff --git a/gpxe/src/arch/i386/core/virtaddr.S b/gpxe/src/arch/i386/core/virtaddr.S index cf6da4f6..aae1e1ed 100644 --- a/gpxe/src/arch/i386/core/virtaddr.S +++ b/gpxe/src/arch/i386/core/virtaddr.S @@ -4,6 +4,8 @@ * */ +FILE_LICENCE ( GPL2_OR_LATER ) + #include "librm.h" .arch i386 diff --git a/gpxe/src/arch/i386/core/x86_io.c b/gpxe/src/arch/i386/core/x86_io.c index 424a96cc..d2c363b9 100644 --- a/gpxe/src/arch/i386/core/x86_io.c +++ b/gpxe/src/arch/i386/core/x86_io.c @@ -16,6 +16,8 @@ * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ +FILE_LICENCE ( GPL2_OR_LATER ); + #include <gpxe/io.h> #include <gpxe/x86_io.h> |