Skip to content

feat: interrupt-driven I/O and SD persistence for OS mode #794

Description

@ds1sqe

Summary

Make the bare-metal editor durable and responsive under load: GIC-400 interrupt
bring-up (UART RX feeding the input ring instead of polling) and a persistence store
on the SD card satisfying the storage-neutral atomicity contract.

Part of #788 (phase OS-4).

Proposed change

  • Interrupts: GIC-400 init (distributor + CPU interface, EL1 vectors); PL011 RX
    interrupt feeding a ring buffer consumed by the scheduler loop; generic-timer
    compare interrupt as the park/wake deadline source.
  • Storage: EMMC2 SD-card driver (single block read/write first).
  • Store: persistence backend satisfying the restated PS1 atomicity contract
    (docs: spec deltas enabling freestanding and multi-target platforms #789). Decision recorded in this issue: FAT32 (host interop — the SD card stays
    readable on any machine) vs a small log-structured store (cleaner atomic-generation
    fit, no directory-rename emulation). Evaluate both against PS1 and pick one.
  • State lifecycle: session save on shutdown (PS2) and restore on boot, surviving
    power cycles.

Acceptance criteria

  • Input path is interrupt-driven end to end; no UART polling in the steady state
  • Editor state survives a hard power cycle (save, power off, boot, restore)
  • Chosen store's conformance to the restated PS1 argued in the storage doc
  • Timer interrupt drives park/wake deadlines (no timer polling)

Related

Metadata

Metadata

Assignees

No one assigned

    Labels

    architectureArchitecture layer (lib/arch)enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions