Changes in kernel/generic/include/mm/as.h [c0699467:fc47885] in mainline
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
kernel/generic/include/mm/as.h
rc0699467 rfc47885 36 36 #define KERN_AS_H_ 37 37 38 #include <typedefs.h> 39 #include <abi/mm/as.h> 38 #ifdef KERNEL 39 #include <typedefs.h> 40 #else 41 #include <sys/types.h> 42 #endif 43 44 /** Address space area flags. */ 45 #define AS_AREA_READ 1 46 #define AS_AREA_WRITE 2 47 #define AS_AREA_EXEC 4 48 #define AS_AREA_CACHEABLE 8 49 50 /** Address space area info exported to userspace. */ 51 typedef struct { 52 /** Starting address */ 53 uintptr_t start_addr; 54 55 /** Area size */ 56 size_t size; 57 58 /** Area flags */ 59 unsigned int flags; 60 } as_area_info_t; 61 62 #ifdef KERNEL 63 40 64 #include <arch/mm/page.h> 41 65 #include <arch/mm/as.h> 42 66 #include <arch/mm/asid.h> 43 #include <arch/istate.h>44 67 #include <typedefs.h> 45 68 #include <synch/spinlock.h> … … 61 84 #define USER_ADDRESS_SPACE_END USER_ADDRESS_SPACE_END_ARCH 62 85 63 #ifdef USTACK_ADDRESS_ARCH 64 #define USTACK_ADDRESS USTACK_ADDRESS_ARCH 65 #else 66 #define USTACK_ADDRESS (USER_ADDRESS_SPACE_END - (STACK_SIZE - 1)) 67 #endif 86 #define USTACK_ADDRESS USTACK_ADDRESS_ARCH 68 87 69 88 /** Kernel address space. */ … … 219 238 /** Address space area backend structure. */ 220 239 typedef struct mem_backend { 221 bool (* create)(as_area_t *);222 bool (* resize)(as_area_t *, size_t);223 void (* share)(as_area_t *);224 void (* destroy)(as_area_t *);225 226 240 int (* page_fault)(as_area_t *, uintptr_t, pf_access_t); 227 241 void (* frame_free)(as_area_t *, uintptr_t, uintptr_t); 242 void (* share)(as_area_t *); 228 243 } mem_backend_t; 229 244 … … 231 246 232 247 extern as_operations_t *as_operations; 233 extern li st_t inactive_as_with_asid_list;248 extern link_t inactive_as_with_asid_head; 234 249 235 250 extern void as_init(void); … … 283 298 extern mem_backend_t phys_backend; 284 299 300 /** 301 * This flags is passed when running the loader, otherwise elf_load() 302 * would return with a EE_LOADER error code. 303 * 304 */ 305 #define ELD_F_NONE 0 306 #define ELD_F_LOADER 1 307 308 extern unsigned int elf_load(elf_header_t *, as_t *, unsigned int); 309 285 310 /* Address space area related syscalls. */ 286 311 extern sysarg_t sys_as_area_create(uintptr_t, size_t, unsigned int); … … 288 313 extern sysarg_t sys_as_area_change_flags(uintptr_t, unsigned int); 289 314 extern sysarg_t sys_as_area_destroy(uintptr_t); 290 extern sysarg_t sys_as_get_unmapped_area(uintptr_t, size_t);291 315 292 316 /* Introspection functions. */ … … 294 318 extern void as_print(as_t *); 295 319 320 #endif /* KERNEL */ 321 296 322 #endif 297 323
Note:
See TracChangeset
for help on using the changeset viewer.