📄 abl_arm922t_cp15_driver.h~
字号:
/***********************************************************************
* $Workfile: abl_arm922t_cp15_driver.h $
* $Revision: 1.2 $
* $Author: WellsK $
* $Date: Oct 01 2003 12:06:24 $
*
* Project: ARM922T Coprocessor 15 driver
*
* Description:
* This file contains driver support for the MMU and cache
* coprocessor (15) of the ARM922T.
*
* Revision History:
* $Log: //smaicnt2/pvcs/VM/sharpmcu/archives/sharpmcu/software/abl/include/abl_arm922t_cp15_driver.h-arc $
*
* Rev 1.2 Oct 01 2003 12:06:24 WellsK
* Added cp15_get_ttb function.
*
* Rev 1.1 Sep 10 2003 11:26:42 WellsK
* Added a function for setting the virtual address of where the
* MMU table is located.
*
* Rev 1.0 Jun 09 2003 12:00:04 WellsK
* Initial revision.
*
*
***********************************************************************
* SHARP MICROELECTRONICS OF THE AMERICAS MAKES NO REPRESENTATION
* OR WARRANTIES WITH RESPECT TO THE PERFORMANCE OF THIS SOFTWARE,
* AND SPECIFICALLY DISCLAIMS ANY RESPONSIBILITY FOR ANY DAMAGES,
* SPECIAL OR CONSEQUENTIAL, CONNECTED WITH THE USE OF THIS SOFTWARE.
*
* SHARP MICROELECTRONICS OF THE AMERICAS PROVIDES THIS SOFTWARE SOLELY
* FOR THE PURPOSE OF SOFTWARE DEVELOPMENT INCORPORATING THE USE OF A
* SHARP MICROCONTROLLER OR SYSTEM-ON-CHIP PRODUCT. USE OF THIS SOURCE
* FILE IMPLIES ACCEPTANCE OF THESE CONDITIONS.
*
* COPYRIGHT (C) 2001 SHARP MICROELECTRONICS OF THE AMERICAS, INC.
* CAMAS, WA
**********************************************************************/
#ifndef ABL_ARM922T_CP15_DRIVER_H
#define ABL_ARM922T_CP15_DRIVER_H
#include "abl_types.h"
#include "abl_arm922t_arch.h"
#ifdef __cplusplus
extern "C" {
#endif
/***********************************************************************
* ARM 922T MMU Initialization typedefs
**********************************************************************/
/* ARM 922T MMU Translation table structure */
typedef struct
{
UNS_32 vidx[ARM922T_TT_ENTRIES];
} TRANSTABLE_T;
/* ARM 922T MMU Coarse page table type */
typedef struct
{
UNS_32 vidx[ARM922T_CPT_ENTRIES];
} CPAGETABLE_T;
/* ARM 922T MMU Fine page table type */
typedef struct
{
UNS_32 vidx[ARM922T_FPT_ENTRIES];
} FPAGETABLE_T;
/***********************************************************************
* UNS_32 num_sections: number of 1MByte sections >=1 for all blocks
* except last; last = 0
* UNS_32 virt_addr: as required, base Virtual address for block
* UNS_32 phys_addr: as required, PT address or Section address
* UNS_32 entry is composed of the following 'or'd' together:
* access_perm: ARM922T_L1D_AP_x (x = SVC_ONLY, USR_RO, ALL)
* domain: ARM922T_L1D_DOMAIN(n) as applicable
* cacheable: ARM922T_L1D_CACHEABLE if applicable
* write_buffered: ARM922T_L1D_BUFFERABLE if applicable
* descriptor_type: ARM922T_L1D_TYPE_x (x = FAULT, PAGE, SECTION)
**********************************************************************/
typedef const struct
{
UNS_32 num_sections; /* Number of 1MByte sections */
UNS_32 virt_addr; /* Virtual address of section */
UNS_32 phys_addr; /* Physical address of section */
/* Section attributes - an 'OR'ed combination of ARM922T_L1D_AP_x,
ARM922T_L1D_DOMAIN, ARM922T_L1D_CACHEABLE,
ARM922T_L1D_BUFFERABLE, and ARM922T_L1D_TYPE_x */
UNS_32 entry;
} TT_SECTION_BLOCK_T;
/***********************************************************************
* ARM 922T CP15 driver functions
**********************************************************************/
/* Return a physical address for a passed virtual address */
UNS_32 cp15_map_virtual_to_physical(void *addr);
/* Get a virtual address from a passed physical address */
void * cp15_map_physical_to_virtual(UNS_32 addr);
/* Force cache coherence between memory and cache for the selected
address range */
void cp15_force_cache_coherence(UNS_32 *start_adr,
UNS_32 *end_adr);
/* Setup MMU page tables */
BOOL_32 cp15_init_mmu_trans_table(TRANSTABLE_T *tt,
TT_SECTION_BLOCK_T *ttsbp);
/* Set the virtual address of the MMU table */
void cp15_set_vmmu_addr(UNS_32 *addr);
/* Return the physical address of the MMU translation table */
UNS_32 *cp15_get_ttb(void);
#ifdef __cplusplus
}
#endif
#endif /* ABL_ARM922T_CP15_DRIVER_H */
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -