Port-i386 archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: Adding 'i386_use_pae' variable, and expose it through sysctl



On Sun, 15 Aug 2010, Jean-Yves Migeon wrote:

Hi list,

Would it be acceptable to add a "pae" sysctl variable to machdep subtree
for i386, including Xen?

To handle the kernel correctly through kvm(3), I need to figure out
whether it was using PAE at the time of the dump.

So I would like to add an "i386_use_pae" global variable, and
preferably, expose it through sysctl(3) for convenience (attempting to
find out if the booted kernel uses PAE is not quite straightforward
currently).

Patch attached. Ok to commit?

@@ -463,6 +464,7 @@ void x86_bus_space_mallocok(void);
 #define        CPU_TMLR_VOLTAGE        13      /* int: curret voltage */
 #define        CPU_TMLR_PERCENTAGE     14      /* int: current clockpercentage 
*/
 #define        CPU_MAXID               15      /* number of valid machdep ids 
*/
+#define        CPU_PAE                 16      /* int: OS uses PAE mode */


Shouldn't these last two values be reversed?

 #define        CPU_TMLR_VOLTAGE        13      /* int: curret voltage */
 #define        CPU_TMLR_PERCENTAGE     14      /* int: current clockpercentage 
*/
-#define        CPU_MAXID               15      /* number of valid machdep ids 
*/
+#define        CPU_PAE                 15      /* int: OS uses PAE mode */
+#define        CPU_MAXID               16      /* number of valid machdep ids 
*/


-------------------------------------------------------------------------
| Paul Goyette     | PGP Key fingerprint:     | E-mail addresses:       |
| Customer Service | FA29 0E3B 35AF E8AE 6651 | paul at whooppee.com    |
| Network Engineer | 0786 F758 55DE 53BA 7731 | pgoyette at juniper.net |
| Kernel Developer |                          | pgoyette at netbsd.org  |
-------------------------------------------------------------------------


Home | Main Index | Thread Index | Old Index