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 ...
| | LinkBack | Tools |
|
#1
| |||
| |||
| 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 |
« Previous Thread
|
Next Thread »
| Tools | |
| |
| | ||||
| 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.
