This repository is currently private and no license is granted. See NOTICE.
Contributions are accepted only from explicitly authorized collaborators.
PyramidOS prioritizes:
- System stability
- Memory safety (especially in Ring 0)
- Hardware correctness
- Clear, readable freestanding C / Assembly
- Small changesets: Keep commits focused and reviewable.
- Build before pushing:
- Release:
make clean && make - Debug:
make clean && make debug - Strict warnings (opt-in Werror):
make clean && make STRICT=1
- Release:
- Boot verification: Run
make runand confirm the kernel reaches KShell anddiagnosesucceeds. - No silent failures: If a state is unrecoverable, use the kernel panic path (don’t “guess and continue”).
- Allowed headers:
<stdint.h>,<stddef.h>,<stdbool.h> - Avoid host/libc dependencies (no
<stdio.h>,<stdlib.h>) - Use explicit-width integer types (
uint32_t,uint16_t,uint8_t) - Avoid magic numbers; prefer
#defineor named constants - Validate pointers/arguments where practical
- Comment non-trivial instructions (why registers are preserved/used)
- Mark ELF asm objects as non-executable stack via
.note.GNU-stack - Keep interrupt stubs minimal and correct (EOI, stack discipline)
.editorconfigis the baseline for indentation and whitespace rules.- Keep code style consistent with surrounding files.
- Prefer clarity over cleverness.
kernel/arch/: hardware-specific code (IDT/PIC/paging primitives)kernel/core/: kernel logic (PMM/VMM/heap/shell/debug)kernel/drivers/: devices and hardware drivers (terminal/keyboard/timer/rtc/ata)kernel/lib/: minimal freestanding helper routines
When reporting a bug, include:
- Build command used (release/debug/STRICT)
- The QEMU output/screenshot
- Steps to reproduce (commands typed in KShell, if applicable)
- Any recent code changes
Kernel bugs can represent serious flaws. Report privately to the project owner if the issue is security-sensitive.