Dan Mick wrote:
>>> I am porting linux application to Solaris 10.
>>> Here I am facing the problem to find an equivalent of iopl() (Inpu / 
>>> output privilage) function of Linux to Solaris 10.
>>
>> Why does the application use iopl() on Linux ?  What does it actually 
>> do?  I've read the Linux man page and I can't quite understand what it 
>> does but I think the closest Solaris equivalent might be running with 
>> the sys_devices privilege [ see privileges(5) ].
> 
> There is an undocumented system call that gives IO privileges, which is 
> probably what iopl() does.   As such, you're on your own if you use it, 
> but search the source for V86SC_IOPL.
> 
> #include <sys/sysi86.h>
> #define IOPL 0x3000             /* PL "3", shifted into correct pos */
> 
> int
> main(void)
> {
> 
>         if (sysi86(SI86V86, V86SC_IOPL, IOPL) != 0) {
>                 perror("IOPL");
>                 exit(1);
>         }

Looking at the implementation of that syscall the userland process will 
need sys_config not sys_devices to make this (undocumented) syscall.

--
Darren J Moffat

_______________________________________________
opensolaris-code mailing list
opensolaris-code@opensolaris.org
http://mail.opensolaris.org/mailman/listinfo/opensolaris-code

Reply via email to