Changeset View
Changeset View
Standalone View
Standalone View
sys/kern/subr_param.c
Show First 20 Lines • Show All 110 Lines • ▼ Show 20 Lines | |||||
int vm_guest = VM_GUEST_NO; /* Running as virtual machine guest? */ | int vm_guest = VM_GUEST_NO; /* Running as virtual machine guest? */ | ||||
u_long maxtsiz; /* max text size */ | u_long maxtsiz; /* max text size */ | ||||
u_long dfldsiz; /* initial data size limit */ | u_long dfldsiz; /* initial data size limit */ | ||||
u_long maxdsiz; /* max data size */ | u_long maxdsiz; /* max data size */ | ||||
u_long dflssiz; /* initial stack size limit */ | u_long dflssiz; /* initial stack size limit */ | ||||
u_long maxssiz; /* max stack size */ | u_long maxssiz; /* max stack size */ | ||||
u_long sgrowsiz; /* amount to grow stack */ | u_long sgrowsiz; /* amount to grow stack */ | ||||
enum firmware_types | |||||
firmware_type = FW_NONE; /* firmware which is booting system */ | |||||
SYSCTL_INT(_kern, OID_AUTO, hz, CTLFLAG_RDTUN | CTLFLAG_NOFETCH, &hz, 0, | SYSCTL_INT(_kern, OID_AUTO, hz, CTLFLAG_RDTUN | CTLFLAG_NOFETCH, &hz, 0, | ||||
"Number of clock ticks per second"); | "Number of clock ticks per second"); | ||||
SYSCTL_INT(_kern, OID_AUTO, nbuf, CTLFLAG_RDTUN | CTLFLAG_NOFETCH, &nbuf, 0, | SYSCTL_INT(_kern, OID_AUTO, nbuf, CTLFLAG_RDTUN | CTLFLAG_NOFETCH, &nbuf, 0, | ||||
"Number of buffers in the buffer cache"); | "Number of buffers in the buffer cache"); | ||||
SYSCTL_INT(_kern, OID_AUTO, nswbuf, CTLFLAG_RDTUN | CTLFLAG_NOFETCH, &nswbuf, 0, | SYSCTL_INT(_kern, OID_AUTO, nswbuf, CTLFLAG_RDTUN | CTLFLAG_NOFETCH, &nswbuf, 0, | ||||
"Number of swap buffers"); | "Number of swap buffers"); | ||||
SYSCTL_INT(_kern, OID_AUTO, msgbufsize, CTLFLAG_RDTUN | CTLFLAG_NOFETCH, &msgbufsize, 0, | SYSCTL_INT(_kern, OID_AUTO, msgbufsize, CTLFLAG_RDTUN | CTLFLAG_NOFETCH, &msgbufsize, 0, | ||||
"Size of the kernel message buffer"); | "Size of the kernel message buffer"); | ||||
Show All 36 Lines | VM_LAST, | ||||
[VM_LAST] = NULL | [VM_LAST] = NULL | ||||
} | } | ||||
}; | }; | ||||
SYSCTL_PROC(_kern, OID_AUTO, vm_guest, | SYSCTL_PROC(_kern, OID_AUTO, vm_guest, | ||||
CTLFLAG_RD | CTLTYPE_STRING | CTLFLAG_MPSAFE, | CTLFLAG_RD | CTLTYPE_STRING | CTLFLAG_MPSAFE, | ||||
__DECONST(void *, &vm_guest_sysctl_params), 0, sysctl_enum_proc, "A", | __DECONST(void *, &vm_guest_sysctl_params), 0, sysctl_enum_proc, "A", | ||||
"Virtual machine guest detected?"); | "Virtual machine guest detected?"); | ||||
/* | |||||
* Parameters for the firmware_type enum | |||||
*/ | |||||
static const struct sysctl_enum_params bootmethod_sysctl_params = { | |||||
&firmware_type, | |||||
FW_LAST, | |||||
{ | |||||
[FW_BIOS] = "BIOS", | |||||
[FW_LINUXABI] = "LinuxABI", | |||||
[FW_NONE] = "", | |||||
[FW_UEFI] = "UEFI", | |||||
[FW_XEN] = "XEN", | |||||
[FW_LAST] = NULL | |||||
} | |||||
}; | |||||
ehem_freebsd_m5p.com: Note, this is matches the previous version of D32132. Current version of D32132 changes this… | |||||
SYSCTL_PROC(_machdep, OID_AUTO, bootmethod, | |||||
CTLFLAG_RD | CTLTYPE_STRING | CTLFLAG_MPSAFE, | |||||
__DECONST(void *, &bootmethod_sysctl_params), 0, sysctl_enum_proc, "A", | |||||
"System firmware boot method"); | |||||
/* | /* | ||||
* Boot time overrides that are not scaled against main memory | * Boot time overrides that are not scaled against main memory | ||||
*/ | */ | ||||
void | void | ||||
init_param1(void) | init_param1(void) | ||||
{ | { | ||||
▲ Show 20 Lines • Show All 175 Lines • Show Last 20 Lines |
Note, this is matches the previous version of D32132. Current version of D32132 changes this slightly, but I'm unsure whether that slightly more advanced version will be accepted or not, so presently I'm leaving this alone.