Subversion Repositories HelenOS

Compare Revisions

Ignore whitespace Rev 2105 → Rev 2106

/trunk/kernel/genarch/include/mm/as_ht.h
36,43 → 36,17
#define KERN_AS_HT_H_
 
#include <mm/mm.h>
#include <arch/mm/asid.h>
#include <adt/list.h>
#include <adt/btree.h>
#include <synch/mutex.h>
#include <arch/types.h>
 
/** Address space structure.
*
* as_t contains the list of as_areas of userspace accessible
* pages for one or more tasks. Ranges of kernel memory pages are not
* supposed to figure in the list as they are shared by all tasks and
* set up during system initialization.
*/
typedef struct {
/** Protected by asidlock. */
link_t inactive_as_with_asid_link;
} as_genarch_t;
 
mutex_t lock;
struct as;
 
/** Number of references (i.e tasks that reference this as). */
count_t refcount;
 
/** Number of processors on wich is this address space active. */
count_t cpu_refcount;
 
/** B+tree of address space areas. */
btree_t as_area_btree;
 
/** Address space identifier. Constant on architectures that do not support ASIDs.*/
asid_t asid;
/** Architecture specific content. */
as_arch_t arch;
} as_t;
 
typedef struct {
typedef struct pte {
link_t link; /**< Page hash table link. */
as_t *as; /**< Address space. */
struct as *as; /**< Address space. */
uintptr_t page; /**< Virtual memory page. */
uintptr_t frame; /**< Physical memory frame. */
unsigned g : 1; /**< Global page. */
/trunk/kernel/genarch/include/mm/as_pt.h
36,45 → 36,15
#define KERN_AS_PT_H_
 
#include <mm/mm.h>
#include <arch/mm/asid.h>
#include <adt/list.h>
#include <adt/btree.h>
#include <synch/mutex.h>
#include <arch/types.h>
 
#define AS_PAGE_TABLE
 
/** Address space structure.
*
* as_t contains the list of as_areas of userspace accessible
* pages for one or more tasks. Ranges of kernel memory pages are not
* supposed to figure in the list as they are shared by all tasks and
* set up during system initialization.
*/
typedef struct {
/** Protected by asidlock. */
link_t inactive_as_with_asid_link;
 
mutex_t lock;
 
/** Number of references (i.e tasks that reference this as). */
count_t refcount;
 
/** Number of processors on wich is this address space active. */
count_t cpu_refcount;
 
/** B+tree of address space areas. */
btree_t as_area_btree;
/** Page table pointer. */
pte_t *page_table;
} as_genarch_t;
 
/** Address space identifier. Constant on architectures that do not support ASIDs.*/
asid_t asid;
/** Architecture specific content. */
as_arch_t arch;
} as_t;
 
#endif
 
/** @}
/trunk/kernel/genarch/include/mm/page_ht.h
59,8 → 59,6
#define PTE_WRITABLE(pte) ((pte)->w != 0)
#define PTE_EXECUTABLE(pte) ((pte)->x != 0)
 
#define SET_PTL0_ADDRESS(x)
 
extern as_operations_t as_ht_operations;
extern page_mapping_operations_t ht_mapping_operations;