NetBSD-Users archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: Install i386 or amd64?



On Mon, Feb 03, 2014 at 02:55:51PM +0100, Ottavio Caruso wrote:
> 
> 1) If Wine requires kernel support that is only available on i386, how
> would a /compat/i386 solve the problem?
> 

It won't.  I believe the main blocker is still the handling of GDT/LDT in
the kernel.  Before I get accused of being cryptic (again) these are
special hardware tables to do with mapping of memory, wine uses them to
map things as they are in windows - these tables are different on amd64
hence the issue.

> 2) Wouldn't there be then two layers of emulation, ie 64 to 32, and 32
> to Windows? Is it worth the pain?
> 

It doesn't quite work that way.  Event emulating 32bit netbsd on 64bit
netbsd really just makes calls to the underlying 64bit kernel functions
it is just that care is taken to ensure that all the return values going
back to the 32bit application are valid.  Technically, wine does pretty
much the same thing, it is what is called a call-gate emulator.  Windows
system calls are "mapped" (in very loose terms) onto the underlying unix
equivalents with a bunch of glue code so that from a system call level
things look like the standard windows API, close enough that a windows
application can use that API and mostly correct things happen.

-- 
Brett Lymn
Staple Guns: because duct tape doesn't make that KerCHUNK sound - xkcd.com


Home | Main Index | Thread Index | Old Index