# ivanokino/podosinovik architecture

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

- Interactive diagram: https://gitdiagram.com/ivanokino/podosinovik
- Repository: https://github.com/ivanokino/podosinovik

## Overview

podOSinovik is a hobby x86_64 OS with a UEFI bootloader. The main workflow is firmware boot: the loader discovers ACPI/APIC data, loads the kernel and passes framebuffer and memory-map data; the kernel initializes display, interrupts, input and heap state, then idles while keyboard input feeds the shell. The graph also includes the EFI interface layer and core interrupt, display, and utility components. Several source files are represented from the SOURCE INDEX rather than inspected excerpts, so uncertain connections are omitted.

Main entry points: [`src/kernel/kernel.c`](https://github.com/ivanokino/podosinovik/blob/main/src/kernel/kernel.c) (Kernel Startup), [`src/drivers/screen.c`](https://github.com/ivanokino/podosinovik/blob/main/src/drivers/screen.c) (Framebuffer Display), [`src/bootloader/starter.c`](https://github.com/ivanokino/podosinovik/blob/main/src/bootloader/starter.c) (Bootloader), [`src/cpu/isr_irq.c`](https://github.com/ivanokino/podosinovik/blob/main/src/cpu/isr_irq.c) (Interrupt Handling)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_boot["UEFI Boot"]
  node_loader["Bootloader<br/>[starter.c]"]
  node_efi["EFI Interfaces<br/>[efi.h]"]
  node_efi_lib["EFI Library<br/>[efilib.h]"]
  node_boot_data["Boot Data Structures<br/>[structs.h]"]
end

subgraph group_kernel["Kernel Core"]
  node_kernel["Kernel Startup<br/>[kernel.c]"]
  node_interrupts["Interrupt Handling<br/>[isr_irq.c]"]
  node_idt["IDT Setup<br/>[idt.c]"]
  node_apic["APIC Driver<br/>[APIC.c]"]
  node_memory["Memory Management<br/>[memory.c]"]
  node_ports["Hardware Ports<br/>[ports.c]"]
end

subgraph group_io["Drivers and Shell"]
  node_keyboard["Keyboard Input<br/>[keyboard.c]"]
  node_shell["Command Shell<br/>[shell.c]"]
  node_screen["Framebuffer Display<br/>[screen.c]"]
  node_font["Font Data<br/>[font.h]"]
end

subgraph group_support["Runtime Support"]
  node_string["String Utilities<br/>[string.c]"]
end

node_uefi(("UEFI Firmware"))

node_loader -->|"uses services"| node_uefi
node_loader -->|"uses interfaces"| node_efi
node_loader -->|"uses library"| node_efi_lib
node_loader -->|"populates boot data"| node_boot_data
node_loader -->|"invokes entry"| node_kernel
node_kernel -->|"initializes display"| node_screen
node_kernel -->|"installs handlers"| node_interrupts
node_kernel -->|"initializes APIC"| node_apic
node_kernel -->|"initializes input"| node_keyboard
node_kernel -->|"initializes heap"| node_memory
node_kernel -.->|"imports driver"| node_ports
node_interrupts -->|"sets IDT gates"| node_idt
node_interrupts -->|"signals EOI"| node_apic
node_interrupts -->|"prints exceptions"| node_screen
node_interrupts -->|"formats error code"| node_string
node_keyboard -->|"reads scancode"| node_ports
node_keyboard -->|"prints keystrokes"| node_screen
node_keyboard -->|"dispatches commands"| node_shell
node_shell -->|"writes output"| node_screen
node_shell -->|"uses string helpers"| node_string
node_screen -->|"renders glyphs"| node_font
node_memory -->|"reads memory map"| node_boot_data
node_memory -->|"reports memory"| node_screen
node_memory -->|"uses string helpers"| node_string

click node_loader "https://github.com/ivanokino/podosinovik/blob/main/src/bootloader/starter.c"
click node_efi "https://github.com/ivanokino/podosinovik/blob/main/src/efi/efi.h"
click node_efi_lib "https://github.com/ivanokino/podosinovik/blob/main/src/efi/efilib.h"
click node_kernel "https://github.com/ivanokino/podosinovik/blob/main/src/kernel/kernel.c"
click node_interrupts "https://github.com/ivanokino/podosinovik/blob/main/src/cpu/isr_irq.c"
click node_idt "https://github.com/ivanokino/podosinovik/blob/main/src/cpu/idt.c"
click node_apic "https://github.com/ivanokino/podosinovik/blob/main/src/drivers/APIC.c"
click node_keyboard "https://github.com/ivanokino/podosinovik/blob/main/src/drivers/keyboard.c"
click node_shell "https://github.com/ivanokino/podosinovik/blob/main/src/drivers/shell.c"
click node_screen "https://github.com/ivanokino/podosinovik/blob/main/src/drivers/screen.c"
click node_font "https://github.com/ivanokino/podosinovik/blob/main/src/drivers/font.h"
click node_memory "https://github.com/ivanokino/podosinovik/blob/main/src/drivers/memory.c"
click node_boot_data "https://github.com/ivanokino/podosinovik/blob/main/src/bootloader/structs.h"
click node_string "https://github.com/ivanokino/podosinovik/blob/main/src/utils/string.c"
click node_ports "https://github.com/ivanokino/podosinovik/blob/main/src/drivers/ports.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_loader,node_efi,node_efi_lib,node_boot_data toneBlue
class node_kernel,node_interrupts,node_idt,node_apic,node_memory,node_ports toneAmber
class node_keyboard,node_shell,node_screen,node_font toneMint
class node_string toneRose
class node_uefi toneIndigo
```

## Components

### UEFI Boot

- [Bootloader](https://github.com/ivanokino/podosinovik/blob/main/src/bootloader/starter.c): `src/bootloader/starter.c`
- [EFI Interfaces](https://github.com/ivanokino/podosinovik/blob/main/src/efi/efi.h): `src/efi/efi.h`
- [EFI Library](https://github.com/ivanokino/podosinovik/blob/main/src/efi/efilib.h): `src/efi/efilib.h`
- [Boot Data Structures](https://github.com/ivanokino/podosinovik/blob/main/src/bootloader/structs.h): `src/bootloader/structs.h`

### Kernel Core

- [Kernel Startup](https://github.com/ivanokino/podosinovik/blob/main/src/kernel/kernel.c): `src/kernel/kernel.c`
- [Interrupt Handling](https://github.com/ivanokino/podosinovik/blob/main/src/cpu/isr_irq.c): `src/cpu/isr_irq.c`
- [IDT Setup](https://github.com/ivanokino/podosinovik/blob/main/src/cpu/idt.c): `src/cpu/idt.c`
- [APIC Driver](https://github.com/ivanokino/podosinovik/blob/main/src/drivers/APIC.c): `src/drivers/APIC.c`
- [Memory Management](https://github.com/ivanokino/podosinovik/blob/main/src/drivers/memory.c): `src/drivers/memory.c`
- [Hardware Ports](https://github.com/ivanokino/podosinovik/blob/main/src/drivers/ports.c): `src/drivers/ports.c`

### Drivers and Shell

- [Keyboard Input](https://github.com/ivanokino/podosinovik/blob/main/src/drivers/keyboard.c): `src/drivers/keyboard.c`
- [Command Shell](https://github.com/ivanokino/podosinovik/blob/main/src/drivers/shell.c): `src/drivers/shell.c`
- [Framebuffer Display](https://github.com/ivanokino/podosinovik/blob/main/src/drivers/screen.c): `src/drivers/screen.c`
- [Font Data](https://github.com/ivanokino/podosinovik/blob/main/src/drivers/font.h): `src/drivers/font.h`

### Runtime Support

- [String Utilities](https://github.com/ivanokino/podosinovik/blob/main/src/utils/string.c): `src/utils/string.c`

### Other components

- **UEFI Firmware**

## Connections

- Bootloader → UEFI Firmware: uses services (evidence: `src/bootloader/starter.c`)
- Bootloader → EFI Interfaces: uses interfaces (evidence: `src/bootloader/starter.c`)
- Bootloader → EFI Library: uses library (evidence: `src/bootloader/starter.c`)
- Bootloader → Boot Data Structures: populates boot data (evidence: `src/bootloader/starter.c`)
- Bootloader → Kernel Startup: invokes entry (evidence: `src/bootloader/starter.c`)
- Kernel Startup → Framebuffer Display: initializes display (evidence: `src/kernel/kernel.c`)
- Kernel Startup → Interrupt Handling: installs handlers (evidence: `src/kernel/kernel.c`)
- Kernel Startup → APIC Driver: initializes APIC (evidence: `src/kernel/kernel.c`)
- Kernel Startup → Keyboard Input: initializes input (evidence: `src/kernel/kernel.c`)
- Kernel Startup → Memory Management: initializes heap (evidence: `src/kernel/kernel.c`)
- Kernel Startup → Hardware Ports: imports driver
- Interrupt Handling → IDT Setup: sets IDT gates (evidence: `src/cpu/isr_irq.c`)
- Interrupt Handling → APIC Driver: signals EOI (evidence: `src/cpu/isr_irq.c`)
- Interrupt Handling → Framebuffer Display: prints exceptions (evidence: `src/cpu/isr_irq.c`)
- Interrupt Handling → String Utilities: formats error code (evidence: `src/cpu/isr_irq.c`)
- Keyboard Input → Hardware Ports: reads scancode (evidence: `src/drivers/keyboard.c`)
- Keyboard Input → Framebuffer Display: prints keystrokes (evidence: `src/drivers/keyboard.c`)
- Keyboard Input → Command Shell: dispatches commands (evidence: `src/drivers/keyboard.c`)
- Command Shell → Framebuffer Display: writes output (evidence: `src/drivers/shell.c`)
- Command Shell → String Utilities: uses string helpers (evidence: `src/drivers/shell.c`)
- Framebuffer Display → Font Data: renders glyphs (evidence: `src/drivers/screen.c`)
- Memory Management → Boot Data Structures: reads memory map (evidence: `src/drivers/memory.c`)
- Memory Management → Framebuffer Display: reports memory (evidence: `src/drivers/memory.c`)
- Memory Management → String Utilities: uses string helpers (evidence: `src/drivers/memory.c`)
