Subversion Repositories HelenOS

Rev

Rev 3624 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 3624 Rev 4692
Line 92... Line 92...
92
    link_t inactive_as_with_asid_link;
92
    link_t inactive_as_with_asid_link;
93
    /**
93
    /**
94
     * Number of processors on wich is this address space active.
94
     * Number of processors on wich is this address space active.
95
     * Protected by asidlock.
95
     * Protected by asidlock.
96
     */
96
     */
97
    count_t cpu_refcount;
97
    size_t cpu_refcount;
98
    /**
98
    /**
99
     * Address space identifier.
99
     * Address space identifier.
100
     * Constant on architectures that do not support ASIDs.
100
     * Constant on architectures that do not support ASIDs.
101
     * Protected by asidlock.
101
     * Protected by asidlock.
102
     */
102
     */
Line 130... Line 130...
130
 */
130
 */
131
typedef struct {
131
typedef struct {
132
    /** This lock must be acquired only when the as_area lock is held. */
132
    /** This lock must be acquired only when the as_area lock is held. */
133
    mutex_t lock;      
133
    mutex_t lock;      
134
    /** This structure can be deallocated if refcount drops to 0. */
134
    /** This structure can be deallocated if refcount drops to 0. */
135
    count_t refcount;
135
    size_t refcount;
136
    /**
136
    /**
137
     * B+tree containing complete map of anonymous pages of the shared area.
137
     * B+tree containing complete map of anonymous pages of the shared area.
138
     */
138
     */
139
    btree_t pagemap;
139
    btree_t pagemap;
140
} share_info_t;
140
} share_info_t;
Line 154... Line 154...
154
        elf_header_t *elf;
154
        elf_header_t *elf;
155
        elf_segment_header_t *segment;
155
        elf_segment_header_t *segment;
156
    };
156
    };
157
    struct {    /**< phys_backend members */
157
    struct {    /**< phys_backend members */
158
        uintptr_t base;
158
        uintptr_t base;
159
        count_t frames;
159
        size_t frames;
160
    };
160
    };
161
} mem_backend_data_t;
161
} mem_backend_data_t;
162
 
162
 
163
/** Address space area structure.
163
/** Address space area structure.
164
 *
164
 *
Line 173... Line 173...
173
     */
173
     */
174
    int flags;
174
    int flags;
175
    /** Attributes related to the address space area itself. */
175
    /** Attributes related to the address space area itself. */
176
    int attributes;
176
    int attributes;
177
    /** Size of this area in multiples of PAGE_SIZE. */
177
    /** Size of this area in multiples of PAGE_SIZE. */
178
    count_t pages;
178
    size_t pages;
179
    /** Base address of this area. */
179
    /** Base address of this area. */
180
    uintptr_t base;
180
    uintptr_t base;
181
    /** Map of used space. */
181
    /** Map of used space. */
182
    btree_t used_space;
182
    btree_t used_space;
183
 
183
 
Line 231... Line 231...
231
#ifdef CONFIG_UDEBUG
231
#ifdef CONFIG_UDEBUG
232
extern int as_area_make_writeable(uintptr_t address);
232
extern int as_area_make_writeable(uintptr_t address);
233
extern int as_debug_write(uintptr_t va, void *data, size_t n);
233
extern int as_debug_write(uintptr_t va, void *data, size_t n);
234
#endif
234
#endif
235
 
235
 
236
extern int used_space_insert(as_area_t *a, uintptr_t page, count_t count);
236
extern int used_space_insert(as_area_t *a, uintptr_t page, size_t count);
237
extern int used_space_remove(as_area_t *a, uintptr_t page, count_t count);
237
extern int used_space_remove(as_area_t *a, uintptr_t page, size_t count);
238
 
238
 
239
 
239
 
240
/* Interface to be implemented by architectures. */
240
/* Interface to be implemented by architectures. */
241
#ifndef as_constructor_arch
241
#ifndef as_constructor_arch
242
extern int as_constructor_arch(as_t *as, int flags);
242
extern int as_constructor_arch(as_t *as, int flags);