Rev 789 | Rev 940 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 789 | Rev 823 | ||
---|---|---|---|
Line 74... | Line 74... | ||
74 | * supposed to figure in the list as they are shared by all tasks and |
74 | * supposed to figure in the list as they are shared by all tasks and |
75 | * set up during system initialization. |
75 | * set up during system initialization. |
76 | */ |
76 | */ |
77 | struct as { |
77 | struct as { |
78 | /** Protected by asidlock. Must be acquired before as->lock. */ |
78 | /** Protected by asidlock. Must be acquired before as->lock. */ |
79 | link_t as_with_asid_link; |
79 | link_t inactive_as_with_asid_link; |
80 | 80 | ||
81 | SPINLOCK_DECLARE(lock); |
81 | SPINLOCK_DECLARE(lock); |
- | 82 | ||
- | 83 | /** Number of processors on wich is this address space active. */ |
|
- | 84 | count_t refcount; |
|
- | 85 | ||
82 | link_t as_area_head; |
86 | link_t as_area_head; |
83 | 87 | ||
84 | /** Page table pointer. Constant on architectures that use global page hash table. */ |
88 | /** Page table pointer. Constant on architectures that use global page hash table. */ |
85 | pte_t *page_table; |
89 | pte_t *page_table; |
86 | 90 | ||
Line 94... | Line 98... | ||
94 | typedef struct as_operations as_operations_t; |
98 | typedef struct as_operations as_operations_t; |
95 | 99 | ||
96 | extern as_t *AS_KERNEL; |
100 | extern as_t *AS_KERNEL; |
97 | extern as_operations_t *as_operations; |
101 | extern as_operations_t *as_operations; |
98 | 102 | ||
- | 103 | extern spinlock_t as_lock; |
|
- | 104 | extern link_t inactive_as_with_asid_head; |
|
- | 105 | ||
99 | extern void as_init(void); |
106 | extern void as_init(void); |
100 | extern as_t *as_create(int flags); |
107 | extern as_t *as_create(int flags); |
101 | extern as_area_t *as_area_create(as_t *as, as_area_type_t type, size_t size, __address base); |
108 | extern as_area_t *as_area_create(as_t *as, as_area_type_t type, size_t size, __address base); |
102 | extern void as_set_mapping(as_t *as, __address page, __address frame); |
109 | extern void as_set_mapping(as_t *as, __address page, __address frame); |
103 | extern int as_page_fault(__address page); |
110 | extern int as_page_fault(__address page); |
104 | extern void as_install(as_t *m); |
111 | extern void as_switch(as_t *old, as_t *new); |
105 | 112 | ||
106 | /* Interface to be implemented by architectures. */ |
113 | /* Interface to be implemented by architectures. */ |
107 | #ifndef as_install_arch |
114 | #ifndef as_install_arch |
108 | extern void as_install_arch(as_t *as); |
115 | extern void as_install_arch(as_t *as); |
109 | #endif /* !def as_install_arch */ |
116 | #endif /* !def as_install_arch */ |