Skip to content

[kernel] Add optional GEM INT EF resident broker#2745

Closed
parabyte wants to merge 1 commit into
ghaerr:masterfrom
parabyte:agent/gem-int-ef-broker
Closed

[kernel] Add optional GEM INT EF resident broker#2745
parabyte wants to merge 1 commit into
ghaerr:masterfrom
parabyte:agent/gem-int-ef-broker

Conversation

@parabyte

@parabyte parabyte commented Jul 14, 2026

Copy link
Copy Markdown

Summary

This adds a default-off, real-mode IBM PC broker for the original GEM INT EFh AES/VDI entry point.

  • installs the signed GEMAES vector only while one resident user process is registered
  • transfers requests through one fixed slot per ELKS task
  • pins the client's native data segment while the resident process handles the request
  • reports exec and exit lifecycle records so retained process state is released safely
  • keeps AES, VDI, menus, windows, and desktop policy in user space

The control call uses syscall slot 65, whose former module-loading operation is already removed.

Compatibility and bounds

CONFIG_GEM_TRAP defaults to off and is offered only for IBM PC real-mode builds. The direct IVT path is excluded when CONFIG_286_PMODE is selected.

All public fields, registers, limits, counters, and generation halves are 8 or 16 bits. The broker uses a fixed 640-byte table, performs no dynamic allocation, and preserves far addresses as explicit segment and offset words.

The saved vector is restored only if INT EFh still points to this broker. Owner exec, owner exit, client exec, client exit, interruption, cancellation, and stale replies all have explicit cleanup paths.

Validation

Validated at commit e1cf24a810c7c1e74d1ca53f84a8a8ca66a2d432 on upstream master b7cfe4973487ab235169dd9eb489285409fb8b2a with an IBM PC configuration generated with CONFIG_GEM_TRAP=y:

  • full kernel build: pass
  • gemtrap.o and broker test-object 8086 instruction audits: pass
  • source and executable-model gates: pass
  • headless QEMU isapc guest regression: GEM_TRAP_BROKER_PASS
  • disposable test image verified; source image remained unchanged
  • resulting kernel: 116208 bytes total, including 64096 bytes near code and 32832 bytes far text

This is deliberately separate from the GEM user-space desktop integration so the kernel ABI can be reviewed on its own.

Related background: #871.

@parabyte parabyte marked this pull request as ready for review July 15, 2026 00:08
@parabyte parabyte closed this Jul 16, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant