2 * This file is subject to the terms and conditions of the GNU General Public
3 * License. See the file "COPYING" in the main directory of this archive
6 * Copyright (C) 2006 Cavium Networks
11 #include <asm/regdef.h>
12 #include <asm/mipsregs.h>
13 #include <asm/stackframe.h>
16 * Handle cache error. Indicate to the second level handler whether
17 * the exception is recoverable.
19 LEAF(except_vec2_octeon)
27 /* due to an errata we need to read the COP0 CacheErr (Dcache)
28 * before any cache/DRAM access */
30 rdhwr k0, $0 /* get core_id */
31 PTR_LA k1, cache_err_dcache
33 PTR_ADDU k1, k0, k1 /* k1 = &cache_err_dcache[core_id] */
35 dmfc0 k0, CP0_CACHEERR, 1
37 dmtc0 $0, CP0_CACHEERR, 1
39 /* check whether this is a nested exception */
44 j cache_parity_error_octeon_non_recoverable
47 /* exception is recoverable */
52 END(except_vec2_octeon)
54 /* We need to jump to handle_cache_err so that the previous handler
55 * can fit within 0x80 bytes. We also move from 0xFFFFFFFFAXXXXXXX
56 * space (uncached) to the 0xFFFFFFFF8XXXXXXX space (cached). */
57 LEAF(handle_cache_err)
64 jal cache_parity_error_octeon_recoverable