Sharing Memory Between Cores in Protected and Long Mode

image

A computer running a CPU in both protected and long mode [Generated with AI]

Context

While all modern Intel CPUs support the 64-bit long mode, they still cycle through a series of legacy modes while booting. The CPU starts in the 16-bit real mode. From there, the 32-bit protected mode is activated. Finally, the CPU is lifted into the 64-bit long mode and the remaining initialization of the kernel can take place.

This process is repeated for each CPU core in the system, which allows for a system in which not all cores are booted all the way into long mode.

Problem

Morsels are self-contained virtual-memory objects. The main property that sets them apart is that they also make the page tables part of the object. This allows to efficiently share and unshare memory between processes and devices using morsels. Secondary morsels extend the morsel concept by support for simultaneously using multiple incompatible architectures. Currently, secondary morsels support the x86_64 (long mode) paging format and Intel's extended page tables. Your task is to extend secondary morsels to also support paging in x86_32 (protected mode).

Goal

Your thesis will follow these key steps:

  1. Getting started: Familiarize yourself with kernel development, set up a suitable development environment, and establish a functional test setup.
  2. Setting up the core: Interrupt the normal boot process of the linux kernel. Keep one core in protected mode and set up basic paging by hand. Run a basic task in the new virtual address space.
  3. Adding the architecture: Add support for protected mode paging to secondary morsels. The most challenging aspect will be that entries are now 32 bit long instead of 64 bit like in the other cases.
  4. Evaluation: Evaluate the functionality and performance characteristics of your implementation.

References

Protected Mode - OSDev Wiki

x86-64 - OSDev Wiki

Papers

DIMES Workshop
Morsels: Explicit Virtual Memory Objects
Alexander Halbuer, Christian Dietrich, Florian Rommel, Daniel LohmannProceedings of the 1st Workshop on Disruptive Memory SystemsAssociation for Computing Machinery2023.
PDF Details Slides 10.1145/3609308.3625267 [BibTex]

Multi-Target Virtual-Memory Objects

Paging has established as goto solution for memory virtualization, but actual implementations differ. Multiple sychronized views could fill the gap to allow direct sharing between different domains. [PDF]

 
Typ
Masterarbeit

 
Status
abgeschlossen

 
Supervisors
Alexander Halbuer
Daniel Lohmann

 
Project
ParPerOS

 
Bearbeiter
Nils Fuhler (abgegeben: 12. Sep 2025)