Changeset dcbc8be in mainline for arch/ia32/_link.ld


Ignore:
Timestamp:
2005-06-02T23:56:26Z (20 years ago)
Author:
Jakub Jermar <jakub@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
ac5d02b
Parents:
7dcbc0a1
Message:

Big changes in IA-32 address space map.
Now the kernel is mapped above 0x80000000. Finally!
Userspace address space starts at 0x00000000.
Changes in many places.
This improvement temporarily breaks SMP and most likely also other stuff.
Supported size of memory is now only 4M as it is the biggest size that can be mapped at once on IA-32.

Changes in linker script.
Changes required because of the above.
Do not patch hardcoded_* variables but assign to them instead.

Cosmetic changes here and there.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • arch/ia32/_link.ld

    r7dcbc0a1 rdcbc8be  
    11/** IA-32 linker script
    22 * 
    3  *  kernel text
    4  *  kernel data
    5  * 
     3 * umapped section:
     4 *      kernel text
     5 *      kernel data
     6 * mapped section:
     7 *      kernel text
     8 *      kernel data
    69 */
    710
     
    1013
    1114SECTIONS {
    12     .image 0x8000: AT (0x8000) {
     15    .unmapped 0x8000: AT (0x8000) {
     16        unmapped_ktext_start = .;
     17        *(K_TEXT_START);
     18        unmapped_ktext_end = .;
     19        unmapped_kdata_start = .;
     20        *(K_DATA_START);
     21        unmapped_kdata_end = .;
     22    }
     23   
     24    .mapped (0x80000000+SIZEOF(.unmapped)+0x8000) : AT (0x8000+SIZEOF(.unmapped)) {
    1325        ktext_start = .;
    14         *(K_TEXT_START);
    15         delta_start = .;
    16         *(K_DATA_START);
    17         delta_end = .;                 
    1826        *(.text);
    1927        ktext_end = .;
     
    2836    }
    2937
    30     . = ABSOLUTE(hardcoded_ktext_size);
    31     .patch_1 : {
    32         LONG(ktext_end - ktext_start - (delta_end - delta_start));
    33     }
    34 
    35     . = ABSOLUTE(hardcoded_kdata_size);
    36     .patch_2 : {
    37         LONG(kdata_end - kdata_start + (delta_end - delta_start));
    38     }
    39 
    40     . = ABSOLUTE(hardcoded_load_address);
    41     .patch_3 : {
    42         LONG(0x8000);
    43     }
     38    _hardcoded_ktext_size = ktext_end - ktext_start + (unmapped_ktext_end - unmapped_ktext_start);
     39    _hardcoded_kdata_size = kdata_end - kdata_start + (unmapped_kdata_end - unmapped_kdata_start);
     40    _hardcoded_load_address = 0x80008000;
    4441
    4542}
Note: See TracChangeset for help on using the changeset viewer.