mirror of
https://github.com/drasko/codezero.git
synced 2026-03-23 20:41:51 +01:00
Kernel updates since December 2009
This commit is contained in:
@@ -1,22 +1,31 @@
|
||||
/*
|
||||
* Generic address space related information.
|
||||
*
|
||||
* Copyright (C) 2007 Bahadir Balban
|
||||
* Copyright (C) 2007-2010 Bahadir Balban
|
||||
*/
|
||||
#ifndef __SPACE_H__
|
||||
#define __SPACE_H__
|
||||
|
||||
/* The flags not embedded in the name behave as expected. E.g USR_RW is also */
|
||||
#define MAP_USR_RW_FLAGS 0 /* CB as one would expect */
|
||||
#define MAP_USR_RO_FLAGS 1 /* CB as one would expect */
|
||||
#define MAP_SVC_RW_FLAGS 2 /* CB as one would expect */
|
||||
#define MAP_USR_IO_FLAGS 3 /* Non-CB, RW TODO: How about RO one? */
|
||||
#define MAP_SVC_IO_FLAGS 4 /* Non-CB, RW */
|
||||
/*
|
||||
* Generic mapping flags.
|
||||
*/
|
||||
#define MAP_FAULT 0
|
||||
#define MAP_USR_RW 1
|
||||
#define MAP_USR_RO 2
|
||||
#define MAP_KERN_RW 3
|
||||
#define MAP_USR_IO 4
|
||||
#define MAP_KERN_IO 5
|
||||
#define MAP_USR_RWX 6
|
||||
#define MAP_KERN_RWX 7
|
||||
#define MAP_USR_RX 8
|
||||
#define MAP_KERN_RX 9
|
||||
#define MAP_UNMAP 10 /* For unmap syscall */
|
||||
#define MAP_INVALID_FLAGS (1 << 31)
|
||||
|
||||
/* Some default aliases */
|
||||
#define MAP_USR_DEFAULT_FLAGS MAP_USR_RW_FLAGS
|
||||
#define MAP_SVC_DEFAULT_FLAGS MAP_SVC_RW_FLAGS
|
||||
#define MAP_IO_DEFAULT_FLAGS MAP_SVC_IO_FLAGS
|
||||
#define MAP_USR_DEFAULT MAP_USR_RW
|
||||
#define MAP_KERN_DEFAULT MAP_KERN_RW
|
||||
#define MAP_IO_DEFAULT MAP_KERN_IO
|
||||
|
||||
#if defined (__KERNEL__)
|
||||
|
||||
@@ -46,11 +55,14 @@ struct address_space_list {
|
||||
};
|
||||
|
||||
struct address_space *address_space_create(struct address_space *orig);
|
||||
void address_space_delete(struct address_space *space);
|
||||
void address_space_delete(struct address_space *space,
|
||||
struct ktcb *task_accounted);
|
||||
void address_space_attach(struct ktcb *tcb, struct address_space *space);
|
||||
struct address_space *address_space_find(l4id_t spid);
|
||||
void address_space_add(struct address_space *space);
|
||||
void address_space_remove(struct address_space *space);
|
||||
|
||||
struct container;
|
||||
void address_space_remove(struct address_space *space, struct container *cont);
|
||||
void init_address_space_list(struct address_space_list *space_list);
|
||||
int check_access(unsigned long vaddr, unsigned long size,
|
||||
unsigned int flags, int page_in);
|
||||
|
||||
Reference in New Issue
Block a user