Quantcast
Channel: Processors forum - Recent Threads
Viewing all articles
Browse latest Browse all 17527

RTOS/OMAP-L138: Can't get SharedRegion ID from linux kernel

$
0
0

Part Number:OMAP-L138

Tool/software:TI-RTOS

Hi to Everybody!

I'm using OMAP-L138. DSP is running on BIOS using Syslink feature. There are shared regions (SR0, SR1) defined in *.cfg file:

/* shared region configuration */
var SharedRegion = xdc.useModule('ti.sdo.ipc.SharedRegion');

/* configure SharedRegion #0 (IPC) */
var SR0Mem = Program.cpu.memoryMap["SR_0"];

SharedRegion.setEntryMeta(0,
    new SharedRegion.Entry({
        name:           "SR0",
        base:           SR0Mem.base,
        len:            SR0Mem.len,
        ownerProcId:    MultiProc.getIdMeta("HOST"),
        cacheEnable:    false,
        isValid:        true
    })
);

/* configure SharedRegion #1 (program shared region) */
var SR1Mem = Program.cpu.memoryMap["SR_1"];

SharedRegion.setEntryMeta(1,
    new SharedRegion.Entry({
        name:           "Shared region",
        base:           SR1Mem.base,
        len:            SR1Mem.len,
        ownerProcId:    MultiProc.getIdMeta("HOST"),
        cacheEnable:    false,
        isValid:        true
    })
);

On LINUX-side (in the kernel module), information about Shared Regions is read from each slave executable when loaded from the host.

But I can't see my regions within a such code:

UInt16 regid;

regid = SharedRegion_getIdByName("SR0");
pr_info("SR0 ID: %d\n", regid);
regid = SharedRegion_getIdByName("Shared region");
pr_info("Shared region ID: %d\n", regid);

if (SharedRegion_getEntry(1, &entry) != SharedRegion_S_SUCCESS) {
	pr_err("can't get shared region\n");
} else {
	pr_info("SharedRegion #1: base 0x%X, len 0x%X, valid %d, name %s, owner %d\n", entry.base, entry.len, entry.isValid, entry.name, entry.ownerProcId);
}

I only get a such return:

SR0 ID: 65535
Shared region ID: 65535
SharedRegion #1: base 0x0, len 0x0, valid 0, name (null), owner 0

Thus I get only SharedRegion_INVALIDREGIONID   (0xFFFF).

Linux (HOST) boot configuration is valid: shared regions are defined to use only by DSP.

What I should also to do to get access to shared regions from linux kernel?

shared region configuration


Viewing all articles
Browse latest Browse all 17527

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>