diff options
author | Ralf Baechle <ralf@linux-mips.org> | 1997-01-07 02:33:00 +0000 |
---|---|---|
committer | <ralf@linux-mips.org> | 1997-01-07 02:33:00 +0000 |
commit | beb116954b9b7f3bb56412b2494b562f02b864b1 (patch) | |
tree | 120e997879884e1b9d93b265221b939d2ef1ade1 /arch/mips/lib/csum.S | |
parent | 908d4681a1dc3792ecafbe64265783a86c4cccb6 (diff) |
Import of Linux/MIPS 2.1.14
Diffstat (limited to 'arch/mips/lib/csum.S')
-rw-r--r-- | arch/mips/lib/csum.S | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/arch/mips/lib/csum.S b/arch/mips/lib/csum.S new file mode 100644 index 000000000..08224e86b --- /dev/null +++ b/arch/mips/lib/csum.S @@ -0,0 +1,25 @@ +#include <asm/addrspace.h> +#include <asm/asm.h> +#include <asm/regdef.h> + +/* + * Compute kernel code checksum to check kernel code against corruption + * (Ancient debugging trash ...) + */ + LEAF(csum) + LONG_L t0,cacheflush + move t8,ra + jalr t0 + li t0,KSEG1 + la t1,final + li t2,KSEG1 + or t0,t2 + or t1,t2 + move v0,zero +1: lw t2,(t0) + addiu t0,4 + bne t0,t1,1b + xor v0,t2 + jr t8 + nop + END(csum) |