diff options
| author | Ada Christine <adachristine18@gmail.com> | 2022-02-04 10:41:24 +0000 |
|---|---|---|
| committer | Ada Christine <adachristine18@gmail.com> | 2022-02-04 10:41:24 +0000 |
| commit | 7b91c46a8ebf38b2c1c80c1f1e63c4d4dfd10640 (patch) | |
| tree | d1ecf22568d6de100c5dce601b8166c8abbae2b7 /api | |
| parent | f0c062df0c2a674d67af12eb5e18f22bd8412c15 (diff) | |
header reworking, beginning memory.c refactoring
Diffstat (limited to 'api')
| -rw-r--r-- | api/kc/core/memory.h | 15 | ||||
| -rw-r--r-- | api/kc/kc.h (renamed from api/kernel/component.h) | 3 |
2 files changed, 17 insertions, 1 deletions
diff --git a/api/kc/core/memory.h b/api/kc/core/memory.h new file mode 100644 index 0000000..d6f1cd6 --- /dev/null +++ b/api/kc/core/memory.h @@ -0,0 +1,15 @@ +/* + * kernel component core - memory management interface + */ +#pragma once + +#include <kc/kc.h> + +#include <stdint.h> + +typedef uint64_t kc_phys_addr; +typedef void * kc_virt_addr; + +kc_phys_addr kcc_page_alloc(void); +void kcc_page_free(kc_phys_addr page); + diff --git a/api/kernel/component.h b/api/kc/kc.h index d795283..c3390b2 100644 --- a/api/kernel/component.h +++ b/api/kc/kc.h @@ -4,7 +4,8 @@ extern char kc_image_base; extern char kc_text_begin; extern char kc_text_end; extern char kc_rodata_begin; -extern char kc_rodata_end; extern char kc_data_begin; extern char kc_data_end; +#define KC_EXPORT __attribute__((visibility("default"))) + |
