Skip to content

Implement VMM - #136

Merged
Neffi42 merged 13 commits into
mainfrom
130-implement-vmm-2
Oct 14, 2025
Merged

Neffi42 merged 13 commits into
mainfrom
130-implement-vmm-2

Conversation

@Neffi42

@Neffi42 Neffi42 commented Oct 14, 2025 •

Copy link
Copy Markdown
Contributor
  • identity mapping
  • add recursive mapping of page directory
  • create kheap

Copilot AI review requested due to automatic review settings October 14, 2025 13:35
@Neffi42
Neffi42 requested a review from iamantoinev as a code owner October 14, 2025 13:35
@Neffi42 Neffi42 self-assigned this Oct 14, 2025
@Neffi42 Neffi42 linked an issue Oct 14, 2025 that may be closed by this pull request

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR implements a Virtual Memory Manager (VMM) for the kernel, restructuring the memory management system with significant architectural improvements.

  • Refactored physical memory manager (PMM) with better type safety using uintptr_t instead of custom types
  • Implemented comprehensive paging system with recursive page directory mapping and page table management
  • Added kernel heap allocator (kheap) with dynamic memory allocation capabilities
  • Moved memory detection functionality to utils module for better organization

Reviewed Changes

Copilot reviewed 11 out of 11 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
kernel/src/utils.c Added detect_memory function for multiboot memory detection
kernel/src/memory/pmm.c Refactored PMM with improved type safety and removed dependencies
kernel/src/memory/paging.c New comprehensive paging implementation with recursive mapping
kernel/src/memory/memory.c Removed old memory implementation (replaced by paging.c)
kernel/src/memory/kheap.c New kernel heap allocator with block-based memory management
kernel/src/kernel.c Updated includes to use new memory subsystem
kernel/include/utils.h Added detect_memory function declaration
kernel/include/pmm.h Updated PMM interface with uintptr_t types
kernel/include/paging.h New paging header with constants and function declarations
kernel/include/memory.h Removed old memory header (replaced by paging.h)
kernel/include/kheap.h New heap allocator interface definitions

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

Comment thread kernel/src/memory/kheap.c Outdated
Comment thread kernel/src/memory/paging.c Outdated
@Neffi42
Neffi42 requested a review from Copilot October 14, 2025 13:41

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

Copilot reviewed 11 out of 11 changed files in this pull request and generated 2 comments.


Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

Comment thread kernel/src/memory/paging.c
Comment thread kernel/src/memory/kheap.c
@Neffi42
Neffi42 enabled auto-merge (squash) October 14, 2025 13:44
@sonarqubecloud

Copy link
Copy Markdown

@Neffi42
Neffi42 merged commit 6282f7c into main Oct 14, 2025
4 checks passed
@Neffi42
Neffi42 deleted the 130-implement-vmm-2 branch October 14, 2025 14:28
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.

Implement VMM

3 participants