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.

Second shared region breaks Ipc_start

var SharedRegion = xdc.useModule('ti.sdo.ipc.SharedRegion');
	SharedRegion.numEntries = 2;
	SharedRegion.translate = false;
/*
	SharedRegion.setEntryMeta(1,
    	{
		base: 0x90000000,
		len:  0x70000000,
		ownerProcId: 0,
		isValid: true,
		cacheEnable: false,
		cacheLineSize: 128,
		createHeap: true,
		name: "external_shared_mem",
	    });
*/
	SharedRegion.setEntryMeta(0,
    	{
		base: 0x0C000000, 
		len:  0x00200000,
		ownerProcId: 0,
		isValid: true,
		cacheEnable: true,
		cacheLineSize: 128,
		createHeap: true,
		name: "internal_shared_mem",
	    });

var Ipc = xdc.useModule('ti.sdo.ipc.Ipc');
	Ipc.procSync = Ipc.ProcSync_ALL;

Uncommenting external_shared_mem leads to assertion when Ipc_start() is called

ti.sdo.ipc.heaps.HeapMemMP: line 335: assertion failure: A_internal: An internal error has occurred
xdc.runtime.Error.raise: terminating execution

What is wrong with configuration?

  • You have a bug somewhere in IPC package, my friends.
    With these settings no assertion is raised:
    base: 0x90000000,
    len: 0x70000000 - 4,
    Obviously you have 32-bit pointer overflow.
  • Sam Body said:
    Obviously you have 32-bit pointer overflow.

    Thankyou for your report of a bug, it is indeed overflowing when checking an address against the end of the buffer (it checks for addr < (base + len) which fails when base + len = 2^32).

    I will file a bug for this.  At present there is an implied constraint that (base + len) < 0x100000000 (i.e., 2^32).

    Thanks & Regards,

    - Rob