blob: f1cf9dbdc79d5f458063daa51c177b6a427a374b (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
|
#ifndef _JOVE_HAL_MEMORY_H
#define _JOVE_HAL_MEMORY_H 1
#include "hal/obj.h"
#include "api/syscall.h"
typedef struct jove_obj_untyped
{
size_t limit;
} jove_untyped_t;
#define JOVE_UNTYPED_MINSIZE 0x10
void mem_setup_untyped(void);
void *phys_tovirt(uintptr_t phys);
uintptr_t untyped_address(jove_owned_obj_t *tgt);
size_t untyped_size(jove_owned_obj_t *tgt);
int untyped_split(jove_owned_obj_t *tgt, jove_owned_obj_t *dst, size_t bytes);
int untyped_merge(jove_owned_obj_t *a, jove_owned_obj_t *b);
int untyped_retype(jove_owned_obj_t *tgt, uint8_t newtype);
int pagedir_map_frame(
jove_owned_obj_t *tgt, jove_owned_obj_t *untyped_obj,
uintptr_t vptr, struct syscall_pagedir_flags flg);
int pagedir_map_table(
jove_owned_obj_t *tgt, jove_owned_obj_t *untyped_obj,
uintptr_t vptr, struct syscall_pagedir_flags flg);
#endif
|