vBulletin Search Engine Optimization
| |||||||
| Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| ||||
| Hi, my driver needs to share a kernel allocated buffer with a user process. I was successful in accomplishing it in windows,solaris,linux and even AIX. Unfortunately, there doesn't seem any official way to do it on HP-UX. The HP support has hinted though that I may want to use long pointers to achieve it. After some investigation, I came to the following options, I am not clear as to how to accomplish any of them, so I will appreciate any help with this. I understand this is uncharted area, but I really have no option here. Option number 1: Change the protection attributes of the allocated kernel pages. Have the user process access the buffer using long pointers (Space ID + address). Problems: 1.How do I change the protection attribute. 2.How do I use long pointers. I don't really know PA-RISC assembly. Can I put an inline assmebly in my code just to do it? Option number 2: Use the fact that each process has a specific area dedicated for shared memory which is global to all processes in the system. Problems: 1.How do I allocate memory from this specific region of global address space?? mmap is doing this so there must be some way. Any help with any of the above issues is highly appreciated. ERAN. |
| ||||
| eran borovik (eranborovik@yahoo.com) wrote: : 1.How do I change the protection attribute. Fiddle with the PDIR? And also use the IDTLBT instruction? But there better be a high level kernel routine to do this? : 2.How do I use long pointers. I don't really know PA-RISC assembly. : Can I put an inline assembly in my code just to do it? Long pointers just use "^" instead of "*". It's only available for 32 bit mode. So this may be option 2 for 64 bit mode. : 1.How do I allocate memory from this specific region of global address : space?? mmap is doing this so there must be some way. : ERAN. Yes, that would be my guess. |