Rev 1306 | Rev 1358 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
| Rev 1306 | Rev 1329 | ||
|---|---|---|---|
| Line 27... | Line 27... | ||
| 27 | */ |
27 | */ |
| 28 | 28 | ||
| 29 | #ifndef __AS_H__ |
29 | #ifndef __AS_H__ |
| 30 | #define __AS_H__ |
30 | #define __AS_H__ |
| 31 | 31 | ||
| - | 32 | /** Address space area flags. */ |
|
| - | 33 | #define AS_AREA_READ 1 |
|
| - | 34 | #define AS_AREA_WRITE 2 |
|
| - | 35 | #define AS_AREA_EXEC 4 |
|
| - | 36 | #define AS_AREA_DEVICE 8 |
|
| - | 37 | ||
| - | 38 | ||
| - | 39 | #ifdef KERNEL |
|
| - | 40 | ||
| 32 | #include <mm/as_arg.h> |
41 | #include <mm/as_arg.h> |
| 33 | #include <arch/mm/page.h> |
42 | #include <arch/mm/page.h> |
| 34 | #include <arch/mm/as.h> |
43 | #include <arch/mm/as.h> |
| 35 | #include <arch/mm/asid.h> |
44 | #include <arch/mm/asid.h> |
| 36 | #include <arch/types.h> |
45 | #include <arch/types.h> |
| Line 51... | Line 60... | ||
| 51 | 60 | ||
| 52 | #define USTACK_ADDRESS USTACK_ADDRESS_ARCH |
61 | #define USTACK_ADDRESS USTACK_ADDRESS_ARCH |
| 53 | 62 | ||
| 54 | #define FLAG_AS_KERNEL (1 << 0) /**< Kernel address space. */ |
63 | #define FLAG_AS_KERNEL (1 << 0) /**< Kernel address space. */ |
| 55 | 64 | ||
| 56 | /** Address space area flags. */ |
- | |
| 57 | #define AS_AREA_READ 1 |
- | |
| 58 | #define AS_AREA_WRITE 2 |
- | |
| 59 | #define AS_AREA_EXEC 4 |
- | |
| 60 | #define AS_AREA_DEVICE 8 |
- | |
| 61 | 65 | ||
| 62 | /** Address space area attributes. */ |
66 | /** Address space area attributes. */ |
| 63 | #define AS_AREA_ATTR_NONE 0 |
67 | #define AS_AREA_ATTR_NONE 0 |
| 64 | #define AS_AREA_ATTR_PARTIAL 1 /* Not fully initialized area. */ |
68 | #define AS_AREA_ATTR_PARTIAL 1 /* Not fully initialized area. */ |
| 65 | 69 | ||
| Line 127... | Line 131... | ||
| 127 | int as_area_send(task_id_t dst_id, __address base); |
131 | int as_area_send(task_id_t dst_id, __address base); |
| 128 | extern void as_set_mapping(as_t *as, __address page, __address frame); |
132 | extern void as_set_mapping(as_t *as, __address page, __address frame); |
| 129 | extern int as_page_fault(__address page, istate_t *istate); |
133 | extern int as_page_fault(__address page, istate_t *istate); |
| 130 | extern void as_switch(as_t *old, as_t *new); |
134 | extern void as_switch(as_t *old, as_t *new); |
| 131 | extern void as_free(as_t *as); |
135 | extern void as_free(as_t *as); |
| - | 136 | int as_area_steal(task_t *src_task, __address src_base, size_t acc_size, __address dst_base); |
|
| - | 137 | extern size_t as_get_size(__address base); |
|
| 132 | 138 | ||
| 133 | /* Interface to be implemented by architectures. */ |
139 | /* Interface to be implemented by architectures. */ |
| 134 | #ifndef as_install_arch |
140 | #ifndef as_install_arch |
| 135 | extern void as_install_arch(as_t *as); |
141 | extern void as_install_arch(as_t *as); |
| 136 | #endif /* !def as_install_arch */ |
142 | #endif /* !def as_install_arch */ |
| 137 | 143 | ||
| 138 | /* Address space area related syscalls. */ |
144 | /* Address space area related syscalls. */ |
| 139 | extern __native sys_as_area_create(__address address, size_t size, int flags); |
145 | extern __native sys_as_area_create(__address address, size_t size, int flags); |
| 140 | extern __native sys_as_area_resize(__address address, size_t size, int flags); |
146 | extern __native sys_as_area_resize(__address address, size_t size, int flags); |
| 141 | extern __native sys_as_area_destroy(__address address); |
147 | extern __native sys_as_area_destroy(__address address); |
| 142 | extern __native sys_as_area_accept(as_area_acptsnd_arg_t *uspace_accept_arg); |
- | |
| - | 148 | ||
| 143 | extern __native sys_as_area_send(as_area_acptsnd_arg_t *uspace_send_arg); |
149 | #endif /* KERNEL */ |
| 144 | 150 | ||
| 145 | #endif |
151 | #endif |