Changeset 0e4dd7b in mainline


Ignore:
Timestamp:
2006-02-17T16:49:52Z (19 years ago)
Author:
Jakub Jermar <jakub@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
c1e43e4
Parents:
37c8975
Message:

sparc64 work.
Relocate kernel to 4M.

Location:
arch/sparc64
Files:
1 added
3 edited

Legend:

Unmodified
Added
Removed
  • arch/sparc64/_link.ld.in

    r37c8975 r0e4dd7b  
    88
    99#define __ASM__
     10#include <arch/boot/boot.h>
    1011
    1112ENTRY(kernel_image_start)
    1213
    1314SECTIONS {
    14         .image 0x4000: AT (0x4000) {
     15        .image VMA: AT (LMA) {
    1516                ktext_start = .;
    1617                *(K_TEXT_START)
     
    3132                QUAD(kdata_end - kdata_start);
    3233                hardcoded_load_address = .;
    33                 QUAD(0x4000);
     34                QUAD(VMA);
    3435                *(.bss);                /* uninitialized static variables */   
    3536                *(COMMON);              /* global variables */
  • arch/sparc64/src/mm/tlb.c

    r37c8975 r0e4dd7b  
    6363       
    6464        /*
    65          * For simplicity, we do identity mapping of first 4M of memory.
    66          * The very next change should be leaving the first 4M unmapped.
     65         * We do identity mapping of 4M-page at 4M.
    6766         */
    6867        tag.value = 0;
  • arch/sparc64/src/start.S

    r37c8975 r0e4dd7b  
    2727#
    2828
     29#include <arch/boot/boot.h>
     30
    2931.register %g2, #scratch
    3032.register %g3, #scratch
     
    5153
    52541:
     55        flushw                          ! flush all but the active register window
     56
     57        /*
     58         * Prepare to copy the kernel image to 4M.
     59         */
     60
     61        set LMA, %g1                    ! source address
     62        set VMA, %g2                    ! destination address (VMA)
     63        set hardcoded_ktext_size, %g3   ! link address of hardcoded_ktext_size
     64        set hardcoded_kdata_size, %g4   ! link address of hardcoded_kdata_size
     65
     66        sub %g3, %g2, %g3               ! offset of hardcoded_ktext_size from the beginning of the load address
     67        sub %g4, %g2, %g4               ! offset of hardcoded_kdata_size from the beginning of the load address
     68       
     69        ldx [%g3 + %g1], %g3            ! hardcoded_ktext_size -> %g3
     70        ldx [%g4 + %g1], %g4            ! hardcoded_kdata_size -> %g4
     71
     72        add %g3, %g4, %g3               ! size of kernel text and data
     73
     74        /*
     75         * Start copying the kernel from higher addresses towards lower addresses.
     76         */
     77
     782:      dec %g3
     79        ldub [%g1 + %g3], %g4
     80        stb %g4, [%g2 + %g3]
     81        cmp %g3, 0
     82        bnz 2b
     83        nop
     84
     85        set relocated, %g1
     86        jmp %g1
     87        nop
     88
     89relocated:
    5390        set ofw, %l0
    5491
Note: See TracChangeset for help on using the changeset viewer.