[Info-vax] Device Driver Kernel-User Buffer Mapping

Luigi Thirty luigi30 at gmail.com
Wed May 12 23:55:41 EDT 2021


On Wednesday, May 12, 2021 at 8:27:29 PM UTC-5, Roger Ivie wrote:
> On Wednesday, May 12, 2021 at 9:07:42 AM UTC-7, osuv... at gmail.com wrote: 
> > > VOID_PQ mapped_addr_base; 
> > > uint64 mapped_addr_length; 
> > > r0_status = sys$crmpsc_pfn_64( 
> > > VA$C_P0, 
> > > buf/8192, 
> > > (1048576*16) / 8192, 
> > > PSL$C_USER, 
> > > SEC$M_EXPREG|SEC$M_WRT, 
> > > &mapped_addr_base, 
> > > &mapped_addr_length 
> > > ); 
> > >
> peeked at my code while i was at work today (can't read news there, don't have sources here at home). the only things that stand out as obviously different between my codes and yours are 1) yes, va$c_p0 needs to be passed by reference. 2) i included sec$m_pfnmap in the flags; don't recall whether that's necessary, but wouldn't surprise me. 3) i included the 
> final parameter (which you've omitted here; it's supposed to be optional when sec$m_expreg is set); i passed a zero in that parameter. 
> -- 
> roger ivie 
> roger... at gmail.com

Yeah, passing the first parameter by reference was the problem. I don't need the last parameter (I don't care where in my process' virtual address space it gets mapped as long as it's there). I got the card to map and work from a user process. Thanks!



More information about the Info-vax mailing list