Changeset 0c27956 in mainline


Ignore:
Timestamp:
2018-08-02T16:25:48Z (6 years ago)
Author:
Jiří Zárevúcky <jiri.zarevucky@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
7cd7a8d
Parents:
3b10ae36
git-author:
Jiří Zárevúcky <jiri.zarevucky@…> (2018-08-02 16:24:22)
git-committer:
Jiří Zárevúcky <jiri.zarevucky@…> (2018-08-02 16:25:48)
Message:

Fix sparc64: context must save the thread pointer.

Location:
kernel/arch/sparc64
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • kernel/arch/sparc64/include/arch/context_struct.h

    r3b10ae36 r0c27956  
    4848#define CONTEXT_OFFSET_L6   0x80
    4949#define CONTEXT_OFFSET_L7   0x88
    50 #define CONTEXT_OFFSET_IPL  0x90
    51 #define CONTEXT_SIZE        0x98
     50#define CONTEXT_OFFSET_TP   0x90
     51#define CONTEXT_OFFSET_IPL  0x98
     52#define CONTEXT_SIZE        0xa0
    5253
    5354#ifndef __ASSEMBLER__
     
    7475        uint64_t l6;
    7576        uint64_t l7;
     77        uint64_t tp;  // %g7
    7678        ipl_t ipl;
    7779} context_t;
  • kernel/arch/sparc64/src/context.S

    r3b10ae36 r0c27956  
    6363        stx %l6, [%o0 + CONTEXT_OFFSET_L6]
    6464        stx %l7, [%o0 + CONTEXT_OFFSET_L7]
     65        stx %g7, [%o0 + CONTEXT_OFFSET_TP]
    6566        retl
    6667        mov 1, %o0              ! context_save_arch returns 1
     
    103104        ldx [%o0 + CONTEXT_OFFSET_L6], %l6
    104105        ldx [%o0 + CONTEXT_OFFSET_L7], %l7
     106        ldx [%o0 + CONTEXT_OFFSET_TP], %g7
    105107        retl
    106108        xor %o0, %o0, %o0       ! context_restore_arch returns 0
Note: See TracChangeset for help on using the changeset viewer.