fixunix
Tags Register FAQ Members List Social Groups Calendar Search Today's Posts Mark Forums Read

Shared Data Region - VxWorks

This is a discussion on Shared Data Region - VxWorks ; Hi On going through the documenation provided in vxWorks for shared data region it says that it is possible to map Any type of memory can be shared, such as RAM, memory-mapped I/O, flash, or VME. We are trying to ...


Fix Unix > Other OS > VxWorks > Shared Data Region

Reply
 
LinkBack Tools
  #1  
Old 03-23-2009, 10:48 AM
Junior Member
 
Join Date: Sep 2008
Posts: 1
Default Shared Data Region

Hi
On going through the documenation provided in vxWorks for shared data region it says that it is possible to map Any type of memory can be shared, such as RAM, memory-mapped I/O, flash, or VME. We are trying to do some experiments since we have to map memory on PCI bus. Here is the sample code for the same.

#include

#include
#include
#include
#include
#include
#include
#include

/*
* Description:
*/
void createSdMem()
{
char buf[1024];
SD_ID sd;
char *Buff;
char *addr= (char *)valloc(1024);
off_t64 aa = (off_t64)addr;
printf("Errorno %d \n",errno );
memset(buf, 0, 1024);
if ((sd = sdOpen("/Mysd", 0, OM_CREATE | OM_EXCL, 1024, aa,
(MMU_ATTR)(SD_ATTR_RW | SD_CACHE_OFF) ,
(void **)&Buff))
== NULL)
{
printf("Errorno %d \n",errno );
}

memcpy(Buff,"Hi",2);

}

Some points to note
1) We are specifying the address of physical memory area in the call sdOpen(see the 5th parameter aa. Is this write way of doing this ?) since we have to physically map the PCI based memory in our system.
2) This is the piece of code which I run through the DKM to create shared data region.
3) There is one more sdOpen call in RTP since my aim is to share data between RTP and DKM.
On printing the error no I get this message "S_sdLib_PHYS_PAGES_NOT_AVAILABLE".

I have tried this first running of vxSim and then on P4 target.
How do I get rid of this message. Page size is 4KB.
Regards
tattusingh
Reply With Quote
Reply

Tools


Similar Threads
Thread Thread Starter Forum Replies Last Post
Setting up shared data region problem unix VxWorks 0 10-23-2007 05:55 PM
Re: Can I play a region 1 DVD in my region 2 dvd recorder? unix Hardware 8 10-07-2007 07:27 AM
Problem with Region flags in US region calibration module unix DICOM 4 10-02-2007 10:25 AM
Re: Can I play a region 1 DVD in my region 2 dvd recorder? unix Hardware 1 10-01-2007 09:41 AM
IPC - mapping the same virtual address range to a shared memory region across processes unix Linux 5 09-30-2007 11:50 AM


All times are GMT. The time now is 10:18 AM.