On 2015-11-24 at 17:02 Barret Rhoden <[email protected]> wrote:
> With #vars, you can specify certain global variables, such as
> num_cores, to be exposed to userspace. 

I opted for a mix of some of the ideas in this thread.  Here's the
basics:

 * #vars device, exports read access to select kernel variables.  These
 * variables are statically set.
 *
 * To add a variable, add a DEVVARS_ENTRY(name, format) somewhere in the 
kernel.  
 * The format is a string consisting of two characters, using a modified 
version  
 * of QEMU's formatting rules (ignoring count): [data_format][size]
 *
 * data_format is:
 *      x (hex)
 *      d (decimal)
 *      u (unsigned)
 *      o (octal)
 *      c (char)            does not need a size
 *      s (string)          does not need a size
 * size is:
 *      b (8 bits)
 *      h (16 bits)
 *      w (32 bits)
 *      g (64 bits)
 *
 * e.g. DEVVARS_ENTRY(num_cores, "dw");

I'll play around with adding files before sending the revised patches
out.

Barret

-- 
You received this message because you are subscribed to the Google Groups 
"Akaros" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to