
Program the PIT and APIC Timer for Timekeeping
Program the 8253 PIT for a periodic tick, then calibrate the local APIC timer against it and run a 1000 Hz tick, with a tick counter and a sleep function.
Tag
255 posts

Program the 8253 PIT for a periodic tick, then calibrate the local APIC timer against it and run a 1000 Hz tick, with a tick counter and a sleep function.

Write a PS/2 keyboard driver for a hobby kernel: the 8042 ports, scancode set 1, make and break codes, the 0xE0 prefix, shift and caps lock, and a ring buffer.

Remap the two 8259 PICs away from the CPU exception vectors, mask and unmask IRQ lines, send the end-of-interrupt and detect spurious IRQ 7 and IRQ 15.

Build your own x86 GDT in C: descriptor layout, kernel and user segments, a TSS slot, lgdt and segment register reloads, and the 64-bit changes.

Write two GNU linker scripts that share one flash layout file, split flash between bootloader and application, and fail the build when either region overflows.

Update ESP32 firmware over HTTPS with esp_https_ota: partition table, certificate, the one-call and advanced APIs, and testing with a local server.

Hand control from a bootloader to a Cortex-M application safely: validate the vector table, quiesce peripherals, set VTOR and MSP, and avoid the usual crashes.

Install the Optiboot bootloader on an ATmega328P with an ISP programmer once, set the boot fuses, then upload sketches over a serial cable with avrdude.

Run code in the child between fork and exec with CommandExt::pre_exec, learn which calls are async-signal-safe, and see how errors propagate to spawn.

Write a Q15 FIR filter in portable C with a circular delay line, a 32-bit accumulator and one saturating shift at the end, with worked moving-average output.

Run the Rust doctests of the kernel crate and write your own kunit_tests suite on Linux 6.18, with kunit.py, KTAP output and the limits of each test kind.

Stop passing raw i32 descriptors around. Use OwnedFd to close on drop and BorrowedFd to lend a descriptor safely, with the AsFd trait, since Rust 1.63.