SchOS/kernel/dev
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Nexoniarz 8d836c66b2 PCI and USB devices in the /sys/devices tree, with uevents and USB hot-plug
PCI devices live at /sys/devices/pci0000:00/<addr> and USB devices under the
xHCI controller that carries their bus, below that bus's root hub usbN;
/sys/bus/pci/devices and /sys/bus/usb/devices are symlinks into it, and every
device has its subsystem and driver links, which is how udev learns SUBSYSTEM
and DRIVER. Writing to a device's uevent now announces it with MODALIAS,
PCI_ID, PRODUCT and the rest, so udevadm trigger covers them, and the USB core
sends add when a device is attached and remove as it goes. The root hub is
announced when the controller comes up, before anything is plugged in.

Checked under QEMU: lspci and udevadm info through the links, udevadm monitor
showing the kernel and udev add event for device_add usb-kbd/usb-mouse and
the remove event for device_del, and a triggered add for usb1 and 1-5.

Known limits: the bus-to-controller mapping is a convention (bus N is the Nth
xHCI in PCI order); PCI bridges are not parents; USB interfaces and
/dev/bus/usb nodes are absent; busybox's lsusb reads /dev/bus/usb and prints
nothing.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01EVRhxi9zpdW2uDUN4FVcao
2026-10-26 15:51:28 +01:00
..
audio.c Sound through ALSA, a 2D game, and a stack walk that cannot panic 2026-10-25 05:39:16 +01:00
bio.c include: one folder per subsystem, and includes that name it 2026-10-23 15:05:12 +02:00
blkdev.c include: one folder per subsystem, and includes that name it 2026-10-23 15:05:12 +02:00
cdev.c Pseudo-terminals, and what tmux and htop needed around them 2026-10-25 02:11:10 +01:00
dbg.c include: one folder per subsystem, and includes that name it 2026-10-23 15:05:12 +02:00
device.c include: one folder per subsystem, and includes that name it 2026-10-23 15:05:12 +02:00
disk.c include: one folder per subsystem, and includes that name it 2026-10-23 15:05:12 +02:00
dmi.c boot: driver chatter goes to the log; the console clears its margins 2026-10-25 01:53:46 +02:00
fb.c Sound through ALSA, a 2D game, and a stack walk that cannot panic 2026-10-25 05:39:16 +01:00
gfx.c display: confirm a resolution change, and size the console font to the screen 2026-10-24 23:11:22 +02:00
ide.c include: one folder per subsystem, and includes that name it 2026-10-23 15:05:12 +02:00
input.c Keyboard lights, TLB shootdowns, battery in sysfs, /proc/pid/maps 2026-10-25 13:43:27 +01:00
irq.c irq: turn a PS/2 line over when its device waits and nothing comes 2026-10-24 11:10:29 +02:00
kbd.c Keyboard lights, TLB shootdowns, battery in sysfs, /proc/pid/maps 2026-10-25 13:43:27 +01:00
kdev.c PCI and USB devices in the /sys/devices tree, with uevents and USB hot-plug 2026-10-26 15:51:28 +01:00
keymap.c Job control, function keys, and real sleeps 2026-10-25 02:37:45 +01:00
mouse.c irq: turn a PS/2 line over when its device waits and nothing comes 2026-10-24 11:10:29 +02:00
netuser.c include: one folder per subsystem, and includes that name it 2026-10-23 15:05:12 +02:00
pci.c Linux's own r8169 through LDLS, deep idle, and the GPU plan 2026-10-25 14:26:16 +01:00
pciuser.c docs: README, plan, guides and the site describe what is built now 2026-10-26 08:08:05 +01:00
procfs.c Pseudo-terminals, and what tmux and htop needed around them 2026-10-25 02:11:10 +01:00
pty.c Users and permissions: accounts, login, enforced file permissions, setuid, su, passwd, doas 2026-10-26 13:16:07 +01:00
ramdisk.c boot: driver chatter goes to the log; the console clears its margins 2026-10-25 01:53:46 +02:00
text.c include: one folder per subsystem, and includes that name it 2026-10-23 15:05:12 +02:00
ttf.c include: one folder per subsystem, and includes that name it 2026-10-23 15:05:12 +02:00
uart.c include: one folder per subsystem, and includes that name it 2026-10-23 15:05:12 +02:00
vt.c Cheaper cursor, a fortify panic that names its function; Finch's gap 2026-10-25 18:31:40 +01:00