Thanks for the clarification.
Since the CoLinux kernel is running in ring zero, trying to get a 32-bit
linux kernel to run on 64-bit windows doesn't really make sense. In fact,
I'm not sure it is possible. As I said, I don't believe the x64 processors
support running 32-bit code in ring zero when they're running a 64-bit OS.
I do believe that a full 64-bit port (i.e. 64-bit linux running in 64-bit
windows) would be worthwhile. It seems to me one of the biggest limitations
of CoLinux is a lack of available RAM. On a 32-bit machine where you have a
max of 4GB (only 3GB for WinXP SP2 :( ) there just isn't very much RAM to go
around. On a 64-bit machinewhere you can have a max of 64GB of RAM, it
becomes practical to have several instances of CoLinux running where each
one can have several GB or RAM assigned to it.
I haven't looked at the Win64 DDK, but it would not surprise me if the
device driver model hasn't changed very much, and the port could involve
some fairly simple changes. This certainly is the case for user apps where
it is easy to write source code that compiles for both targets. However, as
I said, I haven't looked at the DDK, so I could be way off base here.
> -----Original Message-----
> From: colinux-devel-bounces@... [mailto:colinux-devel-
> bounces@...] On Behalf Of Henry Nestler
> Sent: Thursday, August 03, 2006 2:04 PM
> To: Daniel Slater
> Cc: colinux-devel@...
> Subject: Re: [coLinux-devel] x64 version of CoLinux
> Daniel Slater wrote:
> > I thought the linux kernel ran in ring 3 inside the colinux_daemon.exe
> > linux.sys just provided system services. If the linux kernel is indeed
> > running in ring 0, then it would have to be a 64-bit version as the x64
> > processor doesn't support 32-bit code executing in ring 0.
> > So if the linux kernel runs in ring 0, then what does
> > do? Also, how does the windows kernel keep control of context switches?
> The Linux Kernel runs in ring 0.
> The Windows driver linux.sys runs also in ring 0 and is the switcher
> between linux and windows.
> colinux-daemon is a loader for linux kernel file "vmlinux", a monitor
> and the control panel for all the other stuff to manage the other
> daemons (netware, console). Colinux-daemon starts the other daemons. If
> linux reports an idle state, linux goes back to windows (over linux.sys)
> and reports this to the colinux-daemon.
> Windows does not control the linux. The colinux-daemon starts a special
> ioctl in the linux.sys, and this switch than to coLinux. From the
> windows side, windows accounts the usage-time on this device to the
> program colinux.exe, but this isn't right. The linux.sys is the running
> linux kernel and from this runs the Linux user programs.
> About 64 bit:
> To support 64bit driver for 32bit linux, need many new functions to call
> the windows DDK. Than the switcher code need to rewrite to switch from
> 64bit to 32bit, and save all the 64bit registers. On switching back
> from 32 bit to 64 bit the linux.sys need to restore *all* registers.
> The other problem is, that the physical memory is shared between linux
> and windows. In fact, linux.sys allocate some memory pages and give
> that pages as pseudo physical memory to the linux kernel. This special
> code is hard to change, you need to know many about windows internals
> (DDK), linux kernel memory handling and the CPU typical memory accessing
> (MMU, PAE, virtual page tables, and many more).
> Henry Nestler
> Take Surveys. Earn Cash. Influence the Future of IT
> Join SourceForge.net's Techsay panel and you'll get the chance to share
> opinions on IT & business topics through brief surveys -- and earn cash
> coLinux-devel mailing list