diff options
Diffstat (limited to 'cpukit/score/cpu/microblaze/microblaze-context-switch.S')
-rw-r--r-- | cpukit/score/cpu/microblaze/microblaze-context-switch.S | 25 |
1 files changed, 22 insertions, 3 deletions
diff --git a/cpukit/score/cpu/microblaze/microblaze-context-switch.S b/cpukit/score/cpu/microblaze/microblaze-context-switch.S index e2ec760080..523e836398 100644 --- a/cpukit/score/cpu/microblaze/microblaze-context-switch.S +++ b/cpukit/score/cpu/microblaze/microblaze-context-switch.S @@ -1,5 +1,16 @@ +/* SPDX-License-Identifier: BSD-2-Clause */ + +/** + * @file + * + * @ingroup RTEMSScoreCPUMicroBlaze + * + * @brief MicroBlaze context switch implementation + */ + /* - * Copyright (c) 2015, Hesham Almatary + * Copyright (c) 2015, Hesham Almatary + * Copyright (C) 2021 On-Line Applications Research Corporation (OAR) * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -7,8 +18,8 @@ * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE @@ -59,6 +70,10 @@ SYM(_CPU_Context_switch): swi r30, r5, 72 swi r31, r5, 76 + mfs r21, rmsr + swi r21, r5, 80 + + SYM(restore): lwi r1, r6, 0 lwi r13, r6, 4 @@ -79,6 +94,10 @@ SYM(restore): lwi r28, r6, 64 lwi r29, r6, 68 lwi r30, r6, 72 + + lwi r31, r6, 80 + mts rmsr, r31 + lwi r31, r6, 76 rtsd r15, 8 |