Changeset 398e7688 in mainline


Ignore:
Timestamp:
2006-09-29T18:01:54Z (18 years ago)
Author:
Jakub Jermar <jakub@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
34bd143
Parents:
c23baab
Message:

Small improvements in sparc64.

Files:
3 edited

Legend:

Unmodified
Added
Removed
  • boot/arch/sparc64/loader/boot.S

    rc23baab r398e7688  
    5959         * Disable interrupts and disable address masking.
    6060         */
    61         rdpr %pstate, %g2
    62         and %g2, ~(PSTATE_IE_BIT|PSTATE_AM_BIT), %g2
    63         wrpr %g2, 0, %pstate
     61        wrpr %g0, PSTATE_PRIV_BIT, %pstate
    6462
    65         set initial_stack_top, %g3
    66         add %g3, -STACK_BIAS, %sp
     63        set initial_stack_top, %sp
     64        add %sp, -STACK_BIAS, %sp
    6765
    6866        set ofw_cif, %l0
  • boot/arch/sparc64/loader/register.h

    rc23baab r398e7688  
    3131
    3232#define PSTATE_IE_BIT   2
     33#define PSTATE_PRIV_BIT 4
    3334#define PSTATE_AM_BIT   8
    3435
  • kernel/arch/sparc64/src/start.S

    rc23baab r398e7688  
    7777
    7878        /*
    79          * Copy the bootinfo structure passed from the boot loader
    80          * to the kernel bootinfo structure.
    81          */
    82         brz %l7, 0f                             ! skip if you are not the bootstrap CPU
    83         nop
    84        
    85         sethi %hi(bootinfo), %o0
    86         call memcpy
    87         or %o0, %lo(bootinfo), %o0
    88 0:
    89 
    90         /*
    9179         * Switch to kernel trap table.
    9280         */
     
    210198        flush %g5
    211199
    212         ! switch to context 0
    213         stxa %g0, [VA_PRIMARY_CONTEXT_REG] %asi ! ASI_DMMU is correct here !!!
    214         flush %g5
    215 
    216         ! ensure nucleus mapping
     200        ! enter nucleus - using context 0
    217201        wrpr %g0, 1, %tl
    218 
    219         ! set context 1 in the primary context register
    220         mov MEM_CONTEXT_TEMP, %g1
    221         stxa %g1, [VA_PRIMARY_CONTEXT_REG] %asi ! ASI_DMMU is correct here !!!
    222         flush %g5
    223202
    224203        ! demap context 1
     
    231210        flush %g5
    232211       
    233         ! set TL back to 0
     212        ! leave nucleus - using primary context, i.e. context 0
    234213        wrpr %g0, 0, %tl
    235214
    236215        brz %l7, 1f                             ! skip if you are not the bootstrap CPU
    237216        nop
     217
     218        sethi %hi(bootinfo), %o0
     219        call memcpy                             ! copy bootinfo
     220        or %o0, %lo(bootinfo), %o0
    238221
    239222        call arch_pre_main
     
    272255        nop
    273256
    274 
    275257        /*
    276258         * Configure stack for the AP.
Note: See TracChangeset for help on using the changeset viewer.