Subversion Repositories HelenOS

Rev

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

Rev 2071 Rev 2076
Line 49... Line 49...
49
#include <arch/types.h>
49
#include <arch/types.h>
50
#include <typedefs.h>
50
#include <typedefs.h>
51
#include <align.h>
51
#include <align.h>
52
#include <arch.h>
52
#include <arch.h>
53
 
53
 
-
 
54
#ifdef CONFIG_VIRT_IDX_DCACHE
-
 
55
#include <arch/mm/cache.h>
-
 
56
#endif
-
 
57
 
54
static int anon_page_fault(as_area_t *area, uintptr_t addr, pf_access_t access);
58
static int anon_page_fault(as_area_t *area, uintptr_t addr, pf_access_t access);
55
static void anon_frame_free(as_area_t *area, uintptr_t page, uintptr_t frame);
59
static void anon_frame_free(as_area_t *area, uintptr_t page, uintptr_t frame);
56
static void anon_share(as_area_t *area);
60
static void anon_share(as_area_t *area);
57
 
61
 
58
mem_backend_t anon_backend = {
62
mem_backend_t anon_backend = {
Line 151... Line 155...
151
/** Free a frame that is backed by the anonymous memory backend.
155
/** Free a frame that is backed by the anonymous memory backend.
152
 *
156
 *
153
 * The address space area and page tables must be already locked.
157
 * The address space area and page tables must be already locked.
154
 *
158
 *
155
 * @param area Ignored.
159
 * @param area Ignored.
156
 * @param page Ignored.
160
 * @param page Virtual address of the page corresponding to the frame.
157
 * @param frame Frame to be released.
161
 * @param frame Frame to be released.
158
 */
162
 */
159
void anon_frame_free(as_area_t *area, uintptr_t page, uintptr_t frame)
163
void anon_frame_free(as_area_t *area, uintptr_t page, uintptr_t frame)
160
{
164
{
161
    frame_free(frame);
165
    frame_free(frame);
-
 
166
#ifdef CONFIG_VIRT_IDX_DCACHE
-
 
167
    dcache_flush_frame(page, frame);
-
 
168
#endif
162
}
169
}
163
 
170
 
164
/** Share the anonymous address space area.
171
/** Share the anonymous address space area.
165
 *
172
 *
166
 * Sharing of anonymous area is done by duplicating its entire mapping
173
 * Sharing of anonymous area is done by duplicating its entire mapping