[RFC] Win32 port of the userspace tools using MinGW.

Jamey Sharp jamey at thetovacompany.com
Fri May 23 18:13:12 EDT 2008


On Thu, May 22, 2008 at 6:34 AM, Bernhard Walle <bwalle at suse.de> wrote:
> * Jamey Sharp <jamey at thetovacompany.com> [2008-05-15 22:48]:
>> OK, I haven't quite gotten around to posting the Windows kernel driver
>> source that goes with this.
>
> Do you plan to release the driver sources?

Yes, and I've finally done so. The code I wrote is licensed under GPLv2
or later; some Linux kernel source is included verbatim or with
modifications, and is licensed accordingly.
    http://source.thetovacompany.com/kexec-win/

I've only tried cross-compiling this code from Linux. In principle it
should build with MinGW on Windows as well, if anyone cares. :-)

My versions of machine_kexec_32.c and relocate_kernel_32.S have some
changes. I've been trying to find time to propose them as patches to
Linux kexec, but I've been waiting until I could test them, which hasn't
happened yet. I started from Linux v2.6.25 if anyone cares to diff them.

The load_kimage function in kexec.c is roughly equivalent to
sys_kexec_load in Linux but with a lot less code. It doesn't handle the
possibility of being allocated pages at addresses that won't fit in an
unsigned long. But I think it handles everything else that Linux does,
with less complexity. I'd really like to get review on that, and see if
something like my algorithm should go into the Linux implementation too.

>> +
>> +     if(memory_range)
>> +     {
>> +             *range = memory_range;
>> +             *ranges = memory_ranges;
>> +             return 0;
>> +     }
>
> I think you should use the kernel coding style here, i.e. the '{' in
> the same line as the 'if'.

I assume you mean I should use kernel style throughout, not just in the
quoted bit. :-) Sure, I can do that. I was hoping for more feedback than
just code style though. :-)

Jamey



More information about the kexec mailing list