{"id":13408537,"url":"https://github.com/RavSS/HAVK","last_synced_at":"2025-03-14T13:31:34.442Z","repository":{"id":54249338,"uuid":"166222863","full_name":"RavSS/HAVK","owner":"RavSS","description":"An attempt at a minimalistic and secure operating system.","archived":false,"fork":false,"pushed_at":"2021-05-28T08:35:39.000Z","size":8813,"stargazers_count":24,"open_issues_count":1,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-07-31T20:31:12.532Z","etag":null,"topics":["ada","kernel","operating-system","osdev","security","spark-ada"],"latest_commit_sha":null,"homepage":"","language":"Ada","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/RavSS.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2019-01-17T12:33:48.000Z","updated_at":"2024-03-13T00:55:34.000Z","dependencies_parsed_at":"2022-08-13T10:00:47.116Z","dependency_job_id":null,"html_url":"https://github.com/RavSS/HAVK","commit_stats":null,"previous_names":[],"tags_count":14,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RavSS%2FHAVK","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RavSS%2FHAVK/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RavSS%2FHAVK/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RavSS%2FHAVK/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/RavSS","download_url":"https://codeload.github.com/RavSS/HAVK/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":221472580,"owners_count":16828234,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["ada","kernel","operating-system","osdev","security","spark-ada"],"created_at":"2024-07-30T20:00:53.498Z","updated_at":"2024-10-25T23:30:59.314Z","avatar_url":"https://github.com/RavSS.png","language":"Ada","funding_links":[],"categories":["OS and Kernels"],"sub_categories":["Continuous Integration"],"readme":"# HAVK\nHAVK is an x86-64 operating system and kernel created with Ada (SPARK subset).\nIt focuses on security (and only that) via writing minimal code and using\nformal verification techniques to help achieve program correctness.\nIt is influenced by Unix, but it is not necessarily a Unix clone.\n\n### What can it do right now?\nIt currently has a primitive task scheduler and a functional user mode where\nyou can load your own x86-64 programs. What remains is to create more system\ncalls and expand what tasks can do so they can be meaningful.\n\nExpect it to do nothing until I decide to release the first major version, as\nit is still under heavy development.\n\n### Goals\n\nThis exists so I can experiment with intriguing security concepts such as\ncapabilities and play around with how programs in ring 3 interact with\nanything in ring 0, with the main goal being how much I can harden and\nlockdown the entire operating system itself for fun.\n\nI am more interested in any unique ideas you may have to do with operating\nsystem security as opposed to code contributions; however, issues and pull\nrequests are very welcome, especially bug fixes.\n\nThe end goal is to get a text-based web browser working at the very least, so\none could consider this a nearly featureless but usable OS. There are no goals\nto port this to other platforms/architectures at this stage.\n\n### Software requirements\nThere are a few mandatory software requirements:\n1. GNAT Community. GCC can compile Ada and the package contains the GNAT\n   Project Manager tools, along with GNATprove for SPARK. There's a script\n   inside the \"tools\" folder which you can utilise to obtain GNAT Community\n   2021. You can also modify the Makefile.\n2. GNU Make. This is pretty obvious.\n3. GNU-EFI. The bootloader I created uses UEFI to boot HAVK, not BIOS.\n4. GNU Mtools \u0026 GNU Parted. Used for creating a hard drive image.\n\nClone this repository, install those requirements, and enter `make`\nto create a hard drive image inside \"build\" called \"HAVK.img\". Then, simply\n`dd` it to a USB flash drive or install QEMU (`qemu-system-x86_64`) to emulate\nHAVK in a VM by performing `make qemu`.\n\nYou can also recreate the proof by executing `make proof`.\n\n### Hardware requirements\nThere's a few hardware requirements, but they are all critical right now:\n1. An x86-64 system that has a working display/monitor.\n2. UEFI firmware that isn't bugged and acts according to the specification,\n   along with supporting ACPI 2.0+.\n3. A PS/2 controller that is emulated/implemented by the system properly, as a\n   USB controller would take forever to program (see the GNU Hurd microkernel).\n4. A CPU that supports x2APIC.\n\nHaving a serial port (COM1, preferably) on your hardware would help in\ndebugging, so you can receive messages from the kernel about its progress.\nYou can boot HAVK from BIOS by emulating the UEFI services, but that is\nnot explained in detail here and should be avoided.\n\n### Useful development resources\nThese two links are the best resources for development on the x86-64\narchitecture:\n\nhttps://software.intel.com/en-us/articles/intel-sdm#combined\n\nhttps://developer.amd.com/resources/developer-guides-manuals/\n\nThe OSDev Wiki helps greatly with general overviews:\n\nhttps://wiki.osdev.org\n\nI started from here and have progressed beyond it at this stage:\n\nhttps://wiki.osdev.org/Ada_Bare_bones\n\nThese links are helpful for understanding Ada, SPARK, and GNAT:\n\nhttps://en.wikibooks.org/wiki/Ada_Programming\n\nhttp://docs.adacore.com/live/wave/spark2014/html/spark2014_ug/index.html\n\nhttp://docs.adacore.com/live/wave/spark2014/html/spark2014_rm/index.html\n\nhttp://docs.adacore.com/live/wave/gnat_rm/html/gnat_rm/gnat_rm.html\n\nDisclaimer: This is the first program I have made with either Ada or SPARK, and\nthat includes any Hello World examples. A lot of this OS may not be modelled\ncorrectly as I am new to the concept of formal verification as well.\n\nThere is currently no specification of what the kernel should do, so I'm making\nit up as I go along. `gnatprove` is used until it no longer brings up any\nwarnings or unproven checks by being as careful as possible and placing\nrestrictive contracts, with the purpose being to avoid runtime errors, not\nproving 100% correctness. There's still SPARK mode exclusions and assumptions\nmade, like for when raw memory manipulation is necessary to continue.\n\n### License\nGNU GPLv3. Applies to everything unless stated otherwise.\nThis repository also contains OVMF compiled firmware, GNU-EFI objects, and Ada\nruntime files provided by AdaCore as a part of GNAT GPL.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FRavSS%2FHAVK","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FRavSS%2FHAVK","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FRavSS%2FHAVK/lists"}