Skip to content

SharpMetal v1.0.2: Paging Reclamation, APIC Calibration & Dynamic Exec

Choose a tag to compare

@Sadik00789 Sadik00789 released this 12 Sep 10:25
· 10 commits to main since this release

SharpMetal Microkernel Architectural Hardening & Dynamic Execution (v1.0.2)

Highlights & Changes

  • MMIO-Safe Address Space Teardown: Added iterative page table destruction (DestroyAddressSpace) with PageFrameAllocator.IsRam validation to prevent MMIO and framebuffer ranges from being corrupted during process exits.
  • VirtIO Virtqueue Fixes: Resolved 16-bit ring index wraparound edge cases on avail->idx and used->idx, and enforced write memory barriers before queue doorbells.
  • APIC Timer Hardware Calibration: Calibrated Local APIC timer ticks dynamically against PIT Channel 2 (11,932 divisor / 10ms window) for reliable multi-core scheduling.
  • Dynamic Exec via Syscall 0x0B: Implemented sys_spawn and userland PieLoader to relocate and execute freestanding PIE binaries dynamically.
  • Runtime & Toolchain Alignment: Added missing ThrowFileNotFoundException runtime stub to MiniCoreLib and resolved reference assembly paths for Native AOT ILCompiler.

Quick Start (Booting under QEMU)

  1. Download pre-built disk image from release assets

    curl -LO [https://github.com/Sadik00789/SharpMetal/releases/download/v1.0.2/disk.img](https://github.com/Sadik00789/SharpMetal/releases/download/v1.0.2/disk.img)
  2. Create backing image for NVMe benchmark storage

    qemu-img create -f raw nvme.img 64M
  3. Launch QEMU (with 4 cores, UEFI firmware, NVMe, and VirtIO-Net)

    qemu-system-x86_64 -machine q35 -cpu max -smp 4 -m 1G \
      -drive if=pflash,format=raw,readonly=on,file=/usr/share/OVMF/OVMF_CODE.fd \
      -drive file=disk.img,format=raw \
      -drive file=nvme.img,format=raw,if=none,id=nvm \
      -device nvme,serial=nvme01,drive=nvm \
      -netdev user,id=net0 -device virtio-net-pci,netdev=net0