DEVICE.HINTS(5)
π DEVICE.HINTS(5) π
okay bestie, so this is a File Formats Manual page for device.hints β literally the "device resource hints" file. buckle up, it's iconic π
β¨ NAME β¨
device.hints β device resource hints π¦
πΈ DESCRIPTION πΈ
so the device.hints file gets read in by the boot loader(8) right when the system is about to start, and everything inside it gets passed straight to the kernel. no cap. it holds all these variables that control the boot behavior of the kernel β usually they're "device hints", but honestly they can be any kernel tunable values. versatile queen π
the file is literally one variable per line. lines that start with the # character are comments and the boot loader just ignores them, like it's scrolling past drama it doesn't care about π
after the file gets read by the boot loader, you can totally examine the variables with the show command, and you can add a new variable, modify an existing one, or delete a variable with the set and unset commands of the boot loader (peep loader(8), iykyk).
and once the system has started? you can dump all those variables with the kenv(1) command. slay. π₯
π DEVICE HINTS π
device hint variables are what device drivers use to set up the device. most often they're used by ISA device drivers to specify where the driver will probe for the relevant devices, and what resources it'll attempt to use. it's giving matchmaker but for hardware and resources π«Ά
a device hint line looks like this:
hint.driver.unit.keyword="value"
where driver is the name of a device driver, unit is the unit number, and keyword is the keyword of the hint. and the keyword may be:
atβ specifies a bus to which the device is attached.portβ specifies the start address of I/O ports to be used by the device.portsizeβ specifies the number of ports used by the device.irqβ is the interrupt line number to be used.drqβ is the DMA channel number.maddrβ specifies the physical memory address used by the device.msizeβ specifies the physical memory size used by the device.flagsβ sets various flag bits for the device.disabledβ can be set to"1"to disable the device. (rude but effective π)
a device driver may require one or more hint lines with these keywords, and it may also accept other keywords that aren't listed here, through resource_int_value(9). so pls consult the individual device drivers' manual pages for the available keywords and their possible values. don't just guess, bestie π
π FILES π
/boot/device.hintsβ Device resource hints file./sys/ARCH/conf/GENERIC.hintsβ Sample resource hints for theGENERICkernel./sys/ARCH/conf/NOTESβ Notes on the kernel configuration file and device resource hints.
π EXAMPLES π
ok so this first one sets up resources for the uart(4) driver on the ISA bus. look at her go:
hint.uart.0.at="isa"
hint.uart.0.port="0x3F8"
hint.uart.0.flags="0x10"
hint.uart.0.irq="4"
and this one? it just straight up disables the ACPI driver. sorry to that driver π
hint.acpi.0.disabled="1"
and here's how you set a tunable variable:
vm.pmap.pg_ps_enabled=1
π¦ SEE ALSO π¦
kenv(1), loader.conf(5), loader(8), resource_int_value(9)
β HISTORY β
the device.hints file first appeared in FreeBSD 5.0. a true icon since day one π
and that's the whole page, bestie!! this one's from Debian, dated November 19, 2019 β so go forth and hint responsibly π β¨
π¦ where this page comes from
- freebsd 14.5: base 14.5
- freebsd 15.1: base 15.1
- nixpkgs unstable: source
- Copyright (c) 2001 Kazutaka YOKOTA <yokota@zodiac.mech.utsunomiya-u.ac.jp>
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms