工具/软件:Linux
你(们)好
我使用的是 AM572x 定制板
和、我使用 GPMC MRAM (多路复用模式)
MRAM: MR4A16BCMA35
U-Boot 命令(MD、MW)正在工作。
但是、Linux 应用程序无法使用它。
测试 MRAM 存储器
[Main] 99开发套件已开放!
[Main] 105 Mem Mapping for PHY -> Vir!Unhandled fault:异步外部中止(0x1211)、位于0x00000000
内容:
PgD = ece78680
[00000000]* PgD=ace38003,* PMD=fbbc5003
------ [在此处剪切]-----
警告:CPU:1 PID:28 at drivers/bus/omap_l3_oc.c:147 l3_interrupt_handler + 0x25c/0x368 ()
440000.OCP:L3自定义错误:主 MPU 目标 GPMC (读取):在功能访问期间以用户模式访问数据
总线错误(转储的内核)链接模块: CBC jitterentropy_rng drbg virtio_rpmsg_bus xfrm_user xfrm4_tunch prueth ipcomp xfrm_ipcomp pr4蓝牙 AH4 pru_rproc_key xfrm_algo ECB pruss_intc SHA5_generic extcon_us_us_gp_gpvapor_mac (rss_ss_un_ss_ap_r_uni_mac)模块 rssn_remote_remote_remote_remote_remote_remoti_ap_ap_une_remote_remoti_ap_une_remote_remoti_ap_ap_uni_apor_apor_uni_remote_remote_remoti_ap_ap_apor_apote_remote_remote_remote_remoti_apor_apor_apor_apote_remote_remoti_apor_apote_remoti_apote_remot
CPU:1 PID:28 Comm:IRQ/23-L3-APP-I 被污染:G O 4.4.4.19-rt25-gf572d285f0 #95
硬件名称:通用 DRA74X (平展器件树)
回溯:
[ ](dump_backtrace)从[ ](show_stack+0x18/0x1c)
r7:c03009c4 r6:20010113 r5:00000000 r4:c095fcc4
[ ](show_stack)从[ ](dump_stack+0x8c/0xa0)
[ ](dump_stack)从[ ](warn_slESpath_common+0x88/b8)
R7:c03009c4 R6:00000093 R5:00000009 R4:ee651e28
[ ](warn_slowpath_common)、来自[ ](WARN_RASPH_FMt+0x38/0x40)
r8:00000017 r7:c0842cdc r6:00000002 r5:c0842d9c r4:c0842e40
[ ](warn_slowpath_fmt)、来自[ ](L3_INTERRUPT_Handler+0x25c/0x368)
r3:ee61f680 r2:c0842e40
R4:80080003.
[ ](L3_interrupt_handler)、来自[ ](IRQ_Forced_thread_fn+0x28/0x7c)
R10:c0083984 R9:ee61fbc0 R8:ee60c900 r7:00000001 R6:00000000 R5:ee60c900
R4:ee61fbc0
[ ](IRQ_Forced_thread_fn)、来自[ ](IRQ_THREAD+0x124/0x1f8)
R7:00000001 R6:00000000 R5:ee650000 R4:ee61fbe4
[ ](IRQ_THread)、来自[ ](kthread+0xe4/0xFC)
R10:00000000 R9:00000000 R8:00000000 r7:c0083bf0 R6:ee61fbc0 R5:ee61fc00
R4:00000000
[ ](kthread)、来自[ ](RET_FANK_F叉+0x14/0x24)
R7:00000000 R6:00000000 R5:c0050b80 R4:ee61fc00
-->结束跟踪000000000002]-->
const unsigned int mem_address = 0x01000000;
const unsigned int mem_size = 0x01000000;
MEM_DEV = OPEN ("/dev/mem、O_RDWR | O_SYNC);
printf ("[%s]%d Dev Open!\n"、__function__、__line__);
virt_addr = mmap (NULL、mem_size、PROT_read | PROT_write、map_shared、mem_dev、 MEM_ADDRESS);
if (virt_addr == map_failed)
printf ("[%s]%d 错误 mmap"、__function__、__line__);
其他
printf ("[%s] PHY 的%d Mem 映射-> Vir!\n"、__function__、__line___);
printf ("内容:\n");
对于(i=0;i<100;i++)
{
printf ("[%03d]0x%02x "、i、*(char *)(virt_addr+i));
*((char *) virt_addr+i)= i;
if (i%10 ==0)
printf ("\n");
}
printf ("\n");
引脚复用
/GPMC MRAM
{GPMC_A1、(M0 | PIN_OUTPUT | MANUAL_MODE)}、// GPMC_A1.vin4b_D1 *
{GPMC_A2、(M0 | PIN_OUTPUT | MANUAL_MODE)}、// GPMC_A2.vin4b_D2 *
{GPMC_A3、(M0 | PIN_OUTPUT | MANUAL_MODE)}、// GPMC_A3.vin4b_D3 *
{GPMC_A4、(M0 | PIN_OUTPUT | MANUAL_MODE)}、/* GPMC_A4.vin4b_D4 *
{GPMC_oen_REN、(M0 | PIN_INPUT_PULLUP)}、/* GPMC_oen_ren。GPIO2_24 *
{GPMC_WEN、(M0 | PIN_INPUT_PULLUP)}、/* GPMC_WN.GPIO2_25 *
{GPMC_BEN0、(M0 | PIN_INPUT_PULLUP)}、// GPMC_BEN0.GPIO2_26 *
{GPMC_BEN1、(M0 | PIN_INPUT_PULLUP)}、// GPMC_BEN1.GPIO2_27 *
{GPMC_WAIT0、(M0 | PIN_INPUT_PULLUP)}、// GPMC_wait0.GPIO2_28 *
{GPMC_CS3、(M0 | PIN_INPUT 下拉)}、// GPMC_CS3.vin3a_clk0 *
{GPMC_ADVN_ALE、(M0 | PIN_INPUT_PULLUP)}、/* GPMC_advn_ALe.GPIO2_23 *
{GPMC_AD0、(M0 | PIN_INPUT_PULLUP | MANUAL_MODE)}、// GPMC_ad0.vin3a_d0 *
{GPMC_AD1、(M0 | PIN_INPUT_PULLUP | MANUAL_MODE)}、/* GPMC_AD1.vin3A_D1 *
{GPMC_AD2、(M0 | PIN_INPUT_PULLUP | MANUAL_MODE)}、// GPMC_ad2.vin3A_D2 *
{GPMC_AD3、(M0 | PIN_INPUT_PULLUP | MANUAL_MODE)}、/* GPMC_AD3.vin3A_D3 *
{GPMC_AD4、(M0 | PIN_INPUT_PULLUP | MANUAL_MODE)}、// GPMC_AD4.vin3A_D4 *
{GPMC_AD5、(M0 | PIN_INPUT_PULLUP | MANUAL_MODE)}、/* GPMC_AD5.vin3A_D5 *
{GPMC_AD6、(M0 | PIN_INPUT_PULLUP | MANUAL_MODE)}、/* GPMC_AD6.vin3a_d6 *
{GPMC_AD7、(M0 | PIN_INPUT_PULLUP | MANUAL_MODE)}、// GPMC_AD7.vin3A_D7 *
{GPMC_AD8、(M0 | PIN_INPUT_PULLUP | MANUAL_MODE)}、// GPMC_AD8.vin3A_D8 *
{GPMC_AD9、(M0 | PIN_INPUT_PULLUP | MANUAL_MODE)}、// GPMC_ad9.vin3A_D9 *
{GPMC_AD10、(M0 | PIN_INPUT_PULLUP | MANUAL_MODE)}、// GPMC_ad10.vin3a_d10 *
{GPMC_AD11、(M0 | PIN_INPUT_PULLUP | MANUAL_MODE)}、// GPMC_AD11.vin3A_D11 *
{GPMC_AD12、(M0 | PIN_INPUT_PULLUP | MANUAL_MODE)}、// GPMC_ad12.vin3a_d12 *
{GPMC_AD13、(M0 | PIN_INPUT_PULLUP | MANUAL_MODE)}、// GPMC_AD13.vin3A_D13 *
{GPMC_AD14、(M0 | PIN_INPUT_PULLUP | MANUAL_MODE)}、// GPMC_ad14.vin3A_D14 *
{GPMC_AD15、(M0 | PIN_INPUT_PULLUP | MANUAL_MODE)}、// GPMC_AD15.vin3A_D15 *
U-Boot GPMC 注册器定义 mem.h
#define STNOR_GPMC_CONFIG1 0x01801203
#define STNOR_GPMC_CONFIG2 0x001f1f00
#define STNOR_GPMC_CONFIG3 0x001f1f01
#define STNOR_GPMC_CONFIG4 0x1f011f01
#define STNOR_GPMC_CONFIG5 0x001d1f1f
#define STNOR_GPMC_CONFIG6 0x08070280
#define STNOR_GPMC_CONFIG7 0x00000F41
我的开发环境
主机 PC 操作系统:Ubuntu 16.04 Linux 64位
AM5728 SDK:U-boot-2016.05 / Linux-RT-4.4.19
AM5728 SDK 版本:TI-processor-sdk-linux-rt-am57xx-evm-03.01.00.06
IPC:IPC_3_43_02_04
XDC:xdctools_3_32_00_06_core
谢谢、致以诚挚的问候。
John。