# ugwurhema/uros64 architecture

> Architecture diagram of the GitHub repository ugwurhema/uros64, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-10-20). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/ugwurhema/uros64
- Repository: https://github.com/ugwurhema/uros64

## Overview

UROS is a 64-bit x86 monolithic operating-system kernel. Its visible runtime workflow initializes interrupts and hardware, brings up physical, virtual, and heap memory, initializes ATA, then enters a keyboard-driven shell that dispatches commands to diagnostics, memory operations, and disk I/O. The graph preserves those domain stages and the console and low-level utility layers. The README is empty; relationships are limited to calls visible in excerpts or the kernel entry source, so unsampled subsystem wiring is omitted.

Main entry points: [`src/kernel/uroskrnl.c`](https://github.com/ugwurhema/uros64/blob/master/src/kernel/uroskrnl.c) (Kernel entry), [`src/shell/shell.c`](https://github.com/ugwurhema/uros64/blob/master/src/shell/shell.c) (Command shell), [`src/filesystem/ata.c`](https://github.com/ugwurhema/uros64/blob/master/src/filesystem/ata.c) (ATA storage), [`src/memory/pmm.c`](https://github.com/ugwurhema/uros64/blob/master/src/memory/pmm.c) (Physical memory)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_startup["Kernel Startup"]
  node_kernel["Kernel entry<br/>[uroskrnl.c]"]
  node_memory_map["Boot memory map<br/>[uroskrnl.c]"]
end

subgraph group_hardware["Hardware and I/O"]
  node_interrupts["Interrupt setup<br/>[interrupts.c]"]
  node_handlers["Interrupt handlers<br/>[handlers.c]"]
  node_apic["APIC control<br/>[apic.c]"]
  node_mouse["Mouse driver<br/>[mouse.c]"]
  node_sound["Sound driver<br/>[sound.c]"]
  node_ata["ATA storage<br/>[ata.c]"]
end

subgraph group_runtime["Kernel Runtime"]
  node_pmm["Physical memory<br/>[pmm.c]"]
  node_vmm["Virtual memory<br/>[vmm.c]"]
  node_heap["Kernel heap<br/>[heap.c]"]
  node_shell["Command shell<br/>[shell.c]"]
  node_console["VGA console<br/>[vga.c]"]
  node_functions["Low-level utilities<br/>[func.c]"]
end

node_kernel -->|"initializes"| node_interrupts
node_kernel -->|"beeps"| node_sound
node_kernel -->|"reads"| node_memory_map
node_kernel -->|"initializes"| node_pmm
node_kernel -->|"initializes"| node_vmm
node_kernel -->|"initializes"| node_heap
node_kernel -->|"initializes"| node_ata
node_kernel -->|"starts"| node_shell
node_kernel -->|"prints to"| node_console
node_shell -->|"reads and writes"| node_ata
node_shell -->|"allocates with"| node_heap
node_shell -->|"queries"| node_pmm
node_shell -->|"tests"| node_vmm
node_shell -->|"prints to"| node_console

click node_kernel "https://github.com/ugwurhema/uros64/blob/master/src/kernel/uroskrnl.c"
click node_interrupts "https://github.com/ugwurhema/uros64/blob/master/src/ints/interrupts.c"
click node_handlers "https://github.com/ugwurhema/uros64/blob/master/src/ints/handlers.c"
click node_apic "https://github.com/ugwurhema/uros64/blob/master/src/ints/apic.c"
click node_mouse "https://github.com/ugwurhema/uros64/blob/master/src/devices/mouse/mouse.c"
click node_sound "https://github.com/ugwurhema/uros64/blob/master/src/devices/sound/sound.c"
click node_ata "https://github.com/ugwurhema/uros64/blob/master/src/filesystem/ata.c"
click node_pmm "https://github.com/ugwurhema/uros64/blob/master/src/memory/pmm.c"
click node_vmm "https://github.com/ugwurhema/uros64/blob/master/src/memory/vmm.c"
click node_heap "https://github.com/ugwurhema/uros64/blob/master/src/memory/heap.c"
click node_shell "https://github.com/ugwurhema/uros64/blob/master/src/shell/shell.c"
click node_console "https://github.com/ugwurhema/uros64/blob/master/src/vga/vga.c"
click node_functions "https://github.com/ugwurhema/uros64/blob/master/src/func/func.c"
click node_memory_map "https://github.com/ugwurhema/uros64/blob/master/src/kernel/uroskrnl.c"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_kernel,node_memory_map toneBlue
class node_interrupts,node_handlers,node_apic,node_mouse,node_sound,node_ata toneAmber
class node_pmm,node_vmm,node_heap,node_shell,node_console,node_functions toneMint
```

## Components

### Kernel Startup

- [Kernel entry](https://github.com/ugwurhema/uros64/blob/master/src/kernel/uroskrnl.c): `src/kernel/uroskrnl.c`
- [Boot memory map](https://github.com/ugwurhema/uros64/blob/master/src/kernel/uroskrnl.c): `src/kernel/uroskrnl.c`

### Hardware and I/O

- [Interrupt setup](https://github.com/ugwurhema/uros64/blob/master/src/ints/interrupts.c): `src/ints/interrupts.c`
- [Interrupt handlers](https://github.com/ugwurhema/uros64/blob/master/src/ints/handlers.c): `src/ints/handlers.c`
- [APIC control](https://github.com/ugwurhema/uros64/blob/master/src/ints/apic.c): `src/ints/apic.c`
- [Mouse driver](https://github.com/ugwurhema/uros64/blob/master/src/devices/mouse/mouse.c): `src/devices/mouse/mouse.c`
- [Sound driver](https://github.com/ugwurhema/uros64/blob/master/src/devices/sound/sound.c): `src/devices/sound/sound.c`
- [ATA storage](https://github.com/ugwurhema/uros64/blob/master/src/filesystem/ata.c): `src/filesystem/ata.c`

### Kernel Runtime

- [Physical memory](https://github.com/ugwurhema/uros64/blob/master/src/memory/pmm.c): `src/memory/pmm.c`
- [Virtual memory](https://github.com/ugwurhema/uros64/blob/master/src/memory/vmm.c): `src/memory/vmm.c`
- [Kernel heap](https://github.com/ugwurhema/uros64/blob/master/src/memory/heap.c): `src/memory/heap.c`
- [Command shell](https://github.com/ugwurhema/uros64/blob/master/src/shell/shell.c): `src/shell/shell.c`
- [VGA console](https://github.com/ugwurhema/uros64/blob/master/src/vga/vga.c): `src/vga/vga.c`
- [Low-level utilities](https://github.com/ugwurhema/uros64/blob/master/src/func/func.c): `src/func/func.c`

## Connections

- Kernel entry → Interrupt setup: initializes (evidence: `src/kernel/uroskrnl.c`)
- Kernel entry → Sound driver: beeps (evidence: `src/kernel/uroskrnl.c`)
- Kernel entry → Boot memory map: reads (evidence: `src/kernel/uroskrnl.c`)
- Kernel entry → Physical memory: initializes (evidence: `src/kernel/uroskrnl.c`)
- Kernel entry → Virtual memory: initializes (evidence: `src/kernel/uroskrnl.c`)
- Kernel entry → Kernel heap: initializes (evidence: `src/kernel/uroskrnl.c`)
- Kernel entry → ATA storage: initializes (evidence: `src/kernel/uroskrnl.c`)
- Kernel entry → Command shell: starts (evidence: `src/kernel/uroskrnl.c`)
- Kernel entry → VGA console: prints to (evidence: `src/kernel/uroskrnl.c`)
- Command shell → ATA storage: reads and writes (evidence: `src/shell/shell.c`)
- Command shell → Kernel heap: allocates with (evidence: `src/shell/shell.c`)
- Command shell → Physical memory: queries (evidence: `src/shell/shell.c`)
- Command shell → Virtual memory: tests (evidence: `src/shell/shell.c`)
- Command shell → VGA console: prints to (evidence: `src/shell/shell.c`)
