This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

TMS320C6678: 虚拟地址到物理地址重映射

Part Number: TMS320C6678

stk 的Memory_Test 工程:

#pragma DATA_SECTION(XMC_MPAX_cfg_table,".far:Core_MPAX")
MPAX_Config XMC_MPAX_cfg_table[]=
{
/*BADDR RADDR SegementSize AccessPermisionMask
32-bit virtual 36-bit physical in byte, must Access types allowed
base address address right be power of 2 in this address range
shift by 4 */
// {0x0e00000, 0x00C000000>>4, 4*1024*1024, MP_SR|MP_SW|MP_SX|MP_UR|MP_UW|MP_UX},/*SL2, RWX*/
// {0x10000000, 0x010000000>>4, 0x08000000, MP_SR|MP_SW|MP_UR|MP_UW},/*L1, LL2 global address space, RW*/
// {0x18000000, 0x00C000000>>4, 4*1024*1024, MP_SR|MP_SW|MP_UR|MP_UW},/*remap Shared L2 to 0x18000000 for test*/
// {0x21000000, 0x100000000>>4, 4*1024, MP_SR|MP_SW|MP_UR|MP_UW},/*map DDR2 configuration registers at physical address 0x1:00000000 to logical address 0x21000000*/
{0x90000000, 0x800000000>>4, 0x10000000, MP_SR|MP_SW|MP_SX|MP_UR|MP_UW|MP_UX}/*DDR, RWX*/
};

我用0核重映射后 修改0x90000000 处的值,再在1核(没有进行重映射,用的默认值)查看0x80000000的值,并没有变化

  • #pragma DATA_SECTION(XMC_MPAX_cfg_table,".far:Core_MPAX")
    MPAX_Config XMC_MPAX_cfg_table[]=
    {
    /*BADDR RADDR SegementSize AccessPermisionMask
    32-bit virtual 36-bit physical in byte, must Access types allowed
    base address address right be power of 2 in this address range
    shift by 4 */
    // {0x0e00000, 0x00C000000>>4, 4*1024*1024, MP_SR|MP_SW|MP_SX|MP_UR|MP_UW|MP_UX},/*SL2, RWX*/
    // {0x10000000, 0x010000000>>4, 0x08000000, MP_SR|MP_SW|MP_UR|MP_UW},/*L1, LL2 global address space, RW*/
    // {0x18000000, 0x00C000000>>4, 4*1024*1024, MP_SR|MP_SW|MP_UR|MP_UW},/*remap Shared L2 to 0x18000000 for test*/
    // {0x21000000, 0x100000000>>4, 4*1024, MP_SR|MP_SW|MP_UR|MP_UW},/*map DDR2 configuration registers at physical address 0x1:00000000 to logical address 0x21000000*/

    {0x00000000, 0x000000000>>4, 0x80000000, MP_SR|MP_SW|MP_SX|MP_UR|MP_UW|MP_UX},/*DDR, RWX*/
    {0x80000000, 0x800000000>>4, 0x20000000, MP_SR|MP_SW|MP_SX|MP_UR|MP_UW|MP_UX},/*DDR, RWX*/
    {0xA0000000, 0xA00000000>>4, 64*1024*1024, MP_SR|MP_SW|MP_SX|MP_UR|MP_UW|MP_UX},/*DDR, RWX*/
    {0xA4000000, 0xA40000000>>4, 64*1024*1024, MP_SR|MP_SW|MP_SX|MP_UR|MP_UW|MP_UX},/*DDR, RWX*/
    {0xC0000000, 0xC00000000>>4, 0x40000000, MP_SR|MP_SW|MP_SX|MP_UR|MP_UW|MP_UX},/*DDR, RWX*/
    };

    我们最总按这个使用,但是0xA4000000 、0xA0000000 并未映射到0xA4000000,0xA0000000  上反而映射到0xC0000000上了,这是怎么回事了?????