1 // memep-enable.S -- Turn on local memory ECC/parity checking
2 // $Id: //depot/rel/Cottonwood/Xtensa/OS/xtos/memep-enable.S#3 $
4 // Copyright (c) 2006-2010 Tensilica Inc.
6 // Permission is hereby granted, free of charge, to any person obtaining
7 // a copy of this software and associated documentation files (the
8 // "Software"), to deal in the Software without restriction, including
9 // without limitation the rights to use, copy, modify, merge, publish,
10 // distribute, sublicense, and/or sell copies of the Software, and to
11 // permit persons to whom the Software is furnished to do so, subject to
12 // the following conditions:
14 // The above copyright notice and this permission notice shall be included
15 // in all copies or substantial portions of the Software.
17 // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
18 // EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
19 // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
20 // IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
21 // CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
22 // TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
23 // SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
25 #include <xtensa/coreasm.h>
29 * void _xtos_memep_enable(int flags);
31 * Turn on local memory ECC/parity checking, for both
32 * data access and instruction fetch.
34 * For now, flags are ignored. Caller is expected to pass zero.
36 * _xtos_memep_initrams() must have already been called, if necessary,
37 * to ensure all ECC/parity bits are valid in any local instruction
38 * or data RAM. The normal reset vector sequence already takes care
39 * of initializing any local cache ECC/parity bits.
43 .global _xtos_memep_enable
47 #if XCHAL_HAVE_MEM_ECC_PARITY
49 // Local Memory ECC/Parity option initialization
51 // NOTE: We turn on exceptions on correctable errors and correct
52 // them in the memory error handler.
53 movi a2, MESR_ERRENAB | MESR_DATEXC | MESR_INSEXC
57 #endif /* XCHAL_HAVE_MEM_ECC_PARITY */
59 movi a2, 0 // successfully turned on what we could
62 .size _xtos_memep_enable, . - _xtos_memep_enable