32 bit driver in 64 bit kernel

32 bit driver in 64 bit kernel

Post by rajakumar.badr » Thu, 29 Jul 1999 04:00:00



Hi,
I have 32 bit Adapter Driver, but I am using Sun solaries new 64bit
OS.  So this driver is not working.  Is there any way to tell OS to
load this 32bit driver?

Thanks,
Raja

 
 
 

32 bit driver in 64 bit kernel

Post by Casper H.S. Dik - Network Security Engine » Sun, 01 Aug 1999 04:00:00


[[ PLEASE DON'T SEND ME EMAIL COPIES OF POSTINGS ]]


>I have 32 bit Adapter Driver, but I am using Sun solaries new 64bit
>OS.  So this driver is not working.  Is there any way to tell OS to
>load this 32bit driver?

No, the 64 bit OS cannot load 32 bit drivers.  (How would a 32 bit driver
stuff a 64 bit kmem_alloc() return value in a 32 bit * variable)?

Casper
--
Expressed in this posting are my opinions.  They are in no way related
to opinions held by my employer, Sun Microsystems.
Statements on Sun products included here are not gospel and may
be fiction rather than truth.

 
 
 

32 bit driver in 64 bit kernel

Post by Peter Seeba » Sun, 01 Aug 1999 04:00:00





>>I have 32 bit Adapter Driver, but I am using Sun solaries new 64bit
>>OS.  So this driver is not working.  Is there any way to tell OS to
>>load this 32bit driver?
>No, the 64 bit OS cannot load 32 bit drivers.  (How would a 32 bit driver
>stuff a 64 bit kmem_alloc() return value in a 32 bit * variable)?

Well, the OS could magically know that some drivers are 32-bit, and try
to reserve space for them in a region they understand...

-s
--

C/Unix wizard, Pro-commerce radical, Spam fighter.  Boycott Spamazon!
Will work for interesting hardware.  http://www.plethora.net/~seebs/
Visit my new ISP <URL:http://www.plethora.net/> --- More Net, Less Spam!

 
 
 

32 bit driver in 64 bit kernel

Post by Casper H.S. Dik - Network Security Engine » Wed, 04 Aug 1999 04:00:00


[[ PLEASE DON'T SEND ME EMAIL COPIES OF POSTINGS ]]





>>>I have 32 bit Adapter Driver, but I am using Sun solaries new 64bit
>>>OS.  So this driver is not working.  Is there any way to tell OS to
>>>load this 32bit driver?
>>No, the 64 bit OS cannot load 32 bit drivers.  (How would a 32 bit driver
>>stuff a 64 bit kmem_alloc() return value in a 32 bit * variable)?
>Well, the OS could magically know that some drivers are 32-bit, and try
>to reserve space for them in a region they understand...

Then a 64 bit process would perform a ioctl, passing a 64 bit (userland)
pointer to the 32 bit driver; and what to do on really big kernels were
you may run out of memory with 32 bits of zero at the front?

Not to mention the fact that you need to duplicate nearly all kernel
functions that are usable by drivers; have 32 bit and 64 bit version.
Map between 32 bit and 64 bit versions of public system structures (there
should be relatively few of those)

Casper
--
Expressed in this posting are my opinions.  They are in no way related
to opinions held by my employer, Sun Microsystems.
Statements on Sun products included here are not gospel and may
be fiction rather than truth.

 
 
 

32 bit driver in 64 bit kernel

Post by Peter Seeba » Wed, 04 Aug 1999 04:00:00





>>Well, the OS could magically know that some drivers are 32-bit, and try
>>to reserve space for them in a region they understand...
>Then a 64 bit process would perform a ioctl, passing a 64 bit (userland)
>pointer to the 32 bit driver; and what to do on really big kernels were
>you may run out of memory with 32 bits of zero at the front?

On those really big kernls, as noted, you reserve space in the 32-bit
region.

In other words, you do what i386 people have done for ISA cards for years;
bounce buffers.

It sucks, but it *could be made to work*.

Quote:>Not to mention the fact that you need to duplicate nearly all kernel
>functions that are usable by drivers; have 32 bit and 64 bit version.
>Map between 32 bit and 64 bit versions of public system structures (there
>should be relatively few of those)

Awful, isn't it?

I'd tend to agree, you're probably better off just telling the driver writers
they lose.  However, the users of devices for which there are only 32-bit
drivers are better off if they work slowly than if they don't work at all.

-s
--

C/Unix wizard, Pro-commerce radical, Spam fighter.  Boycott Spamazon!
Will work for interesting hardware.  http://www.plethora.net/~seebs/
Visit my new ISP <URL:http://www.plethora.net/> --- More Net, Less Spam!

 
 
 

32 bit driver in 64 bit kernel

Post by Bruce Adle » Wed, 04 Aug 1999 04:00:00



Quote:> In other words, you do what i386 people have done for ISA cards for years;
> bounce buffers.

That's not an appropriate analogy. On a i386 ISA system all the user
code and all the kernel code is ILP-32. The only time 24-bit (or 16-bit)
pointers come into play is for ISA adapters which support bus-mastering DMA.
In that situation only the *physical* memory addresses that are actually
passed to the adapters DMA engine need to "re-mapped" to the bounce buffers.
That's such a narrow requirement that it can be handled almost transparently
by the x86 kernel's existing DMA page translation (ALL x86 I/O is done
via physical addresses because x86 systems don't support DVMA). In other
words writing a driver for a bus-mastering ISA adapter is no harder or
different than writing a driver for a 32-bit EISA or 32-bit PCI
bus-mastering adapter.

Quote:> It sucks, but it *could be made to work*.

It not only sucks, it blows chunks. I'm not a Windows expert, but I
understand that even with the *huge* amounts of 16-bit application
compatibility *builtin to Win9x and NT, I don't think
either of those systems support 16-bit kernel mode device drivers.
 
 
 

32 bit driver in 64 bit kernel

Post by Mark A. Crampto » Fri, 06 Aug 1999 04:00:00


Yeh, it would basically suck.  But why does Sun have the 64 bit support
bit integrated in initializing an FS driver?!?  Hum.  Damn.  Sorry to
ruin your theory, Casper.  You already do it by making us 3rd party guys
say if we are 32 or 64 bit compliant in an FS.  (I know you are just
being helpful, and I always read your messages, and that your word here
is not "official", but I had to bring it up.)

(I totally agree with the "let's cut it off here (i.e. 64 vs 32)"
concept, but this issue is interesting and _deserves_ attention.)

Mark

 
 
 

32 bit driver in 64 bit kernel

Post by Casper H.S. Dik - Network Security Engine » Sat, 14 Aug 1999 04:00:00


[[ PLEASE DON'T SEND ME EMAIL COPIES OF POSTINGS ]]


Quote:>Yeh, it would basically suck.  But why does Sun have the 64 bit support
>bit integrated in initializing an FS driver?!?  Hum.  Damn.  Sorry to
>ruin your theory, Casper.  You already do it by making us 3rd party guys
>say if we are 32 or 64 bit compliant in an FS.  (I know you are just
>being helpful, and I always read your messages, and that your word here
>is not "official", but I had to bring it up.)

Those are different 64 bit issues: 64 bit filesystems is for supporting
large files; that's something entirely orthogonal to having a 32 bit or
64 bit kernel address space.

I.e., you only tell whether you can acept 64 bit file offsets; not whether
you can handle 64 bit kmem_alloc() return values or 64 bit parameters.

It is possible to call 32 bit code from 64 bit code and vice versa, with some
glue.  However, you will need to restrict the 64 bit code to the lower
4GB of the address space.  And then, what's point in running a 64 bit kernel?
Just boot the 32 bit kernel instead (all 64bit bootable UltraSPARC systems
automatically support booting a 32bit kernel; it comes for free)

Casper
--
Expressed in this posting are my opinions.  They are in no way related
to opinions held by my employer, Sun Microsystems.
Statements on Sun products included here are not gospel and may
be fiction rather than truth.

 
 
 

1. performance of runing 32/64 bit program in 64 bit kernel.

Hi,

After I have installed solaris 9, I have boot solaris 9 as 64-bit kernel
bash-2.05# isainfo -b
64
boot-file=kernel/sparcv9/unix

Howerver, I found that most of the programs in 32bit.
bash-2.05# file /usr/bin/ls
/usr/bin/ls:    ELF 32-bit MSB executable SPARC Version 1, dynamically
linked, stripped

So, I am bit confused here. For example, if I try to download ncurses5.2
, should I compile it as 32 bit or 64 bit?
would 32bit programs running in 64bit kernel will make performance
slower/faster ? If so, should I fall back to the  32 bit kernel ?

many thankx

cheers,
andrew.

2. How do you download with ftp

3. SBus-based drivers (32-bit vs 64-bit Solais Kernels)

4. NTFS 2.0.7c for Linux 2.4.18

5. How 32 bit driver can be ported to 64 bit driver?

6. help on cdrom drive and Toshiba Tecra500CDT

7. 64-bit kernel vs. 32-bit kernel

8. Problems with UCD mpeg_encode!!!

9. Upgrading from 32-Bit Sparc-Kernel to 64-Bit sparcv9-Kernel??

10. Can I downgrade 64-bit kernel to 32-bit kernel

11. Solaris 9 installed with 32 & 64 bit supports but boots in 32 bit mode

12. 32 bits drivers on 64 bits solaris

13. Packaging 32-bit and 64-bit Drivers