From 7199e74aa22e592a3b77bdd81f735edca5470596 Mon Sep 17 00:00:00 2001 From: Benji Dial Date: Sat, 20 Jan 2024 17:59:40 -0500 Subject: update --- include/hilbert/kernel/application.hpp | 70 ---------------------------------- 1 file changed, 70 deletions(-) delete mode 100644 include/hilbert/kernel/application.hpp (limited to 'include/hilbert/kernel/application.hpp') diff --git a/include/hilbert/kernel/application.hpp b/include/hilbert/kernel/application.hpp deleted file mode 100644 index dc2c9a3..0000000 --- a/include/hilbert/kernel/application.hpp +++ /dev/null @@ -1,70 +0,0 @@ -#ifndef HILBERT_KERNEL_APPLICATION_HPP -#define HILBERT_KERNEL_APPLICATION_HPP - -#include -#include - -//TODO: end application, threading. - -namespace hilbert::kernel::application { - - enum class app_state { - running, - paused, - zombie - }; - - struct app_instance { - - app_state state; - - uint64_t *p4; - uint64_t *p3; - uint64_t *p2s[512]; - uint64_t **p1s[512]; - - bool **p1es_to_free_on_exit[512]; - - uint64_t p4_paddr; - - //set to 0 if none - uint64_t framebuffer_vaddr; - - //only valid if state is zombie - int exit_code; - - //only valid if state is paused - struct { - uint64_t rip; - uint64_t rsp; - //TODO: etc. - } saved_regs; - - app_instance(); - - //vaddr and paddr must be aligned, and vaddr must be < 0x0080.0000.0000 - void map_page(uint64_t vaddr, uint64_t paddr, - bool write, bool execute, bool free_pram_on_exit); - - //returns start of first page. - uint64_t get_free_vaddr_pages(uint64_t count); - - //in lower half - uint64_t count_mapped_vram_pages(); - - }; - - extern app_instance *running_app; - - enum class create_app_result { - success, - device_error, - app_corrupt, - fs_corrupt - }; - - create_app_result create_app(const vfile::vfile &file, app_instance *&out); - -} - -#endif -- cgit v1.2.3