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.

66AK2G12: is it possible to configure memory to 32bit boundary?

Part Number: 66AK2G12


Hi,

From keystone-k2g-evm.dts we can see that system memory starts from 0x800000000 which is beyond 32bit boundary.

	memory@800000000 {
		device_type = "memory";
		reg = <0x00000008 0x00000000 0x00000000 0x80000000>;
	};

We have a PCIe device and would like to access Memory to exchange data with K2G processor. As we know, PCIe is 32bit and unable to write to memory address beyond 32bit boundary.

So, I am asking if there is a way either to enable PCIe device to access 64bit address memory or if we can change memory space in device tree from 64bit to 32bit?

Tom

  • Hi Tom,

    If you check Table 2-1 Device Memory Map in the K2G TRM, there is another 2GB address region from 0x8000-0000 which is also for DDR.

  • Hi Bin,

    Great! So, I can change system memory starting address from 0x8 0000 0000 to 0x8000 0000?

    	memory@80000000 {
    		device_type = "memory";
    		reg = <0x00000000 0x80000000 0x00000000 0x80000000>;
    	};
    

    Tom

  • If it is OK to change memory to start from 0x8000 0000, should I modify the reserved-memory portion in dts in the following way? See the original EVM K2G dts at elixir.bootlin.com/.../keystone-k2g-evm.dts

    	reserved-memory {
    		#address-cells = <1>;
    		#size-cells = <1>;
    		ranges;
    
    		dsp_common_memory: dsp-common-memory@81f80000 {
    			compatible = "shared-dma-pool";
    			reg = <0x81f80000 0x800000>;
    			reusable;
    			status = "okay";
    		};
    	};

    By the way, who is using the
    dsp-common-memory on EVM K2G board?

    Tom
  • Hi Tom,

    If it is OK to change memory to start from 0x8000 0000

    I think it is more about how to configure the DDR controller in u-boot to use this 0x8000-0000 address. I will follow up with our EMIF expert on this and get back to you. I think he is currently out of office.

    By the way, who is using the dsp-common-memory on EVM K2G board?

    It must be reserved for the DSP applications in the SDK.

  • Tom, i believe you have to change some of the registers in the MSMC to map the DDR start address from 0x8_0000_0000 to 0x8000_0000.  I don't think just changing the dts file will do this.

     Section 7.1.3.3.2 of the TRM talks about SES_MPAXH and SES_MPAXL registers.  I believe these registers would need to be modified to remap the external address space.  There are a bunch of registers depending on PrivID and number of segments enabled.  You should just need to change the enabled segments corresponding to the DDR address space.

    Regards,

    James

  • Hmm, interesting. The keystone-k2g-generic.dts in uboot already uses 32bit address:

        memory@80000000 {
            device_type = "memory";
            reg = <0x80000000 0x20000000>;
        };

    Tom

  • Tom, 

    yes interesting.  If that is the case, you may want to stop a bootup at the u-boot prompt and check the register configuration that i mentioned above.  Then compare it to how the kernel configures these registers.  You may be able to just copy what u-boot does into the kernel.

    Regards,

    James