blob: b939406976fa59cb5163dae30f09bff1194f7487 (
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
33
34
35
36
37
|
#ifndef _JOVE_ARCH_HAL_OBJ_H
#define _JOVE_ARCH_HAL_OBJ_H 1
#include <stdatomic.h>
#include <stdint.h>
#include <stddef.h>
enum
{
JOVE_OBJ_SERIAL_COM = 0x80,
JOVE_OBJ_IOPB
};
/*Represents a locked kernel object pointer inside of a object directory.*/
typedef union jove_obj
{
struct {
atomic_flag lock;
uint8_t type;
/*Raw value or pointer to a data-structure located in identity memory.*/
uint64_t value : 48;
};
uintmax_t data;
} jove_obj_t;
/*Represents an unlocked kernel object pointer.
*This object should only exist temporarily while accessing the underlying
*structure this object points to.*/
typedef struct jove_locked_obj
{
jove_obj_t locked;
} jove_owned_obj_t;
/*Object directories are always 1 page wide. Since an object inside the directory
* in this arch is a pointer width, that is 512 entries per directory.*/
#endif
|