📄 var_regs.h
字号:
#ifndef CYGONCE_HAL_VAR_REGS_H
#define CYGONCE_HAL_VAR_REGS_H
//==========================================================================
//
// var_regs.h
//
// ColdFire MCF5484 variant CPU definitions
//
//==========================================================================
//####ECOSGPLCOPYRIGHTBEGIN####
// -------------------------------------------
// This file is part of eCos, the Embedded Configurable Operating System.
// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
// Copyright (C) 2006 eCosCentric Ltd.
//
// eCos is free software; you can redistribute it and/or modify it under
// the terms of the GNU General Public License as published by the Free
// Software Foundation; either version 2 or (at your option) any later version.
//
// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
// WARRANTY; without even the implied warranty of MERCHANTABILITY or
// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
// for more details.
//
// You should have received a copy of the GNU General Public License along
// with eCos; if not, write to the Free Software Foundation, Inc.,
// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
//
// As a special exception, if other files instantiate templates or use macros
// or inline functions from this file, or you compile this file and link it
// with other works to produce a work based on this file, this file does not
// by itself cause the resulting work to be covered by the GNU General Public
// License. However the source code for this file must still be made available
// in accordance with section (3) of the GNU General Public License.
//
// This exception does not invalidate any other reasons why a work based on
// this file might be covered by the GNU General Public License.
// -------------------------------------------
//####ECOSGPLCOPYRIGHTEND####
//==========================================================================
//#####DESCRIPTIONBEGIN####
//
// Author(s): Enrico Piria
// Contributors:
// Date: 2005-25-06
// Purpose: Provide register definitions for the MCF5484.
// Description:
// Usage: Included via "coldfire_regs.h". Do not use directly.
//
//####DESCRIPTIONEND####
//==========================================================================
// CPU space registers definitions
#define CYGARC_REG_CACR 0x002
#define CYGARC_REG_ACR0 0x004
#define CYGARC_REG_ACR1 0x005
#define CYGARC_REG_ACR2 0x006
#define CYGARC_REG_ACR3 0x007
#define CYGARC_REG_VBR 0x801
#define CYGARC_REG_ROMBAR0 0xC00
#define CYGARC_REG_RAMBAR0 0xC04
#define CYGARC_REG_MBAR 0xC0F
// ---------------------------------------------------------------------------
//--------------------------------------------------------------------------------
// MCF5484 specific CACR configuration macros
// Data Cache:
#define MCF5484_CACR_DCACHE_DEC (0x01 << 31) //Enable data cache
#define MCF5484_CACR_DCACHE_DW (0x01 << 30) //Data default write-protected
#define MCF5484_CACR_DCACHE_DESB (0x01 << 29) //Enable data store buffer
#define MCF5484_CACR_DCACHE_DDPI (0x01 << 28) //Disable CPUSHL invalidation. /Normal setting : 0/
#define MCF5484_CACR_DCACHE_DHLCK (0x01 << 27) //Half data cache lock. /Normal setting: 0/
#define MCF5484_CACR_DCACHE_DDCM(x) (((x)& 0x03) << 25) //Default Data Cache Mode
#define MCF5484_CACR_DCACHE_DDCM_WRITE_THROUGH (0x00) // write-through, imprecise
#define MCF5484_CACR_DCACHE_DDCM_COPYBACK (0x01) // copyback
#define MCF5484_CACR_DCACHE_DDCM_INHIBITED_PRECISE (0x02) // cache-inhibite precise
#define MCF5484_CACR_DCACHE_DDCM_INHIBITED_IMPRECISE (0x03) // cache-inhibite imprecise
#define MCF5484_CACR_DCACHE_DCINVA (0x01 << 24) //Data cache invalidate all /Note the caches are not cleared on power-up or normal reset/
#define MCF5484_CACR_DCACHE_DDSP (0x01 << 23) //Data default supervisor-protect
#define MCF5484_CACR_DCACHE_BEC (0x01 << 19) //Enable Branch Cache /0: Branch cache disabled. This may be useful if code is unlikely to be reused./
#define MCF5484_CACR_DCACHE_BCINVA (0x01 << 18) //Branch cache invalidate /Invalidation occurs when this bit is written as a 1. Note that branch caches are not cleared on power-up or normal reset./
// Instruction Cache:
#define MCF5484_CACR_ICACHE_IEC (0x01 << 15) //Enable instruction cache
#define MCF5484_CACR_ICACHE_DNFB (0x01 << 13) //Default cache-inhibited fill buffer
#define MCF5484_CACR_ICACHE_IDPI (0x01 << 12) //Instruction CPUSHL invalidate disable /Normal operation: 0/
#define MCF5484_CACR_ICACHE_IHLCK (0x01 << 11) //Instruction cache half-lock. /Normal operation: 0/
#define MCF5484_CACR_ICACHE_IDCM (0x01 << 10) //Instruction default cache mode. /0 Cacheable 1 Cache-inhibited/
#define MCF5484_CACR_ICACHE_ICINVA (0x01 << 8) //Instruction cache invalidate /Note the caches are not cleared on power-up or normal reset/
#define MCF5484_CACR_ICACHE_IDSP (0x01 << 7) //Default instruction supervisor protection bit.
#define MCF5484_CACR_ICACHE_EUSP (0x01 << 5) //Enable USP. Enables the use of the user stack pointer /0 USP disabled. Core uses a single stack pointer. 1 USP enabled. Core uses separate supervisor and user stack pointers./
#define MCF5484_CACR_ICACHE_DF (0x01 << 4) //Disable FPU. Determines whether the FPU is enabled /0 FPU enabled. 1 FPU disabled/
//--------------------------------------------------------------------------------
// End of var_regs.h
#endif // ifdef CYGONCE_HAL_VAR_REGS_H
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -