Skip to content

Latest commit

 

History

History
77 lines (50 loc) · 6.55 KB

File metadata and controls

77 lines (50 loc) · 6.55 KB

📝 Change Log

2025-12-31

  • 📌 Description: In the initial phase, we made only basic changes: we added an R4R option to the kernel options, modified the segments.h files for both amd64 and i386, and just set up the basic macros without any functional changes. That was our starting point.
  • 🔗 Commit links: commit 1, commit 2

2026-01-14

  • 📌 Description: Emit a boot-time message when R4R support is compiled in.
  • 🔗 Commit links: commit 1, commit 2

2026-01-17

  • 📌 Description:
    Extended the i386 and amd64 GDT layouts under the R4R kernel option to reserve the full architectural GDT range (8192 descriptors). The original FreeBSD descriptors remain unchanged in the range [0..NGDT-1]. All remaining entries are explicitly initialized as null descriptors during early boot. R4R-specific descriptor initialization is deferred to a dedicated GDT management subsystem in a separate source file. No semantic changes are introduced to the standard FreeBSD segment layout.

  • 🔗 Commit links: commit 1, commit 2

  • 📌 Description (continued):
    Added the initial R4R GDT manager subsystem skeleton for i386. Introduced a dedicated r4r_gdt.h public interface and r4r_gdt.c implementation with per-CPU bitmap tracking for GDT descriptor ownership. The subsystem provides a clean API for future experimental descriptor allocation while explicitly reserving the standard FreeBSD GDT region. The R4R GDT manager is conditionally integrated into the kernel build system via files.i386 under the R4R option. At this stage, only per-CPU initialization logic is implemented; no functional descriptor allocation is performed yet.

  • 🔗 Commit links: commit 3

2026-01-18

  • 📌 Description:
    Fixed and stabilized the initial R4R GDT subsystem integration. The R4R source directory was renamed from an incorrect legacy name to the final r4r form to reflect the intended project naming. Header include paths were corrected to follow the FreeBSD kernel include hierarchy, resolving build-time dependency and mkdep failures. Missing kernel headers were added to ensure proper visibility of KASSERT(), bzero(), and CPU helper macros.
    A dedicated R4R kernel configuration file was introduced to support clean kernel builds with the R4R option enabled. The kernel now builds and installs successfully with the R4R GDT subsystem enabled.
    No functional behavior of the GDT manager was changed; this commit strictly focuses on build system correctness, directory structure consistency, and integration hygiene.

  • 🔗 Commit links: commit 1, commit 2

  • 🖼️ Build and boot verification:

2026-01-19

  • 📌 Description:
    Introduced a dedicated fast kernel build script for the R4R kernel configuration. The script performs a clean kernel-only build without modules, installs the kernel, and restores only the acpi.ko module from the object tree. This ensures deterministic kernel rebuilds while keeping ACPI functionality available for VirtualBox and real hardware environments.
    The script is location-independent and safely returns to the original working directory after execution.
  • 🔗 Commit links: r4r_fast_build.sh

2026-01-22

  • 📌 Description:
    Established the initial architectural direction and design decisions for the R4R GDT management subsystem. The standard FreeBSD GDT layout remains untouched, while the remaining architectural GDT space is now cleanly reserved and prepared for controlled management by the R4R framework. This commit introduces the foundational structure: bitmap-based descriptor tracking, per-CPU accounting, and a clear separation between standard FreeBSD GDT entries and R4R-managed descriptors. During this phase, the code was repeatedly refined to better align with FreeBSD kernel style, naming conventions, layout, and documentation practices.
    Although still at an early stage, the subsystem now reflects a clear and consistent design direction rather than a collection of experimental fragments. Initial R4R code and data descriptors for rings 0–3 are now created and installed through the R4R GDT layer, forming a stable base for the upcoming TSS and call gate descriptor work. This entry marks the point where the R4R project defines its long-term technical path and internal structure.

  • 🔗 Commit link: commit 1

  • 🖼️ Boot verification:

2026-02-16

  • 📌 Description:
    Implemented full per-CPU GDT installation for amd64 under the R4R kernel option.
    Each Application Processor now clones the standard FreeBSD GDT core descriptors [0..NGDT-1] into its own dedicated GDT slice during init_secondary().
    The TSS descriptor is materialized per CPU into the cloned slice, and a private GDTR base is installed via lgdt().

The R4R-managed GDT region [NGDT .. GDT_MAX_DESCRIPTORS-1] is explicitly cleared and reserved for experimental descriptor allocation.
The original FreeBSD segment layout and descriptor semantics remain unchanged.

This commit completes the transition from a shared-offset GDT model to a true per-CPU GDTR model on amd64 while preserving SMP and bootstrap stability.

  • 🔗 Commit link: commit

  • 🖼️ Boot verification: