evaluating boolean kernel param

devzero at web.de devzero at web.de
Mon Nov 25 18:18:26 EST 2013


Hello, 

regarding https://bugs.launchpad.net/baltix/+bug/930447 i´m trying to make a simple and tiny
kernel patch which let`s you add "fixpae" to the kernel commandline. 

i`m a rather bad programmer and do not really have a clue about kernel programming, but i think 
trying to fix this issue at the kernel level, to be included at least in distro`s kernel who ship 
only pae enabled kernels nowadays is a good approach and chances for inclusion are high - so i 
thought i give it a try.

the mentioned param should

1. make validate_cpu() call being skipped in arch/x86/boot/main.c
2. add "pae" string to the flags line in /proc/cpuinfo

The first one was easy - just add one if/else with cmdline_find_option_bool("fixpae") and you´re 
done. That one actually works, forcing the kernel to boot instead of stopping with a message about
missing pae support (which is wrong on some cpu`s).

The second one seems a little bit more difficult, i find no example (one that i understand) how 
to parse a boolean kernel commandline option at "non early boot stage". 

It seems i cannot use the early commandline parser, so how is that being done in arch/x86/kernel/cpu/proc.c ?

regards
roland
 




More information about the Kernelnewbies mailing list