isa memory address
Hi,
I'm working with an old data acquisition system that uses an 8-bit card in an ISA slot (address 0xd0000), by a simple driver I ported from kernel 1.1.x to 2.2.24.
It works fine, but I'd like to have features by newer kernels (2.4 or even 2.6), like new filesystems support.
On kernels >=2.4.0 check_region returns -EBUSY for that address, but it is not actually used; I tried to understand if something has been changed/removed, because of obsolescence of devices, in IO management, but I couldn't.
Does anybody have any explanation/suggestion?
Thank you
Best Regards,
Antonino Sergi
PS:As I'm not subscribed, please CC me your answers.
Antonino Sergi <[email protected]>
Radiodating Laboratory
Physics Department
University of Rome "La Sapienza"
P.le Aldo Moro 2
00185 Rome Italy
Tel +390649914206
Fax +390649914208
Quoted 9 lines · Antonino Sergi
Hi,
I'm working with an old data acquisition system that uses an 8-bit card in an ISA slot (address
0xd0000), by a simple driver I ported from kernel 1.1.x to 2.2.24.It works fine, but I'd like to have features by newer kernels (2.4 or even 2.6), like new filesystems support.
Quoted 6 lines
On kernels >=2.4.0
check_regionreturns-EBUSYfor that address, but it is not actually used; I tried to understand if something has been changed/removed, because of obsolescence of devices, in IO management, but I couldn't.Does anybody have any explanation/suggestion?
Please post contents of /proc/iomem .
I'm guessing that it will show something like:
000e0000-000effff : Extension ROM
(but for address 000d0000).
So then the question becomes how to assign/allocate it for your driver.
You might have to dummy up a call to release_resource() first, then use request_resource() to acquire it.
Or just use the addresses anyway.... even though check_region() says -EBUSY. BTW, check_region() is deprecated in 2.6.x, so if your driver could just use request_region() and release_region(), that would be better.
Quoted 7 lines
Thank you
Best Regards,
Antonino Sergi
PS:As I'm not subscribed, please CC me your answers.
Signature · 1 line
~Randy
Quoted 15 lines · Randy.Dunlap
Quoted 14 lines · Antonino Sergi
Hi,
I'm working with an old data acquisition system that uses an 8-bit card in an ISA slot (address
0xd0000), by a simple driver I ported from kernel 1.1.x to 2.2.24.It works fine, but I'd like to have features by newer kernels (2.4 or even 2.6), like new filesystems support.
On kernels >=2.4.0
check_regionreturns-EBUSYfor that address, but it is not actually used; I tried to understand if something has been changed/removed, because of obsolescence of devices, in IO management, but I couldn't.
Quoted 5 lines
Quoted 1 line
Does anybody have any explanation/suggestion?
Please post contents of
/proc/iomem.
I'm guessing that it will show something like:
000e0000-000effff : Extension ROM
I can't. Now it is installed redhat 6.2 (2.2.14) (I gave up about this issue some moths ago) and I think I won't ever succeed in satisfying rpm dep to install a compiled 2.6.x. I'll try to compile it from scratch ASAP
Quoted 8 lines
(but for address
000d0000).
So then the question becomes how to assign/allocate it for your driver.You might have to dummy up a call to
release_resource()first, then userequest_resource()to acquire it.
Or just use the addresses anyway.... even thoughcheck_region()says-EBUSY.
I'll try, but the question is why this would be needed?
Thank you
Quoted 1 line
Quoted 1 line
PS:As I'm not subscribed, please CC me your answers.
Antonino Sergi <[email protected]>
Radiodating Laboratory
Physics Department
University of Rome "La Sapienza"
P.le Aldo Moro 2
00185 Rome Italy
Tel +390649914206
Fax +390649914208
I looked for iomem with a kernel-2.4.2:
/proc/iomem reports
00000000-0009fbff : System RAM
0009fc00-0009ffff : reserved
000a0000-000bffff : Video RAM area
000c0000-000c7fff : Video ROM
000f0000-000fffff : System ROM
00100000-1fffbfff : System RAM
Nothing in the region 000d0000-000d0006 (used by my driver), so why is it BUSY?
I have not tried yet to use it anyway.
Thanks
Antonino Sergi
Quoted 39 lines · Randy.Dunlap
Quoted 9 lines · Antonino Sergi
Hi,
I'm working with an old data acquisition system that uses an 8-bit card in an ISA slot (address
0xd0000), by a simple driver I ported from kernel 1.1.x to 2.2.24.It works fine, but I'd like to have features by newer kernels (2.4 or even 2.6), like new filesystems support.
Quoted 6 lines
On kernels >=2.4.0
check_regionreturns-EBUSYfor that address, but it is not actually used; I tried to understand if something has been changed/removed, because of obsolescence of devices, in IO management, but I couldn't.Does anybody have any explanation/suggestion?
Please post contents of
/proc/iomem.
I'm guessing that it will show something like:
000e0000-000effff : Extension ROM
(but for address000d0000).
So then the question becomes how to assign/allocate it for your driver.You might have to dummy up a call to
release_resource()first, then userequest_resource()to acquire it.
Or just use the addresses anyway.... even thoughcheck_region()says-EBUSY. BTW,check_region()is deprecated in 2.6.x, so if your driver could just userequest_region()andrelease_region(), that would be better.Quoted 7 lines
Thank you
Best Regards,
Antonino Sergi
PS:As I'm not subscribed, please CC me your answers.
Quoted 10 lines · Antonino Sergi
I looked for iomem with a kernel-2.4.2:
/proc/iomemreports
00000000-0009fbff : System RAM
0009fc00-0009ffff : reserved
000a0000-000bffff : Video RAM area
000c0000-000c7fff : Video ROM
000f0000-000fffff : System ROM
00100000-1fffbfff : System RAM
Quoted 2 lines
Nothing in the region 000d0000-000d0006 (used by my driver), so why is it BUSY?
Because you are trying to use the region in the I/O port space. That's
probably not what you want to do and an 8-bit ISA board cannot decode it at all anyway. Actually for some platforms using the I/O space outside the low 16-bit range may be quite difficult even for buses and devices that support it and Linux does not support it then, either. So Linux correctly informs you you cannot use that range.
Quoted 11 lines
Quoted 11 lines
Quoted 11 lines
I'm working with an old data acquisition system that uses an 8-bit card in an ISA slot (address
0xd0000), by a simple driver I ported from kernel 1.1.x to 2.2.24.It works fine, but I'd like to have features by newer kernels (2.4 or even 2.6), like new filesystems support.
On kernels >=2.4.0
check_regionreturns-EBUSYfor that address, but it is not actually used; I tried to understand if something has been changed/removed, because of obsolescence of devices, in IO management, but I couldn't.
Try check_mem_region() instead, ...
Quoted 2 lines
Quoted 2 lines
You might have to dummy up a call to
release_resource()first, then userequest_resource()to acquire it.
... or better yet request_mem_region()/release_resource(), as the former
is deprecated and will be removed.
Maciej
Quoted 15 lines · Maciej W. Rozycki
Quoted 10 lines · Antonino Sergi
I looked for iomem with a kernel-2.4.2:
/proc/iomemreports
00000000-0009fbff : System RAM
0009fc00-0009ffff : reserved
000a0000-000bffff : Video RAM area
000c0000-000c7fff : Video ROM
000f0000-000fffff : System ROM
00100000-1fffbfff : System RAMQuoted 2 lines
Nothing in the region 000d0000-000d0006 (used by my driver), so why is it BUSY?
Quoted 6 lines
Because you are trying to use the region in the I/O port space. That's
probably not what you want to do and an 8-bit ISA board cannot decode it at all anyway. Actually for some platforms using the I/O space outside the low 16-bit range may be quite difficult even for buses and devices that support it and Linux does not support it then, either. So Linux correctly informs you you cannot use that range.
This is actually not clear for me.
Quoted 12 lines
Quoted 11 lines
Quoted 11 lines
Quoted 11 lines
I'm working with an old data acquisition system that uses an 8-bit card in an ISA slot (address
0xd0000), by a simple driver I ported from kernel 1.1.x to 2.2.24.It works fine, but I'd like to have features by newer kernels (2.4 or even 2.6), like new filesystems support.
On kernels >=2.4.0
check_regionreturns-EBUSYfor that address, but it is not actually used; I tried to understand if something has been changed/removed, because of obsolescence of devices, in IO management, but I couldn't.
Quoted 7 lines
Try
check_mem_region()instead, ...Quoted 2 lines
Quoted 2 lines
You might have to dummy up a call to
release_resource()first, then userequest_resource()to acquire it.... or better yet request_mem_region()/release_resource(), as the former
is deprecated and will be removed.
I tried but (on 2.4.2):
- request_region fails but, ignoring it and remapping physical address to virtual, everything works fine, except for release_region, of course.
- request_mem_region works but what I get from communication with the actual device are numbers that sometimes are surely wrong.
I couldn't understand what is the actual difference between ioport_resource and iomem_resource to track the problem.
Antonino
Quoted 1 line
Maciej
Quoted 8 lines · Antonino Sergi
Quoted 6 lines
Because you are trying to use the region in the I/O port space. That's
probably not what you want to do and an 8-bit ISA board cannot decode it at all anyway. Actually for some platforms using the I/O space outside the low 16-bit range may be quite difficult even for buses and devices that support it and Linux does not support it then, either. So Linux correctly informs you you cannot use that range.This is actually not clear for me.
The port I/O space range differs among platforms. You get -EBUSY in a
response to a request for a range of ports outside the supported range.
Quoted 8 lines
Quoted 2 lines
... or better yet request_mem_region()/release_resource(), as the former
is deprecated and will be removed.I tried but (on 2.4.2):
-request_regionfails but, ignoring it and remapping physical address to virtual, everything works fine, except forrelease_region, of course.
-request_mem_regionworks but what I get from communication with the actual device are numbers that sometimes are surely wrong.
As both request_region() and request_mem_region() merely reserve
different resources in Linux structures, you can't get a different behavior from your device depending on which one you call, if any at all, unless you change code elsewhere at the same time.
Quoted 2 lines
I couldn't understand what is the actual difference between
ioport_resourceandiomem_resourceto track the problem.
The former holds I/O resources mapped in the port space, whilst the
latter holds ones mapped in the memory space. The spaces use different cycles each at the bus the destined device is located on.
Maciej
Quoted 11 lines
Quoted 5 lines
I tried but (on 2.4.2):
-request_regionfails but, ignoring it and remapping physical address to virtual, everything works fine, except forrelease_region, of course.
-request_mem_regionworks but what I get from communication with the actual device are numbers that sometimes are surely wrong.As both
request_region()andrequest_mem_region()merely reserve
different resources in Linux structures, you can't get a different behavior from your device depending on which one you call, if any at all, unless you change code elsewhere at the same time.
You were right, there was a wrong symlink that made me compile for 2.4 with headers from 2.2; maybe some different macro substitution lead to an actual different code. Now it works fine, with 2.6 too.
Thank you
Antonino Sergi
Quoted 1 line
Maciej
Antonino Sergi <[email protected]>
Radiodating Laboratory
Physics Department
University of Rome "La Sapienza"
P.le Aldo Moro 2
00185 Rome Italy
Tel +390649914206
Fax +390649914208
Hi,
I found a new problem: I was testing my driver on a P233MMX with 2.6.5 i586 compiled without any trouble. When I moved to a PIII500 with the 2.6.9 i686 compiled I got kernel oops because the IOaddresss (0xd0000) was remapped to 0x20d0000 and
"Unable to handle kernel paging request at virtual address fef66c58" I think it is something related to 4GB memory kernel config parameter
Because of some hurry I tried the other kernel (2.6.9 i586 compiled) and this problem disappeared (IOaddresss 0xd0000 remapped to 0xc00d0000), but it seems that the requested memory area is not protected anymore by foreign access, in fact:
-on both machines, if the kernel module is not loaded, I can see, on hard disk activity, a blinking LED on the data acquisition system, notifying some access to the device
-on P233MMX and NOT on PIII500, once the module is loaded, these accidental accesses are actually forbidden. This produces, on PIII500, fake data
Is there any remarkable difference in resource reservation between these two kernels or it is due to some hardware difference? I tried to look at include/linux/ioport.h and kernel/resource.c but I could not notice any difference.
Thank you
Antonino Sergi
Quoted 36 lines · Maciej W. Rozycki
Quoted 8 lines · Antonino Sergi
Quoted 6 lines
Because you are trying to use the region in the I/O port space. That's
probably not what you want to do and an 8-bit ISA board cannot decode it at all anyway. Actually for some platforms using the I/O space outside the low 16-bit range may be quite difficult even for buses and devices that support it and Linux does not support it then, either. So Linux correctly informs you you cannot use that range.This is actually not clear for me.
The port I/O space range differs among platforms. You get
-EBUSYin a
response to a request for a range of ports outside the supported range.Quoted 8 lines
Quoted 2 lines
... or better yet request_mem_region()/release_resource(), as the former
is deprecated and will be removed.I tried but (on 2.4.2):
-request_regionfails but, ignoring it and remapping physical address to virtual, everything works fine, except forrelease_region, of course.
-request_mem_regionworks but what I get from communication with the actual device are numbers that sometimes are surely wrong.As both
request_region()andrequest_mem_region()merely reserve
different resources in Linux structures, you can't get a different behavior from your device depending on which one you call, if any at all, unless you change code elsewhere at the same time.Quoted 2 lines
I couldn't understand what is the actual difference between
ioport_resourceandiomem_resourceto track the problem.The former holds I/O resources mapped in the port space, whilst the
latter holds ones mapped in the memory space. The spaces use different cycles each at the bus the destined device is located on.Maciej
Hi,
I made another test: I tried the same compiled kernel version on both machines (P233MMX and PIII500) without any other module loaded and I still have different behavior, as described in my previous e-mail, so it should be some hardware difference, but I don't know.
Thank you for any suggestion
Antonino Sergi
Quoted 66 lines · Antonino Sergi
Hi,
I found a new problem: I was testing my driver on a P233MMX with 2.6.5 i586 compiled without any trouble. When I moved to a PIII500 with the 2.6.9 i686 compiled I got kernel oops because the IOaddresss (
0xd0000) was remapped to0x20d0000and
"Unable to handle kernel paging request at virtual addressfef66c58" I think it is something related to 4GB memory kernel config parameterBecause of some hurry I tried the other kernel (2.6.9 i586 compiled) and this problem disappeared (IOaddresss
0xd0000remapped to0xc00d0000), but it seems that the requested memory area is not protected anymore by foreign access, in fact:
-on both machines, if the kernel module is not loaded, I can see, on hard disk activity, a blinking LED on the data acquisition system, notifying some access to the device
-on P233MMX and NOT on PIII500, once the module is loaded, these accidental accesses are actually forbidden. This produces, on PIII500, fake dataIs there any remarkable difference in resource reservation between these two kernels or it is due to some hardware difference? I tried to look at
include/linux/ioport.handkernel/resource.cbut I could not notice any difference.Thank you
Antonino Sergi
Quoted 36 lines · Maciej W. Rozycki
Quoted 8 lines · Antonino Sergi
Quoted 6 lines
Because you are trying to use the region in the I/O port space. That's
probably not what you want to do and an 8-bit ISA board cannot decode it at all anyway. Actually for some platforms using the I/O space outside the low 16-bit range may be quite difficult even for buses and devices that support it and Linux does not support it then, either. So Linux correctly informs you you cannot use that range.This is actually not clear for me.
The port I/O space range differs among platforms. You get
-EBUSYin a
response to a request for a range of ports outside the supported range.Quoted 8 lines
Quoted 2 lines
... or better yet request_mem_region()/release_resource(), as the former
is deprecated and will be removed.I tried but (on 2.4.2):
-request_regionfails but, ignoring it and remapping physical address to virtual, everything works fine, except forrelease_region, of course.
-request_mem_regionworks but what I get from communication with the actual device are numbers that sometimes are surely wrong.As both
request_region()andrequest_mem_region()merely reserve
different resources in Linux structures, you can't get a different behavior from your device depending on which one you call, if any at all, unless you change code elsewhere at the same time.Quoted 2 lines
I couldn't understand what is the actual difference between
ioport_resourceandiomem_resourceto track the problem.The former holds I/O resources mapped in the port space, whilst the
latter holds ones mapped in the memory space. The spaces use different cycles each at the bus the destined device is located on.Maciej