Changeset e11ae91 in mainline for kernel/arch/sparc64/src/asm.S


Ignore:
Timestamp:
2006-08-30T11:31:25Z (18 years ago)
Author:
Jakub Jermar <jakub@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
ee454eb
Parents:
0fa6044
Message:

sparc64 work.

  • Modify before_thread_runs_arch() to store addresses of the kernel stack and

userspace window buffer, resp., to registers %g6 and %g7, resp, in the
alternate and interrupt global sets.

  • Modify after_thread_ran_arch() to sample %g7 from the alternate globals.
  • Implement trap handler for spilling register windows into userspace window buffer.
  • Implement assembly language functions to access %g6 and %g7 registers in the alternate sets.
  • Initialize the trap table so that there are now also spill_1_normal, spill_2_normal,

spill_0_other and fill_1_normal handlers. These handlers are used in different situations
and for different purposes.

File:
1 edited

Legend:

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

    r0fa6044 re11ae91  
    107107        b _memsetb
    108108        nop
     109
     110
     111.macro WRITE_ALTERNATE_REGISTER reg, bit
     112        save %sp, -STACK_WINDOW_SAVE_AREA_SIZE, %sp
     113        rdpr %pstate, %l0
     114        wrpr %l0, \bit, %pstate
     115        mov %i0, \reg
     116        wrpr %l0, 0, %pstate
     117        ret
     118        restore
     119.endm
     120
     121.macro READ_ALTERNATE_REGISTER reg, bit
     122        save %sp, -STACK_WINDOW_SAVE_AREA_SIZE, %sp
     123        rdpr %pstate, %l0
     124        wrpr %l0, \bit, %pstate
     125        mov \reg, %i0
     126        wrpr %l0, 0, %pstate
     127        ret
     128        restore
     129.endm
     130
     131.global write_to_ag_g6
     132write_to_ag_g6:
     133        WRITE_ALTERNATE_REGISTER %g6, PSTATE_AG_BIT
     134
     135.global write_to_ag_g7
     136write_to_ag_g7:
     137        WRITE_ALTERNATE_REGISTER %g7, PSTATE_AG_BIT
     138
     139.global write_to_ig_g6
     140write_to_ig_g6:
     141        WRITE_ALTERNATE_REGISTER %g6, PSTATE_IG_BIT
     142
     143.global read_from_ag_g7
     144read_from_ag_g7:
     145        READ_ALTERNATE_REGISTER %g7, PSTATE_AG_BIT
Note: See TracChangeset for help on using the changeset viewer.