I built a projet that use direct i/o access to $100-$1F0 and $300-$307 i/o address.
I use delphi 6 with a driver to enable direct i/o access in winNT,XP etc.
and all is ok.
Now I'd like to run my project in linux (I choose ubuntu 8.10) but all i/o access are refuse.
Do you know if wine permit the direct use of i/o?
What is the correct methode?
(recompiling wine or the kernel, using a different i/o driver or other...)
direct i/o using wine
Re: direct i/o using wine
Wine does not support this type of drivers. They can not and will not work on Wine.alessandro_maffei wrote:I built a projet that use direct i/o access to $100-$1F0 and $300-$307 i/o address.
I use delphi 6 with a driver to enable direct i/o access in winNT,XP etc.
and all is ok.
You can not access hardware ports on Linux from user space unless you running this program as root. Or used some other mechanism to allow yourself to access ports.
Even if you running program as root, you still have to use ioperm() to enable port access. For more details see for example this HOWTO: http://tldp.org/HOWTO/IO-Port-Programming.html
-
- Newbie
- Posts: 3
- Joined: Fri Feb 20, 2009 3:44 pm
Re: direct i/o using wine
Even if you running program as root, you still have to use ioperm() to enable port access. For more details see for example this HOWTO: http://tldp.org/HOWTO/IO-Port-Programming.html
it seems that the HOWTO explain how to compiler an application in linux native but I've already an application in binary (exe).
I've see that are more version of wine that the windows API used to enable i/o permission in winXP is corretly implemented (win32).
WinXP Driver dialogs with this API to enable i/o.
Can I implement directly in my application the permission to use i/o so I can use it in winXP and linux (as root)?
The program to run as root is the application or wine?
es: gksu wine myapplication can work?
it seems that the HOWTO explain how to compiler an application in linux native but I've already an application in binary (exe).
I've see that are more version of wine that the windows API used to enable i/o permission in winXP is corretly implemented (win32).
WinXP Driver dialogs with this API to enable i/o.
Can I implement directly in my application the permission to use i/o so I can use it in winXP and linux (as root)?
The program to run as root is the application or wine?
es: gksu wine myapplication can work?
Running wine as root is highly not recommended some bad things have happened in the past.
Linux kernel is controlling hardware access alessandro_maffei. All hardware access operations would have to be done Linux way or at a speed cost. Like qemu or v86 emulation were the address you were using are virtual.
The kind of operation you are asking for is not simple to be made work. http://tldp.org/HOWTO/IO-Port-Programming-2.html#ss2.2 Note the warning there about using device port system can be completely exploited by any program giving that ablity. This also applies to Windows raw IO support. Due to using raw hardware access any program doing that can in theory take out the OS.
You really need to seriously consider splitting your program in two. Service or a Driver as root and interface as usermode.
Things are forbin from normal users for very good reasons under Linux. You have to consider the security side of what you are doing alessandro_maffei. No point having you program working on Windows and Linux if it equals running insecure.
Linux kernel is controlling hardware access alessandro_maffei. All hardware access operations would have to be done Linux way or at a speed cost. Like qemu or v86 emulation were the address you were using are virtual.
The kind of operation you are asking for is not simple to be made work. http://tldp.org/HOWTO/IO-Port-Programming-2.html#ss2.2 Note the warning there about using device port system can be completely exploited by any program giving that ablity. This also applies to Windows raw IO support. Due to using raw hardware access any program doing that can in theory take out the OS.
You really need to seriously consider splitting your program in two. Service or a Driver as root and interface as usermode.
Things are forbin from normal users for very good reasons under Linux. You have to consider the security side of what you are doing alessandro_maffei. No point having you program working on Windows and Linux if it equals running insecure.
-
- Newbie
- Posts: 3
- Joined: Fri Feb 20, 2009 3:44 pm
OK, I must change every i/o access of my application to a localhost:xxxx service,oiaohm wrote: You really need to seriously consider splitting your program in two. Service or a Driver as root and interface as usermode.
implement the same service at the same port in WinXP and in linux (service with i/o permission), run the service and then run my applicaton.
it's right?
using an i/o server native in linux I can use the normal method to implement direct i/o accessoiaohm wrote: The kind of operation you are asking for is not simple to be made work. http://tldp.org/HOWTO/IO-Port-Programming-2.html#ss2.2 Note the warning there about using device port system can be completely exploited by any program giving that ablity. This also applies to Windows raw IO support. Due to using raw hardware access any program doing that can in theory take out the OS.
OK, true!oiaohm wrote: Things are forbin from normal users for very good reasons under Linux. You have to consider the security side of what you are doing alessandro_maffei. No point having you program working on Windows and Linux if it equals running insecure.
Best regards, your post is very usefull
Even with localhost secuirty of what you are doing has to be considered.
You don't want two users messing it up lot of care has to be taken. Yes same service interface on both platforms does cure some of the problem. Part of the problem is also the secuirty problems.
Fix both by by problems. Service running as a higher user. Under Linux there are quite a few different ways of doing it.
You don't want two users messing it up lot of care has to be taken. Yes same service interface on both platforms does cure some of the problem. Part of the problem is also the secuirty problems.
Fix both by by problems. Service running as a higher user. Under Linux there are quite a few different ways of doing it.