<p align="center">
  <img src="https://git.wienton.ru/Cervus/CervusOS/raw/branch/main/wallpapers/cervus_logo.jpg" alt="Cervus OS Logo" width="400px">
</p>

# Cervus x86_64 Operating System

[![License: GPL v3](https://img.shields.io/badge/License-GPLv3-blue.svg)](https://www.gnu.org/licenses/gpl-3.0)
[![Platform: x86_64](https://img.shields.io/badge/Platform-x86_64-lightgrey.svg)](https://en.wikipedia.org/wiki/X86-64)
[![Stage: Alpha](https://img.shields.io/badge/Stage-Alpha-orange.svg)]()

**Cervus** - This is a modern 64-bit operating system written for the x86_64 architecture. It is currently under development.

---

## Technical Features

Cervus is currently in the active development phase. The kernel implements core low-level primitives required for a stable execution environment:

### Core Architecture

- _Boot Protocol:_ Utilizes the [Limine](https://github.com/limine-bootloader/limine) bootloader (Barebone profile).
- _Memory Management:_
  - _PMM:_ Bitmap-based Physical Memory Manager.
  - _VMM:_ Virtual Memory Management with 4-level paging support.
- _CPU Initialization:_ Custom GDT (Global Descriptor Table) and IDT (Interrupt Descriptor Table) implementation.
- _Acceleration:_ Native support for _SIMD_ instructions (SSE/AVX) with proper state saving.

## Roadmap & Progress

| Component            |            Status            | Description                          |
| :------------------- | :--------------------------: | :----------------------------------- |
| _Bootloader_         |             Done             | Limine Integration                   |
| _Graphics/PSF_       |             Done             | Framebuffer & Text Rendering         |
| _Memory (PMM/VMM)_   |             Done             | Physical & Virtual Memory Management |
| _Interrupts (IDT)_   |             Done             | Handling exceptions and IRQs         |
| _ACPI_               |   Done(without rebooting)    | Table parsing & SDT discovery        |
| _APIC / IOAPIC_      |             Done             | Advanced Interrupt Controllers       |
| _Timers (HPET/APIC)_ |             Done             | High Precision Event Timers          |
| _SMP_                |             Done             | Multicore Initialization             |
| _Scheduler_          | Done/In parallel development | Preemptive Multitasking              |
| _Userspace_          |   In parallel development    | Syscalls & Ring 3 execution          |

---

## Build Environment

### Prerequisites

To build Cervus, you need a cross-compilation toolchain and the following utilities:

- _Compiler:_ `x86_64-elf-gcc`
- _Assemblers:_ `nasm`
- _Emulation:_ `qemu-system-x86_64`
- _ISO Tools:_ `xorriso`, `mtools`

### Compiling and Running

_1. Clone the repository:_

```bash
bash
git clone https://github.com/VeoQeo/Cervus.git
cd Cervus
```

_2. Compile and launch in QEMU:_

```bash
./build run
```

_3. Deploy to hardware (Flash Drive):_
**WARNING: This will overwrite data on the target device.**

```bash
sudo ./build flash
```

## Contributing

Cervus is an open-source research project. Contributions regarding bug fixes, hardware support, or documentation are welcome. Please feel free to open an Issue or submit a Pull Request.

## License

This project is licensed under the _GPL-3.0 License_. See the [LICENSE](LICENSE) file for details.

---
