{"id":36646925,"url":"https://github.com/kisasexypantera94/v2p","last_synced_at":"2026-01-12T10:01:30.201Z","repository":{"id":201354077,"uuid":"271895376","full_name":"kisasexypantera94/v2p","owner":"kisasexypantera94","description":"Implementation of x86 paging translation","archived":false,"fork":false,"pushed_at":"2020-06-19T11:40:21.000Z","size":39,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2023-10-19T19:13:46.594Z","etag":null,"topics":["paging","x86"],"latest_commit_sha":null,"homepage":"","language":"C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/kisasexypantera94.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null}},"created_at":"2020-06-12T21:44:46.000Z","updated_at":"2023-10-19T19:40:19.136Z","dependencies_parsed_at":null,"dependency_job_id":"ca81b9c3-9ae8-41e7-9f57-a3d07caaf340","html_url":"https://github.com/kisasexypantera94/v2p","commit_stats":null,"previous_names":["kisasexypantera94/v2p"],"tags_count":null,"template":null,"template_full_name":null,"purl":"pkg:github/kisasexypantera94/v2p","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kisasexypantera94%2Fv2p","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kisasexypantera94%2Fv2p/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kisasexypantera94%2Fv2p/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kisasexypantera94%2Fv2p/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/kisasexypantera94","download_url":"https://codeload.github.com/kisasexypantera94/v2p/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kisasexypantera94%2Fv2p/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28337870,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-12T06:09:07.588Z","status":"ssl_error","status_checked_at":"2026-01-12T06:05:18.301Z","response_time":98,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":["paging","x86"],"created_at":"2026-01-12T10:01:29.274Z","updated_at":"2026-01-12T10:01:30.190Z","avatar_url":"https://github.com/kisasexypantera94.png","language":"C","funding_links":[],"categories":[],"sub_categories":[],"readme":"# v2p\n\n# Features\n* 32-Bit Paging (Legacy)\n* PAE Paging\n* TODO: IA-32e Paging\n\n# Building\n```\n$ mkdir build\ncd build\ncmake ..\nmake\n```\n\n# Usage\nRunning tests:\n```\n$ ./tests/tests\nOK\n```\n\n```c\n#include \u003cstdio.h\u003e\n#include \u003cstring.h\u003e\n\n#include \"v2p.h\"\n\nint32_t\nread_func(void *buf, const uint32_t size, const uint64_t physical_addr) {\n    uint64_t val = physical_addr | 1U;\n    memcpy(buf, \u0026val, size);\n    return sizeof(val);\n}\n\n\nint main() {\n    uint32_t virt_addr = 123456789;\n    config_t cfg = {.level=LEGACY, .read_func=read_func, .root_addr=777777777};\n\n    uint64_t phys;\n    uint32_t page_fault;\n    error_t err = va2pa(virt_addr, \u0026cfg, \u0026phys, \u0026page_fault);\n\n    switch (err) {\n        case SUCCESS: {\n            printf(\"OK: Physical address: %llu\\n\", phys);\n            break;\n        }\n        case PAGE_FAULT: {\n            switch (page_fault) {\n                case NOT_PRESENT:\n                    printf(\"ERROR: page fault occurred: not present\\n\");\n                    break;\n                case RESERVED_BIT_VIOLATION:\n                    printf(\"ERROR: page fault occurred: reserved bit has been set\\n\");\n                    break;\n            }\n            break;\n        }\n        case READ_FAULT: {\n            printf(\"ERROR: read fault occurred\\n\");\n            break;\n        }\n        case INVALID_TRANSLATION_TYPE: {\n            printf(\"ERROR: invalid translation type\\n\");\n            break;\n        }\n    }\n\n    return 0;\n}\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkisasexypantera94%2Fv2p","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkisasexypantera94%2Fv2p","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkisasexypantera94%2Fv2p/lists"}