From fbc421ee4cbc4d0aa269a5041cc2cdea36702ad2 Mon Sep 17 00:00:00 2001 From: Yuhao Zhou Date: Sat, 6 Apr 2019 23:50:05 +0800 Subject: [PATCH] Fix trapframe size. --- kernel/src/arch/mipsel/boot/context.S | 6 ++---- kernel/src/arch/mipsel/context.rs | 2 ++ 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/kernel/src/arch/mipsel/boot/context.S b/kernel/src/arch/mipsel/boot/context.S index 6a3975a..b3c1e72 100644 --- a/kernel/src/arch/mipsel/boot/context.S +++ b/kernel/src/arch/mipsel/boot/context.S @@ -22,8 +22,8 @@ switch_context: sw s7, 9*4(sp) sw s8, 10*4(sp) sw gp, 11*4(sp) - sw ra, 12*4(sp) - sw sp, 13*4(sp) + // sw ra, 12*4(sp) + // sw sp, 13*4(sp) la s0, _root_page_table_ptr lw AT, 0(s0) @@ -45,8 +45,6 @@ switch_context: lw s7, 9*4(sp) lw s8, 10*4(sp) lw gp, 11*4(sp) - lw ra, 12*4(sp) - lw sp, 13*4(sp) addi sp, sp, (4*14) sw zero, 0(a1) diff --git a/kernel/src/arch/mipsel/context.rs b/kernel/src/arch/mipsel/context.rs index 4d20869..035969f 100644 --- a/kernel/src/arch/mipsel/context.rs +++ b/kernel/src/arch/mipsel/context.rs @@ -4,6 +4,8 @@ use mips::registers::cp0; #[derive(Clone)] #[repr(C)] pub struct TrapFrame { + /// unused 16 bytes + pub unused: [usize; 4], /// CP0 status register pub status: cp0::status::Status, /// CP0 cause register