freebsd-dev/sys/kern
Warner Losh 52379d36a9 Create helper functions for parsing boot args.
boot_parse_arg		to parse a single arg
boot_parse_cmdline	to parse a command line string
boot_parse_args		to parse all the args in a vector
boot_howto_to_env	Convert howto bits to env vars
boot_env_to_howto	Return howto mask mased on what's set in the environment.

All these routines return an int that's the bitmask of the args
translated to RB_* flags. As a special case, the 'S' flag sets the
comconsole_speed env var. Any arg that looks like a=b will set the env
key 'a' to value 'b'. If =b is omitted, 'a' is set to '1'.  This
should help us reduce the number of redundant copies of these routines
in the tree.  It should also give a more uniform experience between
platforms.

Also, invent a new flag RB_PROBE that's set when 'P' is parsed.  On
x86 + BIOS, this means 'probe for the keyboard, and if it's not there
set both RB_MULTIPLE and RB_SERIAL (which means show the output on
both video and serial consoles, but make serial primary).  Others it
may be some similar concept of probing, but it's loader dependent
what, exactly, it means.

These routines are suitable for /boot/loader and/or the kernel,
though they may not be suitable for the tightly hand-rolled-for-space
environments like boot2.

Sponsored by: Netflix
Differential Revision: https://reviews.freebsd.org/D16205
2018-07-13 16:43:05 +00:00
..
bus_if.m
capabilities.conf Name the implementation of brk and sbrk sys_break(). 2018-06-14 21:27:25 +00:00
clock_if.m
cpufreq_if.m
device_if.m
genassym.sh
genoffset.c make critical_{enter, exit} inline 2018-07-03 01:55:09 +00:00
genoffset.sh expose thread_lite definition to tied modules 2018-07-03 02:50:07 +00:00
imgact_aout.c
imgact_binmisc.c
imgact_elf32.c
imgact_elf64.c
imgact_elf.c Correct pointer subtraction in KASSERT(). 2018-05-29 17:49:03 +00:00
imgact_gzip.c
imgact_shell.c
inflate.c
init_main.c With the introduction of reapers and reaplists in r275800, 2018-07-05 16:16:28 +00:00
init_sysent.c Regen after r336171. 2018-07-10 14:04:52 +00:00
kern_acct.c
kern_alq.c
kern_clock.c Create a new macro for static DPCPU data. 2018-07-05 17:13:37 +00:00
kern_clocksource.c Create a new macro for static DPCPU data. 2018-07-05 17:13:37 +00:00
kern_condvar.c
kern_conf.c
kern_cons.c add support for console resuming, implement it for uart, use on x86 2018-05-29 16:16:24 +00:00
kern_context.c
kern_cpu.c Introduce PMCR-based cpufreq(4) driver, for IBM POWER8 and POWER9 systems 2018-06-21 14:26:43 +00:00
kern_cpuset.c kern_cpuset: fix small leak on error path 2018-05-26 14:23:11 +00:00
kern_ctf.c
kern_descrip.c fd: stop passing M_ZERO to uma_zalloc 2018-07-12 22:48:18 +00:00
kern_dtrace.c
kern_dump.c
kern_environment.c kern_environment: Give the static environment a chance to disable MD env 2018-07-12 02:51:50 +00:00
kern_et.c
kern_event.c
kern_exec.c Round down the location of execpathp to slightly improve copyout speed. 2018-07-13 11:32:27 +00:00
kern_exit.c
kern_fail.c
kern_ffclock.c
kern_fork.c fork: avoid endless wait with PTRACE_FORK and RFSTOPPED. 2018-06-21 21:12:49 +00:00
kern_hhook.c
kern_idle.c
kern_intr.c Yank crufty INTR_FILTER option 2018-05-24 17:06:00 +00:00
kern_jail.c Change prison_add_vfs() to the more generic prison_add_allow(), which 2018-07-06 18:50:22 +00:00
kern_khelp.c
kern_kthread.c hwpmc: log name->pid, name->tid mappings 2018-06-05 04:26:40 +00:00
kern_ktr.c
kern_ktrace.c
kern_linker.c
kern_lock.c
kern_lockf.c
kern_lockstat.c
kern_loginclass.c
kern_malloc.c Make UMA and malloc(9) return non-executable memory in most cases. 2018-06-13 17:04:41 +00:00
kern_mbuf.c
kern_mib.c
kern_module.c
kern_mtxpool.c
kern_mutex.c Remove an unused argument to turnstile_unpend. 2018-06-02 22:37:53 +00:00
kern_ntptime.c
kern_osd.c
kern_physio.c
kern_pmc.c hwpmc: simplify calling convention for hwpmc interrupt handling 2018-06-08 04:58:03 +00:00
kern_poll.c
kern_priv.c
kern_proc.c Add a way for the process to request cleanup of the kernel cache of 2018-07-04 13:22:48 +00:00
kern_procctl.c
kern_prot.c
kern_racct.c
kern_rangelock.c
kern_rctl.c
kern_resource.c
kern_rmlock.c Remove an unused argument to turnstile_unpend. 2018-06-02 22:37:53 +00:00
kern_rwlock.c Remove an unused argument to turnstile_unpend. 2018-06-02 22:37:53 +00:00
kern_sdt.c
kern_sema.c
kern_sendfile.c Revert second chunk of r333860. The warning from gcc is false positive. The 2018-05-29 21:45:15 +00:00
kern_sharedpage.c
kern_shutdown.c
kern_sig.c Add description to debug.ncores sysctl. 2018-07-04 17:06:51 +00:00
kern_switch.c make critical_{enter, exit} inline 2018-07-03 01:55:09 +00:00
kern_sx.c
kern_synch.c
kern_syscalls.c
kern_sysctl.c Permit the kernel environment to set an array of numeric values for a single 2018-06-20 20:04:20 +00:00
kern_tc.c Create a new macro for static DPCPU data. 2018-07-05 17:13:37 +00:00
kern_thr.c Don't acquire evclass_lock with a spinlock held 2018-07-11 19:38:42 +00:00
kern_thread.c Don't acquire evclass_lock with a spinlock held 2018-07-11 19:38:42 +00:00
kern_time.c Improve the accuracy of the POSIX "process CPU-time" clocks by adding the 2018-06-22 10:23:32 +00:00
kern_timeout.c
kern_tslog.c
kern_umtx.c
kern_uuid.c
kern_xxx.c
ksched.c
link_elf_obj.c link_elf_obj: correct an error message 2018-05-30 12:55:27 +00:00
link_elf.c Use M_EXEC when calling malloc() to allocate the memory to store the module, 2018-06-14 23:10:10 +00:00
linker_if.m
Make.tags.inc
Makefile
makesyscalls.sh makesyscalls: simplify capenabled pipeline 2018-06-11 18:57:40 +00:00
md4c.c
md5c.c
msi_if.m
p1003_1b.c
pic_if.m
posix4_mib.c
sched_4bsd.c Create a new macro for static DPCPU data. 2018-07-05 17:13:37 +00:00
sched_ule.c Create a new macro for static DPCPU data. 2018-07-05 17:13:37 +00:00
serdev_if.m
stack_protector.c
subr_acl_nfs4.c
subr_acl_posix1e.c
subr_autoconf.c
subr_blist.c
subr_boot.c Create helper functions for parsing boot args. 2018-07-13 16:43:05 +00:00
subr_bufring.c
subr_bus_dma.c
subr_bus.c remove unneeded inclusion of sys/interrupt.h from several files 2018-07-04 09:07:18 +00:00
subr_busdma_bufalloc.c
subr_capability.c
subr_clock.c
subr_compressor.c
subr_counter.c Fix pre-SI_SUB_CPU initialization of per-CPU counters. 2018-07-10 00:18:12 +00:00
subr_devmap.c Add pmap_mapdev_attr for arm64 2018-06-20 16:07:35 +00:00
subr_devstat.c
subr_disk.c Implement a 'car limit' for bioq. 2018-06-13 16:48:07 +00:00
subr_dummy_vdso_tc.c
subr_epoch.c epoch(9): simplify initialization 2018-07-06 06:20:03 +00:00
subr_eventhandler.c
subr_fattime.c
subr_firmware.c
subr_gtaskqueue.c iflib: mark irq allocation name parameter as constant 2018-05-29 21:56:39 +00:00
subr_hash.c
subr_hints.c subr_hints: Skip static_env and static_hints if they don't contain hints 2018-07-10 00:36:37 +00:00
subr_intr.c
subr_kdb.c Instead of using hand-rolled loops where not needed switch them 2018-06-20 11:42:06 +00:00
subr_kobj.c
subr_lock.c
subr_log.c
subr_mchain.c
subr_module.c
subr_msgbuf.c
subr_param.c
subr_pcpu.c Create a new macro for static DPCPU data. 2018-07-05 17:13:37 +00:00
subr_pctrie.c
subr_pidctrl.c When pidctrl_daemon() is called multiple times within an interval, it 2018-06-07 07:48:50 +00:00
subr_power.c
subr_prf.c
subr_prof.c ANSIfy sys/kern 2018-06-01 13:26:45 +00:00
subr_rman.c
subr_rtc.c
subr_sbuf.c
subr_scanf.c
subr_sfbuf.c
subr_sglist.c
subr_sleepqueue.c
subr_smp.c
subr_stack.c
subr_syscall.c
subr_taskqueue.c
subr_terminal.c
subr_trap.c hwpmc: support sampling both kernel and user stacks when interrupted in kernel 2018-06-04 01:10:23 +00:00
subr_turnstile.c Remove an unused argument to turnstile_unpend. 2018-06-02 22:37:53 +00:00
subr_uio.c
subr_unit.c
subr_vmem.c Make UMA and malloc(9) return non-executable memory in most cases. 2018-06-13 17:04:41 +00:00
subr_witness.c convert inpcbinfo hash and info rwlocks to epoch + mutex 2018-06-19 01:54:00 +00:00
sys_capability.c
sys_generic.c
sys_getrandom.c
sys_pipe.c ANSIfy sys/kern 2018-06-01 13:26:45 +00:00
sys_procdesc.c
sys_process.c Update proc->p_ptevents annotation to reflect the actual locking. 2018-06-21 21:07:25 +00:00
sys_socket.c
syscalls.c Regen after r336171. 2018-07-10 14:04:52 +00:00
syscalls.master Get rid of netbsd_lchown and netbsd_msync syscall entries. 2018-07-10 13:32:04 +00:00
systrace_args.c Regen after r336171. 2018-07-10 14:04:52 +00:00
sysv_ipc.c
sysv_msg.c ANSIfy sys/kern 2018-06-01 13:26:45 +00:00
sysv_sem.c
sysv_shm.c
tty_compat.c
tty_info.c
tty_inq.c
tty_outq.c
tty_pts.c
tty_tty.c
tty_ttydisc.c
tty.c Revert r335995 due to accidental changes snuck in 2018-07-05 16:28:43 +00:00
uipc_accf.c
uipc_debug.c Load balance sockets with new SO_REUSEPORT_LB option. 2018-06-06 15:45:57 +00:00
uipc_domain.c
uipc_mbuf2.c
uipc_mbuf.c
uipc_mbufhash.c
uipc_mqueue.c
uipc_sem.c
uipc_shm.c
uipc_sockbuf.c This commit brings in a new refactored TCP stack called Rack. 2018-06-07 18:18:13 +00:00
uipc_socket.c Use uintptr_t alone when assigning to kvaddr_t variables. 2018-07-10 13:03:06 +00:00
uipc_syscalls.c
uipc_usrreq.c Use uintptr_t alone when assigning to kvaddr_t variables. 2018-07-10 13:03:06 +00:00
vfs_acl.c
vfs_aio.c
vfs_bio.c Avoid completing I/O when dumping core after a panic. 2018-06-01 23:49:32 +00:00
vfs_cache.c Sometimes it is helpful to get the path for a vnode. 2018-06-20 08:34:29 +00:00
vfs_cluster.c ANSIfy sys/kern 2018-06-01 13:26:45 +00:00
vfs_default.c
vfs_export.c Switch RIB and RADIX_NODE_HEAD lock from rwlock(9) to rmlock(9). 2018-06-16 08:26:23 +00:00
vfs_extattr.c
vfs_hash.c
vfs_init.c
vfs_lookup.c
vfs_mount.c
vfs_mountroot.c
vfs_subr.c Revert r334708 2018-06-06 15:12:19 +00:00
vfs_syscalls.c Fix the encoding of major and minor numbers in 64-bit dev_t by restoring 2018-06-13 12:22:00 +00:00
vfs_vnops.c ANSIfy sys/kern 2018-06-01 13:26:45 +00:00
vnode_if.src