Changeset 84060e2 in mainline for kernel/arch/sparc64/src/start.S


Ignore:
Timestamp:
2006-10-09T19:29:42Z (18 years ago)
Author:
Jakub Jermar <jakub@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
8ce8499
Parents:
e4398200
Message:

sparc64 work:

  • hw_map() can now support up to 8M requests
  • CPU stacks are now locked in DTLB of the respective processor
  • kernel in the boot phase no longer relies on the stack provided by OpenFirmware
  • instead of of doing FLUSHW during kernel startup, simply set the window state registers to the wanted state
  • NWINDOW → NWINDOWS
  • Add/fix some comments and copyrights.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • kernel/arch/sparc64/src/start.S

    re4398200 r84060e2  
    3030#include <arch/regdef.h>
    3131#include <arch/boot/boot.h>
     32#include <arch/stack.h>
    3233
    3334#include <arch/mm/mmu.h>
     
    5758 * - TLBs are on
    5859 * - identity mapping for the kernel image
    59  * - identity mapping for memory stack
    6060 */
    6161
     
    6868         */
    6969
    70         flushw                                  ! flush all but the active register window
     70        wrpr %g0, NWINDOWS - 2, %cansave                ! set maximum saveable windows
     71        wrpr %g0, 0, %canrestore                ! get rid of windows we will never need again
     72        wrpr %g0, 0, %otherwin                  ! make sure the window state is consistent
     73        wrpr %g0, NWINDOWS - 1, %cleanwin       ! prevent needless clean_window traps for kernel
    7174
    7275        wrpr %g0, 0, %tl                        ! TL = 0, primary context register is used
     
    216219        nop
    217220
     221        /*
     222         * So far, we have not touched the stack.
     223         * It is a good idead to set the kernel stack to a known state now.
     224         */
     225        sethi %hi(temporary_boot_stack), %sp
     226        or %sp, %lo(temporary_boot_stack), %sp
     227        sub %sp, STACK_BIAS, %sp
     228
    218229        sethi %hi(bootinfo), %o0
    219230        call memcpy                             ! copy bootinfo
     
    273284        ba 0b
    274285        nop
     286
     287
     288.section K_DATA_START, "aw", @progbits
     289
     290/*
     291 * Create small stack to be used by the bootstrap processor.
     292 * It is going to be used only for a very limited period of
     293 * time, but we switch to it anyway, just to be sure we are
     294 * properly initialized.
     295 *
     296 * What is important is that this piece of memory is covered
     297 * by the 4M DTLB locked entry and therefore there will be
     298 * no surprises like deadly combinations of spill trap and
     299 * and TLB miss on the stack address.
     300 */
     301
     302#define INITIAL_STACK_SIZE      1024
     303
     304.align STACK_ALIGNMENT
     305.space INITIAL_STACK_SIZE
     306.align STACK_ALIGNMENT
     307temporary_boot_stack:
     308.space STACK_WINDOW_SAVE_AREA_SIZE
Note: See TracChangeset for help on using the changeset viewer.