[lkml]   [2009]   [Dec]   [6]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: Kexec failure on RDC (and possibly other early x86) platforms
On 12/06/2009 01:33 PM, bifferos wrote:
> I've updated the patch to allow Kexec to work on RDC platforms
> here:
> I'm curious as to how one can detect the presence of the CR4
> register in assembler, as I'm sure it's possible, but I've just
> #ifndefed out the offending instruction in this patch and it
> seems to work with this change.

One way is to execute the instruction and trap the #UD exception if it
is not supported. Not sure whether you have an IDT set up or whether
your cpu traps on mov cr4.

If your cpu supports cpuid you can test for features that indicate bits
in cr4 are available, for example VME, DE, PSE, PVI, and PAE. If none
are available you likely don't have cr4 (and even if you do, it's
pointless to reset it).

error compiling committee.c: too many arguments to function

 \ /
  Last update: 2009-12-06 17:55    [W:0.033 / U:16.276 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site